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]

mn10300 register numbering in debugging info


In late August, 2000, we noticed there was a mismatch between the
register numbering emitted by GCC in debugging info and the register
numbering expected by GDB.  It was decided that the best course of
action was to adjust GCC, since it had never been right in the first
place.  Matsushita disagreed, since their own debugger already used
the debugging info as we used to emit, and they've asked us to revert
to the original numbering, and fix GDB instead.  So, I'm reverting the
patch I checked in on August 26, 2000.  While I was at it, I found an
unrelated small formatting change in my local tree, and decided to
check it in along with it.  Mainline and 3.0 branch.

A patch for GDB so that it matches GCC's register numbering is still
under development, but I wanted to check this in as soon as possible,
to not take the risk of a GCC 3.0 freeze or something.

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

	* config/mn10300/mn10300.h (DBX_REGISTER_NUMBER): Reverted
	2000-08-26's patch.
	(EXTRA_CONSTRAINT): Formatting changes.

Index: gcc/config/mn10300/mn10300.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.h,v
retrieving revision 1.42
diff -u -p -r1.42 mn10300.h
--- gcc/config/mn10300/mn10300.h 2001/01/01 20:35:33 1.42
+++ gcc/config/mn10300/mn10300.h 2001/02/24 04:09:03
@@ -698,7 +698,9 @@ struct cum_arg {int nbytes; };
 	    && INT_8_BITS (INTVAL (XEXP (XEXP (OP, 0), 1))))))
 	 
 #define EXTRA_CONSTRAINT(OP, C) \
- ((C) == 'R' ? OK_FOR_R (OP) : (C) == 'S' ? GET_CODE (OP) == SYMBOL_REF : 0)
+ ((C) == 'R' ? OK_FOR_R (OP) \
+  : (C) == 'S' ? GET_CODE (OP) == SYMBOL_REF \
+  : 0)
 
 /* Maximum number of registers that can appear in a valid memory address.  */
 
@@ -1049,12 +1051,7 @@ do { char dstr[30];					\
 
 #define DWARF2_ASM_LINE_DEBUG_INFO 1
 
-#define DBX_REGISTER_NUMBER(REGNO) \
-  (REGNO_DATA_P ((REGNO)) ? (0 + (REGNO) - FIRST_DATA_REGNUM) \
-   : REGNO_ADDRESS_P ((REGNO)) ? (4 + (REGNO) - FIRST_ADDRESS_REGNUM) \
-   : REGNO_SP_P ((REGNO)) ? 8 \
-   : REGNO_EXTENDED_P ((REGNO)) ? (15 + (REGNO) - FIRST_EXTENDED_REGNUM) \
-   : -1)
+#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
 
 /* GDB always assumes the current function's frame begins at the value
    of the stack pointer upon entry to the current function.  Accessing

-- 
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    *Please* write to mailing lists, not to me

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