[Dwarf-Discuss] unwinding stack (CIE/FDE)

Mark Wielaard mjw@redhat.com
Wed Aug 4 08:06:08 GMT 2010


On Tue, 2010-08-03 at 17:37 -0700, Jason Molenda wrote:
> On Aug 3, 2010, at 5:31 PM, Frank Ch. Eigler wrote:
> 
> > Hi -
> > 
> > On Tue, Aug 03, 2010 at 04:55:23PM -0700, Jason Molenda wrote:
> >> [...]
> >> Looking at the debug_frame that my compiler (gcc-4.2 in this case) outputs,
> >> [...]
> >> There's nothing about that stack movement in the FDE.
> > 
> > Try again with CFLAGS+=-fasynchronous-unwind-tables.
>
> I'm not making this stuff up. :)  And the next question you'll ask
> yourself is why -fasynchronous-unwind-tables isn't the default output
> style for the debug_frame section in the first place.  But as you can
> see, it doesn't make any difference - at least with gcc-4.2 with the
> Apple local patches.

You might want to upgrade your compiler. gcc 4.2 is fairly old (2007,
hasn't seen a point upgrade since 2008). Current is gcc 4.5 (which will
output unwind info not just for function prologues, but also for
epilogues). On my fedora machine -fasynchronous-unwind-tables is the
default (although I couldn't replicate your situation there, since newer
gcc seems to not generate that push/pop/call dance for me). You might
also want to look at both the .debug_frame and the .eh_frame. If a
location is described in one, the compiler might not also output it in
the other.

Cheers,

Mark





More information about the Dwarf-discuss mailing list