From a0a6fdc8b629d4b5256b7d57ea1e0a49f7e0146c Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sat, 26 Aug 2000 21:47:21 +0000 Subject: [PATCH] mn10300.h (DBX_REGISTER_NUMBER): Remap register numbers to the ranges used by GDB. * config/mn10300/mn10300.h (DBX_REGISTER_NUMBER): Remap register numbers to the ranges used by GDB. From-SVN: r36001 --- gcc/ChangeLog | 5 +++++ gcc/config/mn10300/mn10300.h | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4a3bc018e57..0e1a54f8758 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-08-26 Alexandre Oliva + + * config/mn10300/mn10300.h (DBX_REGISTER_NUMBER): Remap register + numbers to the ranges used by GDB. + 2000-08-25 Richard Henderson * config/ia64/ia64.h (struct machine_function): Add n_varargs. diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h index 606f6f77468..53c51ca82e9 100644 --- a/gcc/config/mn10300/mn10300.h +++ b/gcc/config/mn10300/mn10300.h @@ -1042,7 +1042,12 @@ do { char dstr[30]; \ #define DWARF2_ASM_LINE_DEBUG_INFO 1 -#define DBX_REGISTER_NUMBER(REGNO) REGNO +#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) /* GDB always assumes the current function's frame begins at the value of the stack pointer upon entry to the current function. Accessing