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: David Daney <ddaney at avtrex dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Andrew Haley <aph at redhat dot com>
- Date: Wed, 17 Sep 2003 16:21:58 -0700
- Subject: Re: RFC Patch: Fix bad eh_frame data for MIPS.
- References: <3F68D2B2.3060401@avtrex.com> <20030917224718.GB23340@redhat.com>
Richard Henderson wrote:
On Wed, Sep 17, 2003 at 02:31:30PM -0700, David Daney wrote:
* gcc/config/mips/linux.h (MD_FALLBACK_FRAME_STATE_FOR): New,
needed for mips/libgcj signal handling.
* gcc/config/mips/mips.h (DWARF_FRAME_REGNUM_FOR_INITIAL_RETURN_SAVE): New.
* gcc/dwarf2out.c (DWARF_FRAME_REGNUM_FOR_INITIAL_RETURN_SAVE): New.
* gcc/dwarf2out.c (initial_return_save): Use
DWARF_FRAME_REGNUM_FOR_INITIAL_RETURN_SAVE instead of DWARF_FRAME_REGNUM
This is wrong.
The existing DWARF_FRAME_REGNUM is completely wrong for mips.
It would seem.
After deleting that, you have a choice of:
(1) Leaving DWARF_FRAME_RETURN_COLUMN alone, and adding a
REG_FRAME_RELATED_EXPR to the insn that saves r31 on the stack.
The expression would mention (reg DWARF_FRAME_RETURN_COLUMN).
How would one go about doing that.
(2) Set
#define DWARF_FRAME_RETURN_COLUMN GP_REG_FIRST+31
This will produce smaller CFI output. I don't know if SGI's
debugger can handle overlapping r31 with the return address.
Gcc and gdb can.
The root of the original problem is that if DWARF_FRAME_RETURN_COLUMN
matched the return column (always) the needed eh_frame data was
suppresed. If we did option #2 this would be suppressed, but maybe it
would not matter because (I don't know why).
David Daney.