Eliminate ARCH_NUM_REGS.
This commit is contained in:
parent
060d22b0d0
commit
a728f04251
14 changed files with 51 additions and 31 deletions
|
@ -1,3 +1,21 @@
|
|||
2001-03-08 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
* inferior.h (ARCH_NUM_REGS): Delete definition.
|
||||
* stack.c (frame_info): Use NUM_REGS, not ARCH_NUM_REGS.
|
||||
* regcache.c (registers_changed): Ditto.
|
||||
(registers_fetched): Ditto.
|
||||
* infptrace.c (fetch_inferior_registers): Ditto.
|
||||
(store_inferior_registers): Ditto.
|
||||
* infcmd.c (do_registers_info): Ditto.
|
||||
(registers_info): Ditto.
|
||||
* i386-linux-nat.c (old_fetch_inferior_registers): Ditto.
|
||||
(old_store_inferior_registers): Ditto.
|
||||
* gdbserver/low-linux.c (register_addr): Ditto.
|
||||
* gdbserver/low-hppabsd.c (register_addr): Ditto.
|
||||
* core-aout.c: Don't include "inferior.h".
|
||||
(fetch_core_registers): Use NUM_REGS not ARCH_NUM_REGS.
|
||||
(register_addr): Ditto.
|
||||
|
||||
2001-03-13 Fernando Nasser <fnasser@redhat.com>
|
||||
|
||||
From Steven Johnson <sjohnson@neurizon.net>
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include <sys/param.h>
|
||||
#include "gdbcore.h"
|
||||
#include "value.h" /* For supply_register. */
|
||||
#include "inferior.h" /* For ARCH_NUM_REGS. */
|
||||
#include "regcache.h"
|
||||
|
||||
/* These are needed on various systems to expand REGISTER_U_ADDR. */
|
||||
|
@ -82,7 +81,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
|
|||
CORE_ADDR addr;
|
||||
int bad_reg = -1;
|
||||
CORE_ADDR reg_ptr = -reg_addr; /* Original u.u_ar0 is -reg_addr. */
|
||||
int numregs = ARCH_NUM_REGS;
|
||||
int numregs = NUM_REGS;
|
||||
|
||||
/* If u.u_ar0 was an absolute address in the core file, relativize it now,
|
||||
so we can use it as an offset into core_reg_sect. When we're done,
|
||||
|
@ -118,7 +117,7 @@ register_addr (int regno, CORE_ADDR blockend)
|
|||
{
|
||||
CORE_ADDR addr;
|
||||
|
||||
if (regno < 0 || regno >= ARCH_NUM_REGS)
|
||||
if (regno < 0 || regno >= NUM_REGS)
|
||||
error ("Invalid register number %d.", regno);
|
||||
|
||||
REGISTER_U_ADDR (addr, blockend, regno);
|
||||
|
|
|
@ -150,7 +150,7 @@ register_addr (int regno, CORE_ADDR blockend)
|
|||
{
|
||||
CORE_ADDR addr;
|
||||
|
||||
if (regno < 0 || regno >= ARCH_NUM_REGS)
|
||||
if (regno < 0 || regno >= NUM_REGS)
|
||||
error ("Invalid register number %d.", regno);
|
||||
|
||||
REGISTER_U_ADDR (addr, blockend, regno);
|
||||
|
|
|
@ -541,7 +541,7 @@ register_addr (int regno, CORE_ADDR blockend)
|
|||
{
|
||||
CORE_ADDR addr;
|
||||
|
||||
if (regno < 0 || regno >= ARCH_NUM_REGS)
|
||||
if (regno < 0 || regno >= NUM_REGS)
|
||||
error ("Invalid register number %d.", regno);
|
||||
|
||||
REGISTER_U_ADDR (addr, blockend, regno);
|
||||
|
|
|
@ -192,7 +192,7 @@ old_fetch_inferior_registers (int regno)
|
|||
}
|
||||
else
|
||||
{
|
||||
for (regno = 0; regno < ARCH_NUM_REGS; regno++)
|
||||
for (regno = 0; regno < NUM_REGS; regno++)
|
||||
{
|
||||
fetch_register (regno);
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ old_store_inferior_registers (int regno)
|
|||
}
|
||||
else
|
||||
{
|
||||
for (regno = 0; regno < ARCH_NUM_REGS; regno++)
|
||||
for (regno = 0; regno < NUM_REGS; regno++)
|
||||
{
|
||||
store_register (regno);
|
||||
}
|
||||
|
|
|
@ -1467,7 +1467,7 @@ void
|
|||
do_registers_info (int regnum, int fpregs)
|
||||
{
|
||||
register int i;
|
||||
int numregs = ARCH_NUM_REGS;
|
||||
int numregs = NUM_REGS;
|
||||
|
||||
for (i = 0; i < numregs; i++)
|
||||
{
|
||||
|
@ -1591,7 +1591,7 @@ registers_info (char *addr_exp, int fpregs)
|
|||
end = addr_exp;
|
||||
while (*end != '\0' && *end != ' ' && *end != '\t')
|
||||
++end;
|
||||
numregs = ARCH_NUM_REGS;
|
||||
numregs = NUM_REGS;
|
||||
|
||||
regnum = target_map_name_to_register (addr_exp, end - addr_exp);
|
||||
if (regnum >= 0)
|
||||
|
|
|
@ -51,15 +51,6 @@ extern void write_inferior_status_register (struct inferior_status
|
|||
*inf_status, int regno,
|
||||
LONGEST val);
|
||||
|
||||
/* This macro gives the number of registers actually in use by the
|
||||
inferior. This may be less than the total number of registers,
|
||||
perhaps depending on the actual CPU in use or program being run.
|
||||
FIXME: This could be replaced by the new MULTI_ARCH capability. */
|
||||
|
||||
#ifndef ARCH_NUM_REGS
|
||||
#define ARCH_NUM_REGS NUM_REGS
|
||||
#endif
|
||||
|
||||
extern void set_sigint_trap (void);
|
||||
|
||||
extern void clear_sigint_trap (void);
|
||||
|
|
|
@ -423,7 +423,7 @@ fetch_inferior_registers (int regno)
|
|||
}
|
||||
else
|
||||
{
|
||||
for (regno = 0; regno < ARCH_NUM_REGS; regno++)
|
||||
for (regno = 0; regno < NUM_REGS; regno++)
|
||||
{
|
||||
fetch_register (regno);
|
||||
}
|
||||
|
@ -487,7 +487,7 @@ store_inferior_registers (int regno)
|
|||
}
|
||||
else
|
||||
{
|
||||
for (regno = 0; regno < ARCH_NUM_REGS; regno++)
|
||||
for (regno = 0; regno < NUM_REGS; regno++)
|
||||
{
|
||||
store_register (regno);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
2001-03-08 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
* mi-main.c (mi_cmd_data_list_register_names): Use NUM_REGS, not
|
||||
ARCH_NUM_REGS.
|
||||
(mi_cmd_data_list_changed_registers): Ditto.
|
||||
(mi_cmd_data_list_register_values): Ditto.
|
||||
(mi_cmd_data_write_register_values): Ditto.
|
||||
|
||||
2001-03-06 Kevin Buettner <kevinb@redhat.com>
|
||||
|
||||
* gdbmi.texinfo, mi-cmd-disas.c, mi-cmd-stack.c, mi-cmd-var.c,
|
||||
|
|
|
@ -271,7 +271,7 @@ mi_cmd_data_list_register_names (char *command, char **argv, int argc)
|
|||
case, some entries of REGISTER_NAME will change depending upon
|
||||
the particular processor being debugged. */
|
||||
|
||||
numregs = ARCH_NUM_REGS;
|
||||
numregs = NUM_REGS;
|
||||
|
||||
ui_out_list_begin (uiout, "register-names");
|
||||
|
||||
|
@ -321,7 +321,7 @@ mi_cmd_data_list_changed_registers (char *command, char **argv, int argc)
|
|||
case, some entries of REGISTER_NAME will change depending upon
|
||||
the particular processor being debugged. */
|
||||
|
||||
numregs = ARCH_NUM_REGS;
|
||||
numregs = NUM_REGS;
|
||||
|
||||
ui_out_list_begin (uiout, "changed-registers");
|
||||
|
||||
|
@ -415,7 +415,7 @@ mi_cmd_data_list_register_values (char *command, char **argv, int argc)
|
|||
case, some entries of REGISTER_NAME will change depending upon
|
||||
the particular processor being debugged. */
|
||||
|
||||
numregs = ARCH_NUM_REGS;
|
||||
numregs = NUM_REGS;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
|
@ -562,7 +562,7 @@ mi_cmd_data_write_register_values (char *command, char **argv, int argc)
|
|||
case, some entries of REGISTER_NAME will change depending upon
|
||||
the particular processor being debugged. */
|
||||
|
||||
numregs = ARCH_NUM_REGS;
|
||||
numregs = NUM_REGS;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
|
|
|
@ -163,7 +163,7 @@ registers_changed (void)
|
|||
gdb gives control to the user (ie watchpoints). */
|
||||
alloca (0);
|
||||
|
||||
for (i = 0; i < ARCH_NUM_REGS; i++)
|
||||
for (i = 0; i < NUM_REGS; i++)
|
||||
set_register_cached (i, 0);
|
||||
|
||||
/* Assume that if all the hardware regs have changed,
|
||||
|
@ -185,7 +185,7 @@ registers_fetched (void)
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARCH_NUM_REGS; i++)
|
||||
for (i = 0; i < NUM_REGS; i++)
|
||||
set_register_cached (i, 1);
|
||||
/* Do not assume that the pseudo-regs have also been fetched.
|
||||
Fetching all real regs might not account for all pseudo-regs. */
|
||||
|
|
|
@ -1001,7 +1001,7 @@ frame_info (char *addr_exp, int from_tty)
|
|||
print_address_numeric (fi->saved_regs[SP_REGNUM], 1, gdb_stdout);
|
||||
printf_filtered ("\n");
|
||||
count = 0;
|
||||
numregs = ARCH_NUM_REGS;
|
||||
numregs = NUM_REGS;
|
||||
for (i = 0; i < numregs; i++)
|
||||
if (fi->saved_regs[i] && i != SP_REGNUM)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2001-03-08 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
* tuiRegs.c: Use NUM_REGS, not ARCH_NUM_REGS.
|
||||
|
||||
2001-03-06 Kevin Buettner <kevinb@redhat.com>
|
||||
|
||||
* tui-file.h: Update/correct copyright notice.
|
||||
|
|
|
@ -717,7 +717,7 @@ _tuiSetSpecialRegsContent (refreshValuesOnly)
|
|||
endRegNum = FP0_REGNUM - 1;
|
||||
#if 0
|
||||
endRegNum = (-1);
|
||||
for (i = START_SPECIAL_REGS; (i < ARCH_NUM_REGS && endRegNum < 0); i++)
|
||||
for (i = START_SPECIAL_REGS; (i < NUM_REGS && endRegNum < 0); i++)
|
||||
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
|
||||
endRegNum = i - 1;
|
||||
#endif
|
||||
|
@ -750,7 +750,7 @@ _tuiSetGeneralAndSpecialRegsContent (refreshValuesOnly)
|
|||
endRegNum = FP0_REGNUM - 1;
|
||||
#if 0
|
||||
endRegNum = (-1);
|
||||
for (i = 0; (i < ARCH_NUM_REGS && endRegNum < 0); i++)
|
||||
for (i = 0; (i < NUM_REGS && endRegNum < 0); i++)
|
||||
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
|
||||
endRegNum = i - 1;
|
||||
#endif
|
||||
|
@ -781,12 +781,12 @@ _tuiSetFloatRegsContent (dpyType, refreshValuesOnly)
|
|||
startRegNum = FP0_REGNUM;
|
||||
#if 0
|
||||
startRegNum = (-1);
|
||||
for (i = ARCH_NUM_REGS - 1; (i >= 0 && startRegNum < 0); i--)
|
||||
for (i = NUM_REGS - 1; (i >= 0 && startRegNum < 0); i--)
|
||||
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) != TYPE_CODE_FLT)
|
||||
startRegNum = i + 1;
|
||||
#endif
|
||||
ret = _tuiSetRegsContent (startRegNum,
|
||||
ARCH_NUM_REGS - 1,
|
||||
NUM_REGS - 1,
|
||||
selected_frame,
|
||||
dpyType,
|
||||
refreshValuesOnly);
|
||||
|
|
Loading…
Reference in a new issue