diff options
-rw-r--r-- | gdb/remote-rdi.c | 15 | ||||
-rw-r--r-- | gdb/remote-rdp.c | 22 |
2 files changed, 20 insertions, 17 deletions
diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c index c707eb2..db51dcb 100644 --- a/gdb/remote-rdi.c +++ b/gdb/remote-rdi.c @@ -36,6 +36,7 @@ #include "breakpoint.h" #include "completer.h" #include "regcache.h" +#include "arm-tdep.h" #ifdef USG #include <sys/types.h> @@ -470,7 +471,7 @@ arm_rdi_resume (ptid_t ptid, int step, enum target_signal siggnal) if (step) { - pc = read_register (PC_REGNUM); + pc = read_register (ARM_PC_REGNUM); pc = arm_get_next_pc (pc); arm_rdi_insert_breakpoint (pc, handle); } @@ -551,14 +552,14 @@ arm_rdi_fetch_registers (int regno) supply_register (regno, (char *) cookedreg); } store_unsigned_integer (cookedreg, 4, rawregs[15]); - supply_register (PS_REGNUM, (char *) cookedreg); - arm_rdi_fetch_registers (PC_REGNUM); + supply_register (ARM_PS_REGNUM, (char *) cookedreg); + arm_rdi_fetch_registers (ARM_PC_REGNUM); } else { - if (regno == PC_REGNUM) + if (regno == ARM_PC_REGNUM) rdi_regmask = RDIReg_PC; - else if (regno == PS_REGNUM) + else if (regno == ARM_PS_REGNUM) rdi_regmask = RDIReg_CPSR; else if (regno < 0 || regno > 15) { @@ -607,9 +608,9 @@ arm_rdi_store_registers (int regno) /* RDI manipulates data in host byte order, so convert now. */ store_unsigned_integer (rawerreg, 4, rawreg[0]); - if (regno == PC_REGNUM) + if (regno == ARM_PC_REGNUM) rdi_regmask = RDIReg_PC; - else if (regno == PS_REGNUM) + else if (regno == ARM_PS_REGNUM) rdi_regmask = RDIReg_CPSR; else if (regno < 0 || regno > 15) return; diff --git a/gdb/remote-rdp.c b/gdb/remote-rdp.c index bb602cd..2f9183a 100644 --- a/gdb/remote-rdp.c +++ b/gdb/remote-rdp.c @@ -52,6 +52,8 @@ #include "regcache.h" #include "serial.h" +#include "arm-tdep.h" + #ifdef HAVE_TIME_H #include <time.h> #endif @@ -613,14 +615,14 @@ remote_rdp_fetch_register (int regno) char buf[MAX_REGISTER_RAW_SIZE]; if (regno < 15) rdp_fetch_one_register (1 << regno, buf); - else if (regno == PC_REGNUM) + else if (regno == ARM_PC_REGNUM) rdp_fetch_one_register (RDP_CPU_READWRITE_MASK_PC, buf); - else if (regno == PS_REGNUM) + else if (regno == ARM_PS_REGNUM) rdp_fetch_one_register (RDP_CPU_READWRITE_MASK_CPSR, buf); - else if (regno == FPS_REGNUM) + else if (regno == ARM_FPS_REGNUM) rdp_fetch_one_fpu_register (RDP_FPU_READWRITE_MASK_FPS, buf); - else if (regno >= F0_REGNUM && regno <= F7_REGNUM) - rdp_fetch_one_fpu_register (1 << (regno - F0_REGNUM), buf); + else if (regno >= ARM_F0_REGNUM && regno <= ARM_F7_REGNUM) + rdp_fetch_one_fpu_register (1 << (regno - ARM_F0_REGNUM), buf); else { printf ("Help me with fetch reg %d\n", regno); @@ -644,12 +646,12 @@ remote_rdp_store_register (int regno) read_register_gen (regno, tmp); if (regno < 15) rdp_store_one_register (1 << regno, tmp); - else if (regno == PC_REGNUM) + else if (regno == ARM_PC_REGNUM) rdp_store_one_register (RDP_CPU_READWRITE_MASK_PC, tmp); - else if (regno == PS_REGNUM) + else if (regno == ARM_PS_REGNUM) rdp_store_one_register (RDP_CPU_READWRITE_MASK_CPSR, tmp); - else if (regno >= F0_REGNUM && regno <= F7_REGNUM) - rdp_store_one_fpu_register (1 << (regno - F0_REGNUM), tmp); + else if (regno >= ARM_F0_REGNUM && regno <= ARM_F7_REGNUM) + rdp_store_one_fpu_register (1 << (regno - ARM_F0_REGNUM), tmp); else { printf ("Help me with reg %d\n", regno); @@ -1092,7 +1094,7 @@ rdp_step (void) else { char handle[4]; - CORE_ADDR pc = read_register (PC_REGNUM); + CORE_ADDR pc = read_register (ARM_PC_REGNUM); pc = arm_get_next_pc (pc); remote_rdp_insert_breakpoint (pc, handle); rdp_execute (); |