diff options
author | Yoshinori Sato <ysato@users.sourceforge.jp> | 2005-02-16 03:21:03 +0000 |
---|---|---|
committer | Yoshinori Sato <ysato@users.sourceforge.jp> | 2005-02-16 03:21:03 +0000 |
commit | 7124f6fbb462b50a4b17c2bd4e0e08df1efd3ad8 (patch) | |
tree | f8dae3a5729896af667d06e3ce4674726a3c4756 | |
parent | 5ff625e9757a8839b58ee06e09844dc97b6c23d4 (diff) | |
download | gdb-7124f6fbb462b50a4b17c2bd4e0e08df1efd3ad8.zip gdb-7124f6fbb462b50a4b17c2bd4e0e08df1efd3ad8.tar.gz gdb-7124f6fbb462b50a4b17c2bd4e0e08df1efd3ad8.tar.bz2 |
* remote-e7000.c: unuse TM_FILE defined macro.
(e7000_fetch_registers)
(e7000_store_registers)
(e7000_wait): delete NUM_REALREGS.
* remote-hms.c: move TM_FILE macro.
(CCR_REGNO): move define from tm-h8300.h.
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/remote-e7000.c | 24 | ||||
-rw-r--r-- | gdb/remote-hms.c | 2 |
3 files changed, 32 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e1faf82..6493af4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2005-02-16 Yoshinori Sato <ysato@users.sourceforge.jp> + + * remote-e7000.c: unuse TM_FILE defined macro. + (e7000_fetch_registers) + (e7000_store_registers) + (e7000_wait): delete NUM_REALREGS. + * remote-hms.c: move TM_FILE macro. + (CCR_REGNO): move define from tm-h8300.h. + 2005-02-15 Mark Kettenis <kettenis@gnu.org> * amd64-linux-tdep.c: Update copyright year. diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c index 0848c8c..d3b42f4 100644 --- a/gdb/remote-e7000.c +++ b/gdb/remote-e7000.c @@ -893,12 +893,14 @@ e7000_fetch_registers (void) { int regno; char *wanted = NULL; + int realregs = 0; puts_e7000debug ("R\r"); if (TARGET_ARCHITECTURE->arch == bfd_arch_sh) { wanted = want_sh; + realregs = 59; switch (TARGET_ARCHITECTURE->mach) { case bfd_mach_sh3: @@ -910,6 +912,7 @@ e7000_fetch_registers (void) if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300) { wanted = want_h8300h; + realregs = 10; switch (TARGET_ARCHITECTURE->mach) { case bfd_mach_h8300s: @@ -917,13 +920,14 @@ e7000_fetch_registers (void) case bfd_mach_h8300sx: case bfd_mach_h8300sxn: wanted = want_h8300s; + realregs = 11; } } fetch_regs_from_dump (gch, wanted); /* And supply the extra ones the simulator uses */ - for (regno = NUM_REALREGS; regno < NUM_REGS; regno++) + for (regno = realregs; regno < NUM_REGS; regno++) { int buf = 0; @@ -946,8 +950,18 @@ static void e7000_store_registers (void) { int regno; + int realregs = 0; - for (regno = 0; regno < NUM_REALREGS; regno++) + if (TARGET_ARCHITECTURE->arch == bfd_arch_sh) + realregs = 59; + if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300) { + realregs = ((TARGET_ARCHITECTURE->mach == bfd_mach_h8300s || + TARGET_ARCHITECTURE->mach == bfd_mach_h8300sn || + TARGET_ARCHITECTURE->mach == bfd_mach_h8300sx || + TARGET_ARCHITECTURE->mach == bfd_mach_h8300sxn) ? 11 : 10); + } + + for (regno = 0; regno < realregs; regno++) e7000_store_register (regno); registers_changed (); @@ -1998,6 +2012,7 @@ e7000_wait (ptid_t ptid, struct target_waitstatus *status) int had_sleep = 0; int loop = 1; char *wanted_nopc = NULL; + int realregs = 0; /* Then echo chars until PC= string seen */ gch (); /* Drop cr */ @@ -2039,6 +2054,7 @@ e7000_wait (ptid_t ptid, struct target_waitstatus *status) if (TARGET_ARCHITECTURE->arch == bfd_arch_sh) { wanted_nopc = want_nopc_sh; + realregs = 59; switch (TARGET_ARCHITECTURE->mach) { case bfd_mach_sh3: @@ -2050,6 +2066,7 @@ e7000_wait (ptid_t ptid, struct target_waitstatus *status) if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300) { wanted_nopc = want_nopc_h8300h; + realregs = 10; switch (TARGET_ARCHITECTURE->mach) { case bfd_mach_h8300s: @@ -2057,12 +2074,13 @@ e7000_wait (ptid_t ptid, struct target_waitstatus *status) case bfd_mach_h8300sx: case bfd_mach_h8300sxn: wanted_nopc = want_nopc_h8300s; + realregs = 11; } } fetch_regs_from_dump (gch, wanted_nopc); /* And supply the extra ones the simulator uses */ - for (regno = NUM_REALREGS; regno < NUM_REGS; regno++) + for (regno = realregs; regno < NUM_REGS; regno++) { int buf = 0; regcache_raw_supply (current_regcache, regno, (char *) &buf); diff --git a/gdb/remote-hms.c b/gdb/remote-hms.c index 7567486..2b21860 100644 --- a/gdb/remote-hms.c +++ b/gdb/remote-hms.c @@ -28,6 +28,8 @@ #include "serial.h" #include "regcache.h" +#define CCR_REGNUM 8 + static void hms_open (char *args, int from_tty); static void hms_supply_register (char *regname, int regnamelen, char *val, int vallen) |