This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa/6.0] Better handle unspecified CFI values
- From: Richard Henderson <rth at redhat dot com>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 7 Sep 2003 14:17:48 -0700
- Subject: Re: [rfa/6.0] Better handle unspecified CFI values
- References: <3F593115.4030407@redhat.com>
On Fri, Sep 05, 2003 at 08:57:57PM -0400, Andrew Cagney wrote:
> + /* Can things get worse? Yep! One of the registers GCC
> + forgot to provide unwind information for was the stack
> + pointer. Outch! GCC appears to assumes that the CFA
> + address can be used - after all it points to the inner
> + most address of the previous frame before the function
> + call and that's always the same as the stack pointer on
> + return, right?
Yes, gcc does assume the CFA can be used, except when there is
a CFI entry for the stack pointer. See s390 for this case.
> Wrong. See GCC's i386 STDCALL option for
> + an ABI that has a different entry and return stack
Indeed, this is a problem. Please file a gcc pr for this. We
should be generating an entry for the stack pointer in this case.
We probably don't see the bug in gcc's unwinding for exception
handling because we also apply the fixup for DW_CFA_GNU_args_size,
since we're not unwinding to the call site exactly, but rather to
the handler within the function.
r~