This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC Patch: Fix bad eh_frame data for MIPS.


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.

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).

 (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.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]