diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-11-16 19:24:05 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-11-16 19:24:05 +0000 |
commit | 56cea623828ea5eea0cc592f7f55157b4b902bb4 (patch) | |
tree | 82c70cf0ac60b3dd7337465ef6f42739d704f633 /gdb/mips-nat.c | |
parent | 719ec22109a4b447266214fadba2fbb878192c96 (diff) | |
download | gdb-56cea623828ea5eea0cc592f7f55157b4b902bb4.zip gdb-56cea623828ea5eea0cc592f7f55157b4b902bb4.tar.gz gdb-56cea623828ea5eea0cc592f7f55157b4b902bb4.tar.bz2 |
2003-11-16 Andrew Cagney <cagney@redhat.com>
* mips-tdep.c (struct gdbarch_tdep): Add field "regnum".
(mips_fpa0_regnum, mips_regnum): New function.
(mips_gdbarch_init): Fill in the "regnum" fields.
* mips-tdep.h (struct mips_regnum): Define.
(mips_regnum): Declare.
* config/mips/tm-mips.h (BADVADDR_REGNUM): Delete macro.
(LO_REGNUM, HI_REGNUM, BADVADDR_REGNUM): Ditto.
(CAUSE_REGNUM, PC_REGNUM, FP0_REGNUM): Ditto.
(FCRCS_REGNUM, FCRIR_REGNUM, FPA0_REGNUM): Ditto.
* config/mips/tm-irix6.h (FP0_REGNUM): Delete macro.
(PC_REGNUM, CAUSE_REGNUM, BADVADDR_REGNUM): Ditto.
(HI_REGNUM, LO_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): Ditto.
* config/mips/tm-irix5.h (FP0_REGNUM): Delete macro.
(PC_REGNUM, CAUSE_REGNUM, BADVADDR_REGNUM): Ditto.
(HI_REGNUM, LO_REGNUM, FCRCS_REGNUM, FCRIR_REGNUM): Ditto.
* remote-mips.c: Include "mips-tdep.h". Update.
* mipsnbsd-tdep.c: Update.
* mipsv4-nat.c: Update.
* mips-tdep.c: Update.
* mips-nat.c: Update.
* mips-linux-tdep.c: Update.
* mips-linux-nat.c: Update.
* irix5-nat.c: Update.
* dve3900-rom.c: Include "mips-tdep.h". Update.
(ignore_packet): Supress GCC warning.
* config/mips/nm-riscos.h: Update.
* Makefile.in (dve3900-rom.o, remote-mips.o): Update dependencies.
Diffstat (limited to 'gdb/mips-nat.c')
-rw-r--r-- | gdb/mips-nat.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c index 4c35986..626f770 100644 --- a/gdb/mips-nat.c +++ b/gdb/mips-nat.c @@ -55,12 +55,12 @@ static int register_ptrace_addr (int regno) { return (regno < 32 ? GPR_BASE + regno - : regno == PC_REGNUM ? PC - : regno == CAUSE_REGNUM ? CAUSE - : regno == HI_REGNUM ? MMHI - : regno == LO_REGNUM ? MMLO - : regno == FCRCS_REGNUM ? FPC_CSR - : regno == FCRIR_REGNUM ? FPC_EIR + : regno == mips_regnum (current_gdbarch)->pc ? PC + : regno == mips_regnum (current_gdbarch)->cause ? CAUSE + : regno == mips_regnum (current_gdbarch)->hi ? MMHI + : regno == mips_regnum (current_gdbarch)->lo ? MMLO + : regno == mips_regnum (current_gdbarch)->fp_control_status ? FPC_CSR + : regno == mips_regnum (current_gdbarch)->fp_implementation_revision ? FPC_EIR : regno >= FP0_REGNUM ? FPR_BASE + (regno - FP0_REGNUM) : 0); } @@ -110,8 +110,10 @@ store_inferior_registers (int regno) if (regno > 0) { if (regno == ZERO_REGNUM || regno == PS_REGNUM - || regno == BADVADDR_REGNUM || regno == CAUSE_REGNUM - || regno == FCRIR_REGNUM || regno == DEPRECATED_FP_REGNUM + || regno == mips_regnum (current_gdbarch)->badvaddr + || regno == mips_regnum (current_gdbarch)->cause + || regno == mips_regnum (current_gdbarch)->fp_implementation_revision + || regno == DEPRECATED_FP_REGNUM || (regno >= FIRST_EMBED_REGNUM && regno <= LAST_EMBED_REGNUM)) return; regaddr = register_ptrace_addr (regno); |