dwarf-frame.c question

Richard Henderson rth@redhat.com
Tue Jun 3 15:58:00 GMT 2003


On Tue, Jun 03, 2003 at 01:30:56AM -0500, Jim Blandy wrote:
> Since we're unwinding a frame which will never really be unwound, we
> can have that do anything we want.  So, if a function never returns,
> why not have the compiler emit CFI that restores the state just
> *before* the call insn was executed, not after it returns?  The
> unwound PC would point at the call insn itself.

Hmm.  You mean that the unwind info for "abort" itself
would change to say that the return address was something
other than it really is?

Certainly this is possible.  If the function has the
noreturn attribute GCC could frob the return address
with DW_CFA_expression.

Does this have any other adverse side effects though?

How about the fact that abort is often written in assembly
language in libc, and so may not have any specific unwind
information at all?


r~



More information about the Gdb mailing list