aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1998-12-10 23:07:24 +0000
committerAndrew Cagney <cagney@redhat.com>1998-12-10 23:07:24 +0000
commitd70a61e74c649e3b3d64b821f5f5415e45febaf4 (patch)
treeb07faa38ea128606f29277767e5bc616ad727b10
parent986b3b988a0d2418ced8f7d75158624673481b83 (diff)
downloadgdb-d70a61e74c649e3b3d64b821f5f5415e45febaf4.zip
gdb-d70a61e74c649e3b3d64b821f5f5415e45febaf4.tar.gz
gdb-d70a61e74c649e3b3d64b821f5f5415e45febaf4.tar.bz2
CARP:
More replace reg_name[] with REGISTER_NAME().
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/alpha-nat.c2
-rw-r--r--gdb/altos-xdep.c4
-rw-r--r--gdb/arm-xdep.c4
-rw-r--r--gdb/core-aout.c2
-rw-r--r--gdb/gdbtk-cmds.c18
-rw-r--r--gdb/hppab-nat.c4
-rw-r--r--gdb/hppah-nat.c4
-rw-r--r--gdb/i386gnu-nat.c12
-rw-r--r--gdb/mips-nat.c2
-rw-r--r--gdb/mipsm3-nat.c2
-rw-r--r--gdb/parse.c6
-rw-r--r--gdb/pyr-tdep.c94
-rw-r--r--gdb/pyr-xdep.c10
-rw-r--r--gdb/remote-os9k.c4
-rw-r--r--gdb/remote-st.c2
-rw-r--r--gdb/tahoe-tdep.c14
-rw-r--r--gdb/ultra3-nat.c10
-rwxr-xr-xgdb/v850ice.c6
-rw-r--r--gdb/vax-tdep.c14
20 files changed, 115 insertions, 107 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d607c5d..a36e0be 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+Fri Dec 11 09:52:04 1998 Andrew Cagney <cagney@chook>
+
+ * gdbtk-cmds.c, mipsm3-nat.c, hppah-nat.c, infptrace.c,
+ i386gnu-nat.c, hppab-nat.c, core-aout.c, arm-xdep.c, alpha-nat.c,
+ altos-xdep.c, pyr-xdep.c, remote-st.c, remote-os9k.c,
+ tahoe-tdep.c, pyr-tdep.c, v850ice.c, vax-tdep.c: Replace reg_name
+ with REGISTER_NAME.
+
Thu Dec 10 15:19:40 1998 David Taylor <taylor@texas.cygnus.com>
The following changes were made by Jim Blandy <jimb@cygnus.com>,
diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c
index 4f95200..59bd0d8 100644
--- a/gdb/alpha-nat.c
+++ b/gdb/alpha-nat.c
@@ -133,7 +133,7 @@ fetch_osf_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
}
if (bad_reg >= 0)
{
- error ("Register %s not found in core file.", reg_names[bad_reg]);
+ error ("Register %s not found in core file.", REGISTER_NAME (bad_reg));
}
}
diff --git a/gdb/altos-xdep.c b/gdb/altos-xdep.c
index e7b652c..5727332 100644
--- a/gdb/altos-xdep.c
+++ b/gdb/altos-xdep.c
@@ -136,10 +136,10 @@ core_file_command (filename, from_tty)
if (val < 0
|| (val = myread (corechan, buf, sizeof buf)) < 0)
{
- char * buffer = (char *) alloca (strlen (reg_names[regno])
+ char * buffer = (char *) alloca (strlen (REGISTER_NAME (regno))
+ 30);
strcpy (buffer, "Reading register ");
- strcat (buffer, reg_names[regno]);
+ strcat (buffer, REGISTER_NAME (regno));
perror_with_name (buffer);
}
diff --git a/gdb/arm-xdep.c b/gdb/arm-xdep.c
index 5fdc3e1..f0d806e 100644
--- a/gdb/arm-xdep.c
+++ b/gdb/arm-xdep.c
@@ -246,10 +246,10 @@ core_file_command (filename, from_tty)
if (val < 0
|| (val = myread (corechan, buf, sizeof buf)) < 0)
{
- char * buffer = (char *) alloca (strlen (reg_names[regno])
+ char * buffer = (char *) alloca (strlen (REGISTER_NAME (regno))
+ 30);
strcpy (buffer, "Reading register ");
- strcat (buffer, reg_names[regno]);
+ strcat (buffer, REGISTER_NAME (regno));
perror_with_name (buffer);
}
diff --git a/gdb/core-aout.c b/gdb/core-aout.c
index 49cab63..3c1d499 100644
--- a/gdb/core-aout.c
+++ b/gdb/core-aout.c
@@ -104,7 +104,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
}
if (bad_reg >= 0)
- error ("Register %s not found in core file.", reg_names[bad_reg]);
+ error ("Register %s not found in core file.", REGISTER_NAME (bad_reg));
}
diff --git a/gdb/gdbtk-cmds.c b/gdb/gdbtk-cmds.c
index 52f25c2..7001d06 100644
--- a/gdb/gdbtk-cmds.c
+++ b/gdb/gdbtk-cmds.c
@@ -1535,17 +1535,17 @@ map_arg_registers (objc, objv, func, argp)
int regnum;
/* Note that the test for a valid register must include checking the
- reg_names array because NUM_REGS may be allocated for the union of the
- register sets within a family of related processors. In this case, the
- trailing entries of reg_names will change depending upon the particular
- processor being debugged. */
+ REGISTER_NAME because NUM_REGS may be allocated for the union of
+ the register sets within a family of related processors. In this
+ case, some entries of REGISTER_NAME will change depending upon
+ the particular processor being debugged. */
if (objc == 0) /* No args, just do all the regs */
{
for (regnum = 0;
regnum < NUM_REGS
- && reg_names[regnum] != NULL
- && *reg_names[regnum] != '\000';
+ && REGISTER_NAME (regnum) != NULL
+ && *REGISTER_NAME (regnum) != '\000';
regnum++)
func (regnum, argp);
@@ -1563,8 +1563,8 @@ map_arg_registers (objc, objv, func, argp)
if (regnum >= 0
&& regnum < NUM_REGS
- && reg_names[regnum] != NULL
- && *reg_names[regnum] != '\000')
+ && REGISTER_NAME (regnum) != NULL
+ && *REGISTER_NAME (regnum) != '\000')
func (regnum, argp);
else
{
@@ -1598,7 +1598,7 @@ get_register_name (regnum, argp)
void *argp; /* Ignored */
{
Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
- Tcl_NewStringObj (reg_names[regnum], -1));
+ Tcl_NewStringObj (REGISTER_NAME (regnum), -1));
}
/* This implements the tcl command gdb_fetch_registers
diff --git a/gdb/hppab-nat.c b/gdb/hppab-nat.c
index 57360f3..52ce1fd 100644
--- a/gdb/hppab-nat.c
+++ b/gdb/hppab-nat.c
@@ -74,7 +74,7 @@ fetch_register (regno)
kernel doesn't let us at the registers. */
char *err = safe_strerror (errno);
char *msg = alloca (strlen (err) + 128);
- sprintf (msg, "reading register %s: %s", reg_names[regno], err);
+ sprintf (msg, "reading register %s: %s", REGISTER_NAME (regno), err);
warning (msg);
goto error_exit;
}
@@ -143,7 +143,7 @@ store_inferior_registers (regno)
char *err = safe_strerror (errno);
char *msg = alloca (strlen (err) + 128);
sprintf (msg, "writing register %s: %s",
- reg_names[regno], err);
+ REGISTER_NAME (regno), err);
warning (msg);
return;
}
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c
index 19e0205..d9210d5 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -91,7 +91,7 @@ store_inferior_registers (regno)
char *err = safe_strerror (errno);
char *msg = alloca (strlen (err) + 128);
sprintf (msg, "writing register %s: %s",
- reg_names[regno], err);
+ REGISTER_NAME (regno), err);
warning (msg);
return;
}
@@ -131,7 +131,7 @@ fetch_register (regno)
kernel doesn't let us at the registers. */
char *err = safe_strerror (errno);
char *msg = alloca (strlen (err) + 128);
- sprintf (msg, "reading register %s: %s", reg_names[regno], err);
+ sprintf (msg, "reading register %s: %s", REGISTER_NAME (regno), err);
warning (msg);
goto error_exit;
}
diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c
index 74a1c73..6ed92c1 100644
--- a/gdb/i386gnu-nat.c
+++ b/gdb/i386gnu-nat.c
@@ -95,10 +95,10 @@ gnu_fetch_registers (int reg)
if (! state)
warning ("Couldn't fetch register %s from %s (invalid thread).",
- reg_names[reg], proc_string (thread));
+ REGISTER_NAME (reg), proc_string (thread));
else if (reg >= 0)
{
- proc_debug (thread, "fetching register: %s", reg_names[reg]);
+ proc_debug (thread, "fetching register: %s", REGISTER_NAME (reg));
supply_register (reg, REG_ADDR(state, reg));
thread->fetched_regs |= (1 << reg);
}
@@ -132,7 +132,7 @@ gnu_store_registers (reg)
if (! thread)
error ("store inferior registers: %d: Invalid thread", inferior_pid);
- proc_debug (thread, "storing register %s.", reg_names[reg]);
+ proc_debug (thread, "storing register %s.", REGISTER_NAME (reg));
was_aborted = thread->aborted;
was_valid = thread->state_valid;
@@ -143,7 +143,7 @@ gnu_store_registers (reg)
if (! state)
warning ("Couldn't store register %s from %s (invalid thread).",
- reg_names[reg], proc_string (thread));
+ REGISTER_NAME (reg), proc_string (thread));
else
{
if (! was_aborted && was_valid)
@@ -158,7 +158,7 @@ gnu_store_registers (reg)
/* Register CHECK_REG has changed! Ack! */
{
warning ("Register %s changed after thread was aborted.",
- reg_names [check_reg]);
+ REGISTER_NAME (check_reg));
if (reg >= 0 && reg != check_reg)
/* Update gdb's copy of the register. */
supply_register (check_reg, REG_ADDR (state, check_reg));
@@ -169,7 +169,7 @@ gnu_store_registers (reg)
if (reg >= 0)
{
- proc_debug (thread, "storing register: %s", reg_names[reg]);
+ proc_debug (thread, "storing register: %s", REGISTER_NAME (reg));
STORE_REGS (state, reg, 1);
}
else
diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c
index 1764676..9f57174 100644
--- a/gdb/mips-nat.c
+++ b/gdb/mips-nat.c
@@ -201,7 +201,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
}
if (bad_reg >= 0)
{
- error ("Register %s not found in core file.", reg_names[bad_reg]);
+ error ("Register %s not found in core file.", REGISTER_NAME (bad_reg));
}
supply_register (ZERO_REGNUM, zerobuf);
/* Frame ptr reg must appear to be 0; it is faked by stack handling code. */
diff --git a/gdb/mipsm3-nat.c b/gdb/mipsm3-nat.c
index b7359ba..089ecd6 100644
--- a/gdb/mipsm3-nat.c
+++ b/gdb/mipsm3-nat.c
@@ -314,7 +314,7 @@ store_inferior_registers (regno)
regno == FCRIR_REGNUM)
{
message ("You can not alter read-only register `%s'",
- reg_names[ regno ]);
+ REGISTER_NAME ( regno ));
fetch_inferior_registers (regno);
return;
}
diff --git a/gdb/parse.c b/gdb/parse.c
index bd74ecd..f90cece 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -107,9 +107,9 @@ unsigned num_std_regs = (sizeof std_regs / sizeof std_regs[0]);
#endif
-/* The generic method for targets to specify how their registers are named.
- The mapping can be derived from three sources: reg_names; std_regs; or
- a target specific alias hook. */
+/* The generic method for targets to specify how their registers are
+ named. The mapping can be derived from three sources:
+ REGISTER_NAME; std_regs; or a target specific alias hook. */
int
target_map_name_to_register (str, len)
diff --git a/gdb/pyr-tdep.c b/gdb/pyr-tdep.c
index b9abc0f..c60decf 100644
--- a/gdb/pyr-tdep.c
+++ b/gdb/pyr-tdep.c
@@ -31,10 +31,10 @@ pyr_print_registers(reg_buf, regnum)
for (regno = 0; regno < 16; regno++) {
printf_unfiltered/*_filtered*/ ("%6.6s: %8x %6.6s: %8x %6s: %8x %6s: %8x\n",
- reg_names[regno], reg_buf[regno],
- reg_names[regno+16], reg_buf[regno+16],
- reg_names[regno+32], reg_buf[regno+32],
- reg_names[regno+48], reg_buf[regno+48]);
+ REGISTER_NAME (regno), reg_buf[regno],
+ REGISTER_NAME (regno+16), reg_buf[regno+16],
+ REGISTER_NAME (regno+32), reg_buf[regno+32],
+ REGISTER_NAME (regno+48), reg_buf[regno+48]);
}
usp = ptrace (3, inferior_pid,
(PTRACE_ARG3_TYPE) ((char *)&u.u_pcb.pcb_usp) -
@@ -43,8 +43,8 @@ pyr_print_registers(reg_buf, regnum)
(PTRACE_ARG3_TYPE) ((char *)&u.u_pcb.pcb_ksp) -
((char *)&u), 0);
printf_unfiltered/*_filtered*/ ("\n%6.6s: %8x %6.6s: %8x (%08x) %6.6s %8x\n",
- reg_names[CSP_REGNUM],reg_buf[CSP_REGNUM],
- reg_names[KSP_REGNUM], reg_buf[KSP_REGNUM], ksp,
+ REGISTER_NAME (CSP_REGNUM),reg_buf[CSP_REGNUM],
+ REGISTER_NAME (KSP_REGNUM), reg_buf[KSP_REGNUM], ksp,
"usp", usp);
}
@@ -70,9 +70,9 @@ pyr_do_registers_info (regnum, fpregs)
if (i == regnum) {
long val = raw_regs[i];
- fputs_filtered (reg_names[i], stdout);
+ fputs_filtered (REGISTER_NAME (i), stdout);
printf_filtered(":");
- print_spaces_filtered (6 - strlen (reg_names[i]), stdout);
+ print_spaces_filtered (6 - strlen (REGISTER_NAME (i)), stdout);
if (val == 0)
printf_filtered ("0");
else
@@ -92,7 +92,7 @@ CORE_ADDR frame_locals_address (frame)
fprintf_unfiltered (stderr,
"\t[[..frame_locals:%8x, %s= %x @%x fcfp= %x foo= %x\n\t gr13=%x pr13=%x tr13=%x @%x]]\n",
frame->frame,
- reg_names[CFP_REGNUM],
+ REGISTER_NAME (CFP_REGNUM),
result, addr,
frame->frame_cfp, (CFP_REGNUM),
@@ -118,7 +118,7 @@ CORE_ADDR frame_args_addr (frame)
fprintf_unfiltered (stderr,
"\t[[..frame_args:%8x, %s= %x @%x fcfp= %x r_r= %x\n\t gr13=%x pr13=%x tr13=%x @%x]]\n",
frame->frame,
- reg_names[CFP_REGNUM],
+ REGISTER_NAME (CFP_REGNUM),
result, addr,
frame->frame_cfp, read_register(CFP_REGNUM),
@@ -265,14 +265,14 @@ pyr_print_insn (memaddr, stream)
switch (operand_mode) {
case 0:
fprintf_unfiltered (stream, "%s,%s",
- reg_names [op_1_regno],
- reg_names [op_2_regno]);
+ REGISTER_NAME (op_1_regno),
+ REGISTER_NAME (op_2_regno));
break;
case 1:
fprintf_unfiltered (stream, " 0x%0x,%s",
op_1_regno,
- reg_names [op_2_regno]);
+ REGISTER_NAME (op_2_regno));
break;
case 2:
@@ -281,12 +281,12 @@ pyr_print_insn (memaddr, stream)
extra_1 = * ((int *) buffer);
fprintf_unfiltered (stream, " $0x%0x,%s",
extra_1,
- reg_names [op_2_regno]);
+ REGISTER_NAME (op_2_regno));
break;
case 3:
fprintf_unfiltered (stream, " (%s),%s",
- reg_names [op_1_regno],
- reg_names [op_2_regno]);
+ REGISTER_NAME (op_1_regno),
+ REGISTER_NAME (op_2_regno));
break;
case 4:
@@ -295,17 +295,17 @@ pyr_print_insn (memaddr, stream)
extra_1 = * ((int *) buffer);
fprintf_unfiltered (stream, " 0x%0x(%s),%s",
extra_1,
- reg_names [op_1_regno],
- reg_names [op_2_regno]);
+ REGISTER_NAME (op_1_regno),
+ REGISTER_NAME (op_2_regno));
break;
/* S1 destination mode */
case 5:
fprintf_unfiltered (stream,
((index_reg_regno) ? "%s,(%s)[%s*%1d]" : "%s,(%s)"),
- reg_names [op_1_regno],
- reg_names [op_2_regno],
- reg_names [index_reg_regno],
+ REGISTER_NAME (op_1_regno),
+ REGISTER_NAME (op_2_regno),
+ REGISTER_NAME (index_reg_regno),
index_multiplier);
break;
@@ -314,8 +314,8 @@ pyr_print_insn (memaddr, stream)
((index_reg_regno) ? " $%#0x,(%s)[%s*%1d]"
: " $%#0x,(%s)"),
op_1_regno,
- reg_names [op_2_regno],
- reg_names [index_reg_regno],
+ REGISTER_NAME (op_2_regno),
+ REGISTER_NAME (index_reg_regno),
index_multiplier);
break;
@@ -327,17 +327,17 @@ pyr_print_insn (memaddr, stream)
((index_reg_regno) ? " $%#0x,(%s)[%s*%1d]"
: " $%#0x,(%s)"),
extra_1,
- reg_names [op_2_regno],
- reg_names [index_reg_regno],
+ REGISTER_NAME (op_2_regno),
+ REGISTER_NAME (index_reg_regno),
index_multiplier);
break;
case 8:
fprintf_unfiltered (stream,
((index_reg_regno) ? " (%s),(%s)[%s*%1d]" : " (%s),(%s)"),
- reg_names [op_1_regno],
- reg_names [op_2_regno],
- reg_names [index_reg_regno],
+ REGISTER_NAME (op_1_regno),
+ REGISTER_NAME (op_2_regno),
+ REGISTER_NAME (index_reg_regno),
index_multiplier);
break;
@@ -350,9 +350,9 @@ pyr_print_insn (memaddr, stream)
? "%#0x(%s),(%s)[%s*%1d]"
: "%#0x(%s),(%s)"),
extra_1,
- reg_names [op_1_regno],
- reg_names [op_2_regno],
- reg_names [index_reg_regno],
+ REGISTER_NAME (op_1_regno),
+ REGISTER_NAME (op_2_regno),
+ REGISTER_NAME (index_reg_regno),
index_multiplier);
break;
@@ -363,10 +363,10 @@ pyr_print_insn (memaddr, stream)
extra_1 = * ((int *) buffer);
fprintf_unfiltered (stream,
((index_reg_regno) ? "%s,%#0x(%s)[%s*%1d]" : "%s,%#0x(%s)"),
- reg_names [op_1_regno],
+ REGISTER_NAME (op_1_regno),
extra_1,
- reg_names [op_2_regno],
- reg_names [index_reg_regno],
+ REGISTER_NAME (op_2_regno),
+ REGISTER_NAME (index_reg_regno),
index_multiplier);
break;
case 11:
@@ -378,8 +378,8 @@ pyr_print_insn (memaddr, stream)
" $%#0x,%#0x(%s)[%s*%1d]" : " $%#0x,%#0x(%s)"),
op_1_regno,
extra_1,
- reg_names [op_2_regno],
- reg_names [index_reg_regno],
+ REGISTER_NAME (op_2_regno),
+ REGISTER_NAME (index_reg_regno),
index_multiplier);
break;
case 12:
@@ -394,8 +394,8 @@ pyr_print_insn (memaddr, stream)
" $%#0x,%#0x(%s)[%s*%1d]" : " $%#0x,%#0x(%s)"),
extra_1,
extra_2,
- reg_names [op_2_regno],
- reg_names [index_reg_regno],
+ REGISTER_NAME (op_2_regno),
+ REGISTER_NAME (index_reg_regno),
index_multiplier);
break;
@@ -407,10 +407,10 @@ pyr_print_insn (memaddr, stream)
((index_reg_regno)
? " (%s),%#0x(%s)[%s*%1d]"
: " (%s),%#0x(%s)"),
- reg_names [op_1_regno],
+ REGISTER_NAME (op_1_regno),
extra_1,
- reg_names [op_2_regno],
- reg_names [index_reg_regno],
+ REGISTER_NAME (op_2_regno),
+ REGISTER_NAME (index_reg_regno),
index_multiplier);
break;
case 14:
@@ -424,19 +424,19 @@ pyr_print_insn (memaddr, stream)
((index_reg_regno) ? "%#0x(%s),%#0x(%s)[%s*%1d]"
: "%#0x(%s),%#0x(%s) "),
extra_1,
- reg_names [op_1_regno],
+ REGISTER_NAME (op_1_regno),
extra_2,
- reg_names [op_2_regno],
- reg_names [index_reg_regno],
+ REGISTER_NAME (op_2_regno),
+ REGISTER_NAME (index_reg_regno),
index_multiplier);
break;
default:
fprintf_unfiltered (stream,
((index_reg_regno) ? "%s,%s [%s*%1d]" : "%s,%s"),
- reg_names [op_1_regno],
- reg_names [op_2_regno],
- reg_names [index_reg_regno],
+ REGISTER_NAME (op_1_regno),
+ REGISTER_NAME (op_2_regno),
+ REGISTER_NAME (index_reg_regno),
index_multiplier);
fprintf_unfiltered (stream,
"\t\t# unknown mode in %08x",
diff --git a/gdb/pyr-xdep.c b/gdb/pyr-xdep.c
index e205b50..7864fd6 100644
--- a/gdb/pyr-xdep.c
+++ b/gdb/pyr-xdep.c
@@ -50,13 +50,13 @@ fetch_inferior_registers (regno)
#if defined(PYRAMID_CONTROL_FRAME_DEBUGGING)
printf_unfiltered ("Fetching register %s, got %0x\n",
- reg_names[regno],
+ REGISTER_NAME (regno),
reg_buf[regno]);
#endif /* PYRAMID_CONTROL_FRAME_DEBUGGING */
if (reg_buf[regno] == -1 && errno == EIO) {
printf_unfiltered("fetch_interior_registers: fetching register %s\n",
- reg_names[regno]);
+ REGISTER_NAME (regno));
errno = 0;
}
supply_register (regno, reg_buf+regno);
@@ -321,10 +321,10 @@ core_file_command (filename, from_tty)
if (val < 0
|| (val = myread (corechan, buf, sizeof buf)) < 0)
{
- char * buffer = (char *) alloca (strlen (reg_names[regno])
+ char * buffer = (char *) alloca (strlen (REGISTER_NAME (regno))
+ 30);
strcpy (buffer, "Reading register ");
- strcat (buffer, reg_names[regno]);
+ strcat (buffer, REGISTER_NAME (regno));
perror_with_name (buffer);
}
@@ -333,7 +333,7 @@ core_file_command (filename, from_tty)
perror_with_name (filename);
#ifdef PYRAMID_CONTROL_FRAME_DEBUGGING
printf_unfiltered ("[reg %s(%d), offset in file %s=0x%0x, addr =0x%0x, =%0x]\n",
- reg_names[regno], regno, filename,
+ REGISTER_NAME (regno), regno, filename,
register_addr(regno, reg_offset),
regno * 4 + last_frame_address,
*((int *)buf));
diff --git a/gdb/remote-os9k.c b/gdb/remote-os9k.c
index 84a0f2b..acdc847 100644
--- a/gdb/remote-os9k.c
+++ b/gdb/remote-os9k.c
@@ -547,11 +547,11 @@ get_reg_name (regno)
if (regno < 0)
return ("");
/*
- for (p = reg_names[regno]; *p; p++)
+ for (p = REGISTER_NAME (regno); *p; p++)
*b++ = toupper(*p);
*b = '\000';
*/
- p = (char *)reg_names[regno];
+ p = (char *)REGISTER_NAME (regno);
return p;
/*
return buf;
diff --git a/gdb/remote-st.c b/gdb/remote-st.c
index 3fd8cf1..18afd16 100644
--- a/gdb/remote-st.c
+++ b/gdb/remote-st.c
@@ -424,7 +424,7 @@ get_reg_name (regno)
b = buf;
- for (p = reg_names[regno]; *p; p++)
+ for (p = REGISTER_NAME (regno); *p; p++)
*b++ = toupper(*p);
*b = '\000';
diff --git a/gdb/tahoe-tdep.c b/gdb/tahoe-tdep.c
index 281b1cf..ea8a752 100644
--- a/gdb/tahoe-tdep.c
+++ b/gdb/tahoe-tdep.c
@@ -121,17 +121,17 @@ print_insn_arg (d, p, addr, stream)
case 4: /* Indexed */
p = (char *) print_insn_arg (d, p, addr + 1, stream);
- fprintf_unfiltered (stream, "[%s]", reg_names[regnum]);
+ fprintf_unfiltered (stream, "[%s]", REGISTER_NAME (regnum));
break;
case 5: /* Register */
- fprintf_unfiltered (stream, reg_names[regnum]);
+ fprintf_unfiltered (stream, REGISTER_NAME (regnum));
break;
case 7: /* Autodecrement */
fputc_unfiltered ('-', stream);
case 6: /* Register deferred */
- fprintf_unfiltered (stream, "(%s)", reg_names[regnum]);
+ fprintf_unfiltered (stream, "(%s)", REGISTER_NAME (regnum));
break;
case 9: /* Absolute Address & Autoincrement deferred */
@@ -174,7 +174,7 @@ print_insn_arg (d, p, addr, stream)
}
else /*8E is Autoincrement SP Mode*/
- fprintf_unfiltered (stream, "(%s)+", reg_names[regnum]);
+ fprintf_unfiltered (stream, "(%s)+", REGISTER_NAME (regnum));
break;
case 11: /* Register + Byte Displacement Deferred Mode*/
@@ -183,7 +183,7 @@ print_insn_arg (d, p, addr, stream)
if (regnum == PC_REGNUM)
print_address (addr + *p + 2, stream);
else
- fprintf_unfiltered (stream, "%d(%s)", *p, reg_names[regnum]);
+ fprintf_unfiltered (stream, "%d(%s)", *p, REGISTER_NAME (regnum));
p += 1;
break;
@@ -196,7 +196,7 @@ print_insn_arg (d, p, addr, stream)
if (regnum == PC_REGNUM)
print_address (addr + temp1 + 3, stream);
else
- fprintf_unfiltered (stream, "%d(%s)", temp1, reg_names[regnum]);
+ fprintf_unfiltered (stream, "%d(%s)", temp1, REGISTER_NAME (regnum));
p += 2;
break;
@@ -213,7 +213,7 @@ print_insn_arg (d, p, addr, stream)
if (regnum == PC_REGNUM)
print_address (addr + temp1 + 5, stream);
else
- fprintf_unfiltered (stream, "%d(%s)", temp1, reg_names[regnum]);
+ fprintf_unfiltered (stream, "%d(%s)", temp1, REGISTER_NAME (regnum));
p += 4;
}
diff --git a/gdb/ultra3-nat.c b/gdb/ultra3-nat.c
index 8f7a7f7..2b84cdd 100644
--- a/gdb/ultra3-nat.c
+++ b/gdb/ultra3-nat.c
@@ -148,7 +148,7 @@ store_inferior_registers (regno)
(PTRACE_ARG3_TYPE) regaddr, read_register(regno));
if (errno != 0)
{
- sprintf (buf, "writing register %s (#%d)", reg_names[regno],regno);
+ sprintf (buf, "writing register %s (#%d)", REGISTER_NAME (regno), regno);
perror_with_name (buf);
}
}
@@ -229,7 +229,7 @@ fetch_register (regno)
val = ptrace (PT_READ_U, inferior_pid,
(PTRACE_ARG3_TYPE) register_addr(regno,0), 0);
if (errno != 0) {
- sprintf(buf,"reading register %s (#%d)",reg_names[regno],regno);
+ sprintf(buf,"reading register %s (#%d)",REGISTER_NAME (regno), regno);
perror_with_name (buf);
} else {
supply_register (regno, &val);
@@ -258,9 +258,9 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
if (!CANNOT_FETCH_REGISTER(regno)) {
val = bfd_seek (core_bfd, (file_ptr) register_addr (regno, 0), SEEK_SET);
if (val < 0 || (val = bfd_read (buf, sizeof buf, 1, core_bfd)) < 0) {
- char * buffer = (char *) alloca (strlen (reg_names[regno]) + 35);
+ char * buffer = (char *) alloca (strlen (REGISTER_NAME (regno)) + 35);
strcpy (buffer, "Reading core register ");
- strcat (buffer, reg_names[regno]);
+ strcat (buffer, REGISTER_NAME (regno));
perror_with_name (buffer);
}
supply_register (regno, buf);
@@ -305,7 +305,7 @@ register_addr (regno,blockend)
case FC_REGNUM: return(offsetof(struct ptrace_user,pt_fc));
default:
fprintf_filtered(gdb_stderr,"register_addr():Bad register %s (%d)\n",
- reg_names[regno],regno);
+ REGISTER_NAME (regno), regno);
return(0xffffffff); /* Should make ptrace() fail */
}
}
diff --git a/gdb/v850ice.c b/gdb/v850ice.c
index 1e869ea..f69966b 100755
--- a/gdb/v850ice.c
+++ b/gdb/v850ice.c
@@ -509,11 +509,11 @@ convert_register (regno, buf)
{
if (regno <= 31)
sprintf (buf, "r%d", regno);
- else if (reg_names[regno][0] == 's'
- && reg_names[regno][1] == 'r')
+ else if (REGISTER_NAME (regno)[0] == 's'
+ && REGISTER_NAME (regno)[1] == 'r')
return 0;
else
- sprintf (buf, "%s", reg_names[regno]);
+ sprintf (buf, "%s", REGISTER_NAME (regno));
return 1;
}
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 2104004..b378571 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -120,17 +120,17 @@ print_insn_arg (d, p, addr, info)
case 4: /* Indexed */
p = (char *) print_insn_arg (d, p, addr + 1, info);
- (*info->fprintf_func) (info->stream, "[%s]", reg_names[regnum]);
+ (*info->fprintf_func) (info->stream, "[%s]", REGISTER_NAME (regnum));
break;
case 5: /* Register */
- (*info->fprintf_func) (info->stream, reg_names[regnum]);
+ (*info->fprintf_func) (info->stream, REGISTER_NAME (regnum));
break;
case 7: /* Autodecrement */
(*info->fprintf_func) (info->stream, "-");
case 6: /* Register deferred */
- (*info->fprintf_func) (info->stream, "(%s)", reg_names[regnum]);
+ (*info->fprintf_func) (info->stream, "(%s)", REGISTER_NAME (regnum));
break;
case 9: /* Autoincrement deferred */
@@ -209,7 +209,7 @@ print_insn_arg (d, p, addr, info)
}
}
else
- (*info->fprintf_func) (info->stream, "(%s)+", reg_names[regnum]);
+ (*info->fprintf_func) (info->stream, "(%s)+", REGISTER_NAME (regnum));
break;
case 11: /* Byte displacement deferred */
@@ -221,7 +221,7 @@ print_insn_arg (d, p, addr, info)
(*info->print_address_func) (info->target, info);
}
else
- (*info->fprintf_func) (info->stream, "%d(%s)", *p, reg_names[regnum]);
+ (*info->fprintf_func) (info->stream, "%d(%s)", *p, REGISTER_NAME (regnum));
p += 1;
break;
@@ -235,7 +235,7 @@ print_insn_arg (d, p, addr, info)
}
else
(*info->fprintf_func) (info->stream, "%d(%s)",
- *(short *)p, reg_names[regnum]);
+ *(short *)p, REGISTER_NAME (regnum));
p += 2;
break;
@@ -249,7 +249,7 @@ print_insn_arg (d, p, addr, info)
}
else
(*info->fprintf_func) (info->stream, "%d(%s)",
- *(long *)p, reg_names[regnum]);
+ *(long *)p, REGISTER_NAME (regnum));
p += 4;
}