This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH]: Fix 68HC11 gcc/gdb register miss-match
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [PATCH]: Fix 68HC11 gcc/gdb register miss-match
- From: Stephane Carrez <Stephane dot Carrez at worldnet dot fr>
- Date: Sat, 02 Dec 2000 19:08:24 +0100
Hi!
For 68HC11 targets, there was a miss-match between Gdb register number
and Gcc register numbers. This caused local variables to be read from
the wrong register.
I've committed this patch to fix this problem.
Stephane
2000-12-03 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* m68hc11-tdep.c (SOFT_D1_REGNUM): Soft registers start at 14.
(m68hc11_register_names): Add null for register 13.
Warning: Remote host denied authentication agent forwarding.
Index: m68hc11-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68hc11-tdep.c,v
retrieving revision 1.9
diff -p -r1.9 m68hc11-tdep.c
*** m68hc11-tdep.c 2000/12/02 16:55:37 1.9
--- m68hc11-tdep.c 2000/12/02 17:01:38
*************** Foundation, Inc., 59 Temple Place - Suit
*** 67,73 ****
#define SOFT_TMP_REGNUM 10
#define SOFT_ZS_REGNUM 11
#define SOFT_XY_REGNUM 12
! #define SOFT_D1_REGNUM 13
#define SOFT_D32_REGNUM (SOFT_D1_REGNUM+31)
#define M68HC11_MAX_SOFT_REGS 32
--- 67,74 ----
#define SOFT_TMP_REGNUM 10
#define SOFT_ZS_REGNUM 11
#define SOFT_XY_REGNUM 12
! #define SOFT_UNUSED_REGNUM 13
! #define SOFT_D1_REGNUM 14
#define SOFT_D32_REGNUM (SOFT_D1_REGNUM+31)
#define M68HC11_MAX_SOFT_REGS 32
*************** static char *
*** 111,117 ****
m68hc11_register_names[] =
{
"x", "d", "y", "sp", "pc", "a", "b",
! "ccr", "z", "frame","tmp", "zs", "xy",
"d1", "d2", "d3", "d4", "d5", "d6", "d7",
"d8", "d9", "d10", "d11", "d12", "d13", "d14",
"d15", "d16", "d17", "d18", "d19", "d20", "d21",
--- 112,118 ----
m68hc11_register_names[] =
{
"x", "d", "y", "sp", "pc", "a", "b",
! "ccr", "z", "frame","tmp", "zs", "xy", 0,
"d1", "d2", "d3", "d4", "d5", "d6", "d7",
"d8", "d9", "d10", "d11", "d12", "d13", "d14",
"d15", "d16", "d17", "d18", "d19", "d20", "d21",