aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMark Alexander <marka@cygnus>1999-01-20 23:54:03 +0000
committerMark Alexander <marka@cygnus>1999-01-20 23:54:03 +0000
commit7363ff9083bcd53b539c1688704d186f7aff53b1 (patch)
tree0117a160503798317c72a3a2b21e92156cf5ac5c /gdb
parentcaf8b76ba26837676347a906132fcc3217894468 (diff)
downloadgdb-7363ff9083bcd53b539c1688704d186f7aff53b1.zip
gdb-7363ff9083bcd53b539c1688704d186f7aff53b1.tar.gz
gdb-7363ff9083bcd53b539c1688704d186f7aff53b1.tar.bz2
Changes for PR 8996:
* h8300-tdep.c (original_register_names, h8300h_register_names, h8300_register_names): Define new variables. (set_register_names): New function to set register names based on current CPU type. (h8300_command, h8300h_command, h8300s_command): Call set_register_names. * config/h8300/tm-h8300.h (h8300_register_names): Declare. (REGISTER_NAME): Define to refer to h8300_register_names.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog23
-rw-r--r--gdb/config/h8300/tm-h8300.h5
-rw-r--r--gdb/h8300-tdep.c27
3 files changed, 55 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 14da95c..ff5d83e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,26 @@
+Wed Jan 20 15:45:15 1999 Mark Alexander <marka@cygnus.com>
+
+ * h8300-tdep.c (original_register_names, h8300h_register_names,
+ h8300_register_names): Define new variables.
+ (set_register_names): New function to set register names based on
+ current CPU type.
+ (h8300_command, h8300h_command, h8300s_command): Call
+ set_register_names.
+ * config/h8300/tm-h8300.h (h8300_register_names): Declare.
+ (REGISTER_NAME): Define to refer to h8300_register_names.
+
+1999-01-19 Fernando Nasser <fnasser@totem.to.cygnus.com>
+
+ * sol-thread.c abug-rom.c cpu32bug-rom.c dbug-rom.c m32r-rom.c
+ mac-nat.c mon960-rom.c op50-rom.c ppc-bdm.c remote-adapt.c
+ remote-array.c remote-bug.c remote-e7000.c remote-eb.c remote-es.c
+ remote-est.c remote-hms.c remote-mm.c remote-nindy.c remote-nrom.c
+ remote-os9k.c remote-rdp.c remote-sds.c remote-sim.c remote-st.c
+ remote-udi.c rom68k-rom.c sh3-rom.c sparcl-tdep.c sparclet-rom.c
+ v850ice.c win32-nat.c: cosmetic changes to conform to coding
+ standards.
+
+
1999-01-19 Jim Blandy <jimb@zwingli.cygnus.com>
Use aclocal to generate GDB's aclocal.m4 script.
diff --git a/gdb/config/h8300/tm-h8300.h b/gdb/config/h8300/tm-h8300.h
index 34b95cc..b398d2f 100644
--- a/gdb/config/h8300/tm-h8300.h
+++ b/gdb/config/h8300/tm-h8300.h
@@ -135,6 +135,11 @@ extern CORE_ADDR h8300_skip_prologue ();
#define REGISTER_NAMES \
{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "sp", "ccr","pc","cycles","tick","inst"}
+/* An array of names of registers. */
+
+extern char **h8300_register_names;
+#define REGISTER_NAME(i) h8300_register_names[i]
+
/* Register numbers of various important registers.
Note that some of these values are "real" register numbers,
and correspond to the general registers of the machine,
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index 984f6c4..3fbe9e1 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -50,6 +50,19 @@ extern int h8300hmode, h8300smode;
#define IS_MOVK_R5(x) (x==0x7905)
#define IS_SUB_R5SP(x) (x==0x1957)
+
+/* The register names change depending on whether the h8300h processor
+ type is selected. */
+
+static char *original_register_names[] = REGISTER_NAMES;
+
+static char *h8300h_register_names[] =
+ {"er0", "er1", "er2", "er3", "er4", "er5", "er6",
+ "sp", "ccr","pc","cycles","tick","inst" };
+
+char **h8300_register_names = original_register_names;
+
+
/* Local function declarations. */
static CORE_ADDR examine_prologue ();
@@ -756,11 +769,21 @@ get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval)
struct cmd_list_element *setmemorylist;
static void
+set_register_names ()
+{
+ if (h8300hmode != 0)
+ h8300_register_names = h8300h_register_names;
+ else
+ h8300_register_names = original_register_names;
+}
+
+static void
h8300_command(args, from_tty)
{
extern int h8300hmode;
h8300hmode = 0;
h8300smode = 0;
+ set_register_names ();
}
static void
@@ -769,7 +792,9 @@ h8300h_command(args, from_tty)
extern int h8300hmode;
h8300hmode = 1;
h8300smode = 0;
+ set_register_names ();
}
+
static void
h8300s_command(args, from_tty)
{
@@ -777,6 +802,7 @@ h8300s_command(args, from_tty)
extern int h8300hmode;
h8300smode = 1;
h8300hmode = 1;
+ set_register_names ();
}
@@ -816,6 +842,7 @@ set_machine_hook (filename)
h8300smode = 0;
h8300hmode = 0;
}
+ set_register_names ();
}
void