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]

wrong stabs offsets for invisible-reference arguments on mips eabi


GCC does not apply DEBUGGER_ARG_OFFSET to an argument passed by
invisible-reference when the home of the reference is a stack slot.
This breaks some mips debuggers, GDB included.

This patch fixes this problem.  I'm tempted to put it in as obviously
correct, but...  Ok to install?  Tested with a Red Hat-internal
variant of mips-elf that uses eabi.

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* dbxout.c (dbxout_parms): Apply DEBUGGER_ARG_OFFSET to parameters
	passed by invisible reference.

Index: gcc/dbxout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dbxout.c,v
retrieving revision 1.116
diff -u -p -r1.116 dbxout.c
--- gcc/dbxout.c 2002/01/26 02:38:53 1.116
+++ gcc/dbxout.c 2002/01/31 04:23:06
@@ -2630,6 +2630,10 @@ dbxout_parms (parms)
 	      
 	    FORCE_TEXT;
 	    fprintf (asmfile, "%s\"%s:v", ASM_STABS_OP, decl_name);
+
+	    current_sym_value
+	      = DEBUGGER_ARG_OFFSET (current_sym_value,
+				     XEXP (XEXP (DECL_RTL (parms), 0), 0));
 	    dbxout_type (TREE_TYPE (parms), 0);
 	    dbxout_finish_symbol (parms);
 	  }

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

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