[PATCH/RFC/RFA] remoute-e7000.c start h8300 multi-arching
Andrew Volkov
Andrew.Volkov@transas.com
Thu May 16 10:20:00 GMT 2002
Hi,
In this patch nearly all h8300 parts are multiarhing.
Also removed use of depricated NUM_REALREGS and change
literal reg. no. to REGNUMS
Andrey
2002-05-16 Andrey Volkov <avolkov@sources.redhat.com>
* gdb/remote-e7000.c: multi-arched h8300 part
remove depricated NUM_REALREGS
--- gdb.old/gdb/remote-e7000.c Mon Apr 15 05:50:45 2002
+++ gdb/gdb/remote-e7000.c Thu May 16 20:54:52 2002
@@ -660,7 +660,9 @@
serial_raw (e7000_desc);
#ifdef GDB_TARGET_IS_H8300
- h8300hmode = 1;
+ #if GDB_MULTI_ARCH == 0
+ h8300hmode = 1;
+ #endif
#endif
/* Start the remote connection; if error (0), discard this target.
@@ -914,7 +916,11 @@
#ifdef GDB_TARGET_IS_H8300
if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300)
{
+#if GDB_MULTI_ARCH == 0
if (h8300smode)
+#else
+ if (TARGET_ARCHITECTURE->mach == bfd_mach_h8300s)
+#endif
wanted = want_h8300s;
else
wanted = want_h8300h;
@@ -924,7 +930,11 @@
fetch_regs_from_dump (gch, wanted);
/* And supply the extra ones the simulator uses */
+#if GDB_MULTI_ARCH != 0
+ for (regno = NUM_REGS; regno < NUM_REGS + NUM_PSEUDO_REGS; regno++)
+#else
for (regno = NUM_REALREGS; regno < NUM_REGS; regno++)
+#endif
{
int buf = 0;
@@ -948,7 +958,11 @@
{
int regno;
+#if GDB_MULTI_ARCH != 0
+ for (regno = 0; regno < NUM_REGS; regno++)
+#else
for (regno = 0; regno < NUM_REALREGS; regno++)
+#endif
e7000_store_register (regno);
registers_changed ();
@@ -969,7 +983,11 @@
if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300)
{
+#if GDB_MULTI_ARCH != 0
+ if (regno >= R0_REGNUM && regno <= R7_REGNUM)
+#else
if (regno <= 7)
+#endif
{
sprintf (buf, ".ER%d %s\r", regno, phex_nz (read_register (regno),
0));
puts_e7000debug (buf);
@@ -2051,7 +2069,11 @@
#ifdef GDB_TARGET_IS_H8300
if (TARGET_ARCHITECTURE->arch == bfd_arch_h8300)
{
+ #if GDB_MULTI_ARCH == 0
if (h8300smode)
+ #else
+ if (TARGET_ARCHITECTURE->mach == bfd_mach_h8300s)
+ #endif
wanted_nopc = want_nopc_h8300s;
else
wanted_nopc = want_nopc_h8300h;
@@ -2060,7 +2082,11 @@
fetch_regs_from_dump (gch, wanted_nopc);
/* And supply the extra ones the simulator uses */
+#if GDB_MULTI_ARCH != 0
+ for (regno = NUM_REGS; regno < NUM_REGS + NUM_PSEUDO_REGS; regno++)
+#else
for (regno = NUM_REALREGS; regno < NUM_REGS; regno++)
+#endif
{
int buf = 0;
supply_register (regno, (char *) &buf);
More information about the Gdb-patches
mailing list