This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCHv2] Make "skip" work on inline frames


On 10/31/19 4:53 PM, Simon Marchi wrote:
> On 2019-10-31 12:42 p.m., Pedro Alves wrote:
>> On 10/30/19 9:56 PM, Bernd Edlinger wrote:
>>> +if { [prepare_for_testing "failed to prepare" "skip2" \
>>> +                          {skip2.c skip1.c } \
>>> +                          {debug nowarnings optimize=-O2}] } {
>>
>> Instead of -O2, could you make this use -O0 (the default),
>> and then use attribute((always_inline)) to force inlining? 
>> We do that in some tests.  E.g., gdb.opt/inline-locals.c.
> 
> I think that's a good suggestion, but just be aware that there used to be
> some problems with always_inline, e.g.:

I don't think always_inline changes anything in the debug info special,
it just tells the compiler to inline the function even at -O0, which is
what we're after.

> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=13263

This one seems to be about attribute((artificial)), and the desire
to not step into such functions automatically:

   "Given that I marked the function always_inline and artificial, I
    was expecting not to step into its body."

> https://sourceware.org/bugzilla/show_bug.cgi?id=12429
> 

This one seems like a generic inlining issue.

> I'm not sure if those are still valid.  If they are, it might be more difficult
> that expected to use always_inline.
I don't think always_inline is anything special compared to inlining
because of -O2.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]