This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: dwarf-frame.c question
- From: Richard Henderson <rth at redhat dot com>
- To: Jim Blandy <jimb at redhat dot com>
- Cc: 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, Alexandre Oliva <aoliva at redhat dot com>
- Date: Tue, 3 Jun 2003 08:56:46 -0700
- Subject: Re: dwarf-frame.c question
- 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 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~