This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: Help: Unwinding the C++ stack...throw, longjmp & threads
>>>>> Jamie Lokier <jamie.lokier@cern.ch> writes:
> I would think improving the .eh_frame info so that functions without
> unwind handlers don't take any space in .eh_frame. I.e., some mechanism
> for "default unwinding" using the frame pointer.
.eh_frame has nothing to do with how many handlers a function has; it tells
the unwinder how to reload the registers saved in the function prologue so
that they have the right values when we get to a handler in the caller.
It is possible to do unwinding without .eh_frame; gdb does it by
disassembling the prologue, but this doesn't always work.
Another possiblity would be to declare that all registers are clobbered on
entry to an exception handler; then the default unwinder would only have to
worry about how to find the return address and saved stack pointer for a
frame, which is usually straightforward if you have a frame pointer to work
with.
Jason