This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH/RFA] remoute-hms.c: start multiarching
- From: Andrew Volkov <Andrew dot Volkov at transas dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 16 May 2002 20:02:49 +0400
- Subject: [PATCH/RFA] remoute-hms.c: start multiarching
Hi,
this patch just part multi-arching h8300.
gdb/remote-hms: removed references to static array of register
names,
and changed literal reg numbers to REGNUMS.
Andrey
2002-05-16 Andrey Volkov <avolkov@sources.redhat.com>
* remote-hms.c : prepare to multiarhing
(add #if-else-endif for GDB_MULTI_ARCH)
*** ./remote-hms.c Thu May 16 19:38:18 2002
--- multi-arch/remote-hms.c Sat Jan 26 02:49:38 2002
*************** hms_supply_register (char *regname, int
*** 51,57 ****
--- 51,61 ----
while (*val != '=' && *val)
val++;
+ #if GDB_MULTI_ARCH != 0
+ for (regno = R0_REGNUM; regno < R7_REGNUM; regno++)
+ #else
for (regno = 0; regno < 7; regno++)
+ #endif
{
val = monitor_supply_register (regno, val + 1);
}
*************** hms_supply_register (char *regname, int
*** 64,73 ****
* registers either. So, typing "info reg sp" becomes a "r30".
*/
! static char *hms_regnames[NUM_REGS] =
! {
"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", "CCR", "PC"
! };
/*
* Define the monitor command strings. Since these are passed directly
--- 68,79 ----
* registers either. So, typing "info reg sp" becomes a "r30".
*/
! #if GDB_MULTI_ARCH == 0
! static char *hms_regnames[NUM_REGS] =
! {
"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", "CCR", "PC"
! };
! #endif
/*
* Define the monitor command strings. Since these are passed directly
*************** init_hms_cmds (void)
*** 128,134 ****
--- 134,144 ----
hms_cmds.cmd_end = NULL; /* optional command terminator */
hms_cmds.target = &hms_ops; /* target operations */
hms_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
+
+ #if GDB_MULTI_ARCH == 0
hms_cmds.regnames = hms_regnames; /* registers names */
+ #endif
+
hms_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
} /* init_hms-cmds */