[PATCH v2 2/2] gdb: Respect the DW_CC_nocall attribute

Six, Lancelot Lancelot.Six@amd.com
Mon Jan 31 14:19:40 GMT 2022


[AMD Official Use Only]

Hi,

> >         else if (thisfun != NULL)
> >       {
> > +       if (is_nocall_function (check_typedef (value_type (function))))
> > +         query_prefix
> > +           = string_printf ("The function '%s' does not follow the target "
> > +                            "calling convention.\n"
> > +                            "If you continue, setting the return value "
> > +                            "will probably lead to unpredictable "
> > +                            "behaviors.\n",
> > +                            thisfun->print_name ());
> > +
>
> I feel like this if statement could have a set of { } around it. The assignment and call are big enough to be confusing on a quick glance

Will do.

> > +
> > +int
> > +foo ()
> > +{
> > +  asm ("foo_label: .globl foo_label");
> > +  return 42;
> > +}
>
> According to the testsuite coding standards, this should be foo (void), instead of foo ()

OK

> > +if ![runto_main] {
> > +    return -1
> > +}
>
> Following Keith Seitz's request to be more pedantic about TCL formatting, I think this should be
> 
> if {![runto_main]} {

Will change that as well.  Thanks for pointing this out.

Thanks for the feedbacks.

Best,
Lancelot.

> Like I said, I can't approve for pushing, but LGTM.
>
> --
> Cheers!
> Bruno Larsen


More information about the Gdb-patches mailing list