diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2002-11-23 19:45:12 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2002-11-23 19:45:12 +0000 |
commit | 32eeb91a760126d6e7717f0220dee3fabd31877e (patch) | |
tree | 381d2dcf673e78bdc8fff19d2b462598eb44269f /gdb/m68klinux-nat.c | |
parent | 9648bac836b757582577dd67e1faf39b465b39c4 (diff) | |
download | gdb-32eeb91a760126d6e7717f0220dee3fabd31877e.zip gdb-32eeb91a760126d6e7717f0220dee3fabd31877e.tar.gz gdb-32eeb91a760126d6e7717f0220dee3fabd31877e.tar.bz2 |
* Makefile.in (m68k_tdep_h): Define.
(abug-rom.o, cpu32bug-rom.o, dbug-rom.o, m68k-tdep.o, m68klinux-nat.o)
(remote-est.o, rom68k-rom.o): Add $(m68k_tdep_h).
* m68k-tdep.c: Move register number enum ...
* m68k-tdep.h: ... to this new file and rename the constants from
E_* to M68K_*. All uses changed.
* config/m68k/tm-m68k.h (D0_REGNUM, A0_REGNUM): Remove definitions.
* abug-rom.c: Include "m68k-tdep.h". Use
M68K_D0_REGNUM/M68K_A0_REGNUM instead of D0_REGNUM/A0_REGNUM.
* cpu32bug-rom.c: Likewise.
* dbug-rom.c: Likewise.
* m68k-tdep.c: Likewise.
* m68klinux-nat.c: Likewise.
* remote-est.c: Likewise.
* rom68k-rom.c: Likewise.
* config/m68k/tm-linux.h: Likewise.
Diffstat (limited to 'gdb/m68klinux-nat.c')
-rw-r--r-- | gdb/m68klinux-nat.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c index b206852..cf47dd1 100644 --- a/gdb/m68klinux-nat.c +++ b/gdb/m68klinux-nat.c @@ -25,8 +25,11 @@ #include "inferior.h" #include "language.h" #include "gdbcore.h" +#include "gdb_string.h" #include "regcache.h" +#include "m68k-tdep.h" + #ifdef USG #include <sys/types.h> #endif @@ -51,7 +54,6 @@ #include "target.h" - /* This table must line up with REGISTER_NAMES in tm-m68k.h */ static const int regmap[] = { @@ -78,7 +80,7 @@ getregs_supplies (int regno) int getfpregs_supplies (int regno) { - return FP0_REGNUM <= regno && regno <= FPI_REGNUM; + return FP0_REGNUM <= regno && regno <= M68K_FPI_REGNUM; } /* Does the current host support the GETREGS request? */ @@ -275,7 +277,7 @@ supply_gregset (elf_gregset_t *gregsetp) elf_greg_t *regp = (elf_greg_t *) gregsetp; int regi; - for (regi = D0_REGNUM; regi <= SP_REGNUM; regi++) + for (regi = M68K_D0_REGNUM; regi <= SP_REGNUM; regi++) supply_register (regi, (char *) ®p[regmap[regi]]); supply_register (PS_REGNUM, (char *) ®p[PT_SR]); supply_register (PC_REGNUM, (char *) ®p[PT_PC]); @@ -359,11 +361,11 @@ supply_fpregset (elf_fpregset_t *fpregsetp) { int regi; - for (regi = FP0_REGNUM; regi < FPC_REGNUM; regi++) + for (regi = FP0_REGNUM; regi < FP0_REGNUM + 8; regi++) supply_register (regi, FPREG_ADDR (fpregsetp, regi - FP0_REGNUM)); - supply_register (FPC_REGNUM, (char *) &fpregsetp->fpcntl[0]); - supply_register (FPS_REGNUM, (char *) &fpregsetp->fpcntl[1]); - supply_register (FPI_REGNUM, (char *) &fpregsetp->fpcntl[2]); + supply_register (M68K_FPC_REGNUM, (char *) &fpregsetp->fpcntl[0]); + supply_register (M68K_FPS_REGNUM, (char *) &fpregsetp->fpcntl[1]); + supply_register (M68K_FPI_REGNUM, (char *) &fpregsetp->fpcntl[2]); } /* Fill register REGNO (if it is a floating-point register) in @@ -381,9 +383,9 @@ fill_fpregset (elf_fpregset_t *fpregsetp, int regno) regcache_collect (regno, FPREG_ADDR (fpregsetp, regno - FP0_REGNUM)); /* Fill in the floating-point control registers. */ - for (i = FPC_REGNUM; i <= FPI_REGNUM; i++) + for (i = M68K_FPC_REGNUM; i <= M68K_FPI_REGNUM; i++) if (regno == -1 || regno == i) - regcache_collect (regno, (char *) &fpregsetp->fpcntl[regno - FPC_REGNUM]); + regcache_collect (regno, (char *) &fpregsetp->fpcntl[regno - M68K_FPC_REGNUM]); } #ifdef HAVE_PTRACE_GETREGS |