aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog18
-rw-r--r--gdb/core-aout.c5
-rw-r--r--gdb/gdbserver/low-hppabsd.c2
-rw-r--r--gdb/gdbserver/low-linux.c2
-rw-r--r--gdb/i386-linux-nat.c4
-rw-r--r--gdb/infcmd.c4
-rw-r--r--gdb/inferior.h9
-rw-r--r--gdb/infptrace.c4
-rw-r--r--gdb/mi/ChangeLog8
-rw-r--r--gdb/mi/mi-main.c8
-rw-r--r--gdb/regcache.c4
-rw-r--r--gdb/stack.c2
-rw-r--r--gdb/tui/ChangeLog4
-rw-r--r--gdb/tui/tuiRegs.c8
14 files changed, 51 insertions, 31 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 224fc5d..f9de7cf 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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>
diff --git a/gdb/core-aout.c b/gdb/core-aout.c
index 4ef64ea..0329302 100644
--- a/gdb/core-aout.c
+++ b/gdb/core-aout.c
@@ -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);
diff --git a/gdb/gdbserver/low-hppabsd.c b/gdb/gdbserver/low-hppabsd.c
index ae91592..c4bc025 100644
--- a/gdb/gdbserver/low-hppabsd.c
+++ b/gdb/gdbserver/low-hppabsd.c
@@ -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);
diff --git a/gdb/gdbserver/low-linux.c b/gdb/gdbserver/low-linux.c
index 56fe12f..eb55128 100644
--- a/gdb/gdbserver/low-linux.c
+++ b/gdb/gdbserver/low-linux.c
@@ -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);
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index 47e7870..62fe3d4 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -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);
}
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 1a95483..96a0fdd 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -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)
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 1523f41..5db89ee 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -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);
diff --git a/gdb/infptrace.c b/gdb/infptrace.c
index 0393c04..0a3e34d 100644
--- a/gdb/infptrace.c
+++ b/gdb/infptrace.c
@@ -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);
}
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index b1e8c28..6567642 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -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,
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 5851d71..a7c23c0 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.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)
{
diff --git a/gdb/regcache.c b/gdb/regcache.c
index d853218..7b462de 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -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. */
diff --git a/gdb/stack.c b/gdb/stack.c
index 77b7602..ebeb4d6 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -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)
{
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index 0265da7..53623b0 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -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.
diff --git a/gdb/tui/tuiRegs.c b/gdb/tui/tuiRegs.c
index b0f55ef..b3ec49b 100644
--- a/gdb/tui/tuiRegs.c
+++ b/gdb/tui/tuiRegs.c
@@ -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);