Re: Inlining doesn't lose stack trace anymore?
Re: Inlining doesn't lose stack trace anymore?
- Subject: Re: Inlining doesn't lose stack trace anymore?
- From: Jim Ingham <email@hidden>
- Date: Thu, 20 Mar 2008 18:38:35 -0700
Well, you don't say what version of Xcode you were using, but with
Xcode 3.0 and beyond using the DWARF debug format, the line tables do
in fact have debug info that tracks code inlining and gdb reads &
reports that info. So if the code were being inlined, you would see
the correct function names. You can ever do crazy things like "step
out" of an inlined function and have it actually step out of the
inlined function, not the containing scope! And "step over" really
steps over inlined functions...
OTOH, unless you use the __always_inline attribute gcc generally
doesn't inline code at -O0. So if you were building for debug, most
likely your functions weren't actually being inlined. You can either
look at the assembly view and try to figure out where things are that
way, or in the gdb console, you can do:
(gdb) info line foo.c:12
to get the address range for a given line. Do it for the line before
& after the supposed inlining, and if the pc for the inlined function
is between those two ranges, it is inlined... Otherwise, not.
Jim
On Mar 20, 2008, at 5:55 PM, Theodore H. Smith wrote:
Hi everyone, just a silly quick question.
So... I was doing some testing on some code of mine. Its a code to
do with fuzzy string searches.
And... I was debugging it. The app crashed. MacOSX helpfully gave me
the stack trace. The crash was in an inlined function.
Is that possible? Can the function be inlined, AND I get my function
name? Is gcc that advanced now?
I remember the day, when a crash in an inlined function would mean
you don't get that inlined function's name.
Or is it that my function isn't really inlined. :( So has gcc
improved, or is my function not really inlined?
--
http://elfdata.com/plugin/
"String processing, done right"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden