This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC Patch: Fix bad eh_frame data for MIPS.
- From: Richard Henderson <rth at redhat dot com>
- To: David Daney <ddaney at avtrex dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Andrew Haley <aph at redhat dot com>
- Date: Thu, 18 Sep 2003 11:31:08 -0700
- Subject: Re: RFC Patch: Fix bad eh_frame data for MIPS.
- References: <3F68D2B2.3060401@avtrex.com> <20030917224718.GB23340@redhat.com> <3F69F67A.5020304@avtrex.com>
> Doing this will fail in the case of a leaf function where r31 is not
> saved on the stack.
No it won't. Have you tried it? It works just fine on alpha and powerpc.
> When unwinding through a signal handler we must restore all the
> registers (including r31) however if we use r31 as the
> DWARF_FRAME_RETURN_COLUMN then it must have the value of the return
> address from the signal handler (i.e. the address of the faulting
> instruction). Unwinding then fails in the leaf function because r31 has
> the wrong value.
Note that the frame return column can be different for *every* frame.
Note that MD_FALLBACK_FRAME_STATE_FOR for alpha-linux does *not* use
column 26 for the return address.
> It seems that initial_return_save in the REG case is writing a mapping
> of the "real return address register"-> DWARF_FRAME_RETURN_COLUMN into
> the CIE. If this is true, then reg must be the real register number,
> not the DWARF_FRAME_REGNUM.
You should know that a good part of what DWARF_FRAME_REGNUM does
is map gcc register numbers to dwarf2 register numbers. There is
not always a 1-1 correspondence. Thus removing it would be wrong.
It should *not* be used for mapping a hard register onto the
frame return column.
r~