This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dwarf-frame.c question


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]