Problems with _Unwind_Backtrace() vs signal handlers
Bryce McKinlay
mckinlay@redhat.com
Mon Aug 2 16:47:00 GMT 2004
Geoffrey Keating wrote:
>Bryce McKinlay <mckinlay@redhat.com> writes:
>
>
>
>>For a normal call, the IP returned by _Unwind_GetIP() is the return
>>address for the frame above it - that is, the instruction following
>>the "call" instruction. When unwinding through a signal handler,
>>however, _Unwind_GetIP() returns a pointer to the faulting
>>instruction.
>>
>>
>
>Sounds like a bug in MD_FALLBACK_FRAME_STATE_FOR on your platform.
>I'd suggest looking at the powerpc-darwin implementation for
>an indication of how to get this right.
>
>
I don't think Linux uses MD_FALLBACK_FRAME_STATE_FOR any more, at least
on the i686/ppc/x86-64 targets which I checked. Instead, my
understanding is that glibc now provides the unwind info for its signal
handler frames.
So, it could be a bug in glibc's unwind info, but from what I can tell,
throwing exceptions through the signal frames appears to be working fine
- this is why I suspect a problem with _Unwind_Backtrace().
Regards
Bryce
More information about the Gcc
mailing list