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 Jun  3, 2003, Jim Blandy <jimb@redhat.com> wrote:

> 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?

In some ABIs, the callee releases (part of) the stack space allocated
by the caller, so the state is actually different.  I.e., the state
before the call is significantly different from the state after the
return, which is also different from the state during the call.  I'm
not sure whether it would actually matter for GDB, but that's why I
thought we'd be better off taking the CFI from after the call (even if
it's not meaningful given that the call doesn't return), instead of
from before it.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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