aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Earnshaw <richard.earnshaw@arm.com>2002-01-21 17:36:11 +0000
committerRichard Earnshaw <richard.earnshaw@arm.com>2002-01-21 17:36:11 +0000
commit966fbf700aebef28157e7d482c7503374a4a36ac (patch)
tree0b3cd0a019d4371854d5eabb0dd9c240f12b946e
parent493a6d47554d0576bf176f01aea9db415305d259 (diff)
downloadgdb-966fbf700aebef28157e7d482c7503374a4a36ac.zip
gdb-966fbf700aebef28157e7d482c7503374a4a36ac.tar.gz
gdb-966fbf700aebef28157e7d482c7503374a4a36ac.tar.bz2
* arm-tdep.c (arm_register_name): New function.
(arm_registers_names): Make static. * config/arm/tm-arm.h (arm_register_names): Delete declaration. (arm_register_name): Declare. (REGISTER_NAME): Use it.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/arm-tdep.c9
-rw-r--r--gdb/config/arm/tm-arm.h6
3 files changed, 18 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b2cac54..4fdc0eb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,4 +1,12 @@
2002-01-21 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-tdep.c (arm_register_name): New function.
+ (arm_registers_names): Make static.
+ * config/arm/tm-arm.h (arm_register_names): Delete declaration.
+ (arm_register_name): Declare.
+ (REGISTER_NAME): Use it.
+
+2002-01-21 Richard Earnshaw <rearnsha@arm.com>
Kevin Buettner <kevinb@redhat.com>
Convert arm targets to new FRAME interface.
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 4e57ec1..a7aa626 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -83,7 +83,7 @@ static char * arm_register_name_strings[] =
"f0", "f1", "f2", "f3", /* 16 17 18 19 */
"f4", "f5", "f6", "f7", /* 20 21 22 23 */
"fps", "cpsr" }; /* 24 25 */
-char **arm_register_names = arm_register_name_strings;
+static char **arm_register_names = arm_register_name_strings;
/* Valid register name flavors. */
static const char **valid_flavors;
@@ -2118,6 +2118,13 @@ set_disassembly_flavor_sfunc (char *args, int from_tty,
set_disassembly_flavor ();
}
+/* Return the ARM register name corresponding to register I. */
+char *
+arm_register_name(int i)
+{
+ return arm_register_names[i];
+}
+
static void
set_disassembly_flavor (void)
{
diff --git a/gdb/config/arm/tm-arm.h b/gdb/config/arm/tm-arm.h
index 8a0d613..6bd95ad 100644
--- a/gdb/config/arm/tm-arm.h
+++ b/gdb/config/arm/tm-arm.h
@@ -169,10 +169,8 @@ extern void arm_float_info (void);
#define NUM_GREGS 16 /* Number of general purpose registers. */
#define NUM_REGS (NUM_GREGS + NUM_FREGS + NUM_SREGS)
-/* An array of names of registers. */
-extern char **arm_register_names;
-
-#define REGISTER_NAME(i) arm_register_names[i]
+#define REGISTER_NAME(i) arm_register_name(i)
+char *arm_register_name (int);
/* Register numbers of various important registers. Note that some of
these values are "real" register numbers, and correspond to the