CARP:
More replace reg_name[] with REGISTER_NAME().
This commit is contained in:
parent
986b3b988a
commit
d70a61e74c
20 changed files with 115 additions and 107 deletions
|
@ -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>,
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 */
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue