This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: dwarf-frame.c question
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Jim Blandy <jimb at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Andrew Cagney <ac131313 at redhat dot com>, Mark Kettenis <kettenis at chello dot nl>, mludvig at suse dot cz, gdb at sources dot redhat dot com
- Date: 03 Jun 2003 17:11:58 -0300
- Subject: Re: dwarf-frame.c question
- Organization: GCC Team, Red Hat
- References: <3ED381CB.5050207@suse.cz><200305291544.h4TFi7aL031832@elgar.kettenis.dyndns.org><3ED66564.1020506@redhat.com><200305292222.h4TMMmGm000694@elgar.kettenis.dyndns.org><3ED693F5.9040108@redhat.com> <vt2ptm09nz9.fsf@zenia.red-bean.com><3ED7BFD1.7060902@redhat.com> <vt2y90kowlv.fsf@zenia.red-bean.com><20030603054552.GD19075@redhat.com><vt2fzmrpt9b.fsf@zenia.red-bean.com>
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