aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorKeith Seitz <keiths@cygnus>1997-06-06 21:47:12 +0000
committerKeith Seitz <keiths@cygnus>1997-06-06 21:47:12 +0000
commit1e6479d4d794f6f93e2c6801f9ee1163433f46d6 (patch)
tree9593cab8c3c566f4e220395c05927d8f0dc1e305 /gdb
parent0570b3d3a08612ffeaf3d3ef69fa24f37c351e8e (diff)
downloadgdb-1e6479d4d794f6f93e2c6801f9ee1163433f46d6.zip
gdb-1e6479d4d794f6f93e2c6801f9ee1163433f46d6.tar.gz
gdb-1e6479d4d794f6f93e2c6801f9ee1163433f46d6.tar.bz2
Modified Files:
ChangeLog sh-tdep.c config/sh/tm-sh.h * config/sh/tm-sh.h: add define for FPSCR_REGNUM * sh-tdep.c (sh_show_regs): print out all registers for the current processor
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/config/sh/tm-sh.h1
-rw-r--r--gdb/sh-tdep.c46
3 files changed, 52 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 98b9cb3..d2b557a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+Fri Jun 6 14:43:23 1997 Keith Seitz <keiths@pizza.cygnus.com>
+
+ * config/sh/tm-sh.h: add define for FPSCR_REGNUM
+ * sh-tdep.c (sh_show_regs): print out all registers for
+ the current processor
+
Fri Jun 6 13:01:55 1997 Andrew Cagney <cagney@b1.cygnus.com>
* remote-sim.c (gdbsim_kill): Remove call to depreciated function
diff --git a/gdb/config/sh/tm-sh.h b/gdb/config/sh/tm-sh.h
index 0fe3b5e..0a3c083 100644
--- a/gdb/config/sh/tm-sh.h
+++ b/gdb/config/sh/tm-sh.h
@@ -149,6 +149,7 @@ extern CORE_ADDR sh_skip_prologue ();
#define MACL_REGNUM 21
#define SR_REGNUM 22
#define FPUL_REGNUM 23
+#define FPSCR_REGNUM 24
#define FP0_REGNUM 25
#define FP15_REGNUM 40
#define SSR_REGNUM 41
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index dcec846..57075d9 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -638,6 +638,13 @@ sh_show_regs (args, from_tty)
char *args;
int from_tty;
{
+ int cpu = 0;
+
+ if (strcmp (sh_processor_type, "sh3") == 0)
+ cpu = 1;
+ else if (strcmp (sh_processor_type, "sh3e") == 0)
+ cpu = 2;
+
printf_filtered ("PC=%08x SR=%08x PR=%08x MACH=%08x MACHL=%08x\n",
read_register (PC_REGNUM),
read_register (SR_REGNUM),
@@ -645,7 +652,23 @@ sh_show_regs (args, from_tty)
read_register (MACH_REGNUM),
read_register (MACL_REGNUM));
- printf_filtered ("R0-R7 %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ printf_filtered ("GBR=%08x VBR=%08x",
+ read_register (GBR_REGNUM),
+ read_register (VBR_REGNUM));
+ if (cpu == 1 || cpu == 2)
+ {
+ printf_filtered (" SSR=%08x SPC=%08x",
+ read_register (SSR_REGNUM),
+ read_register (SPC_REGNUM));
+ if (cpu ==2)
+ {
+ printf_filtered (" FPUL=%08x FPSCR=%08x",
+ read_register (FPUL_REGNUM),
+ read_register (FPSCR_REGNUM));
+ }
+ }
+
+ printf_filtered ("\nR0-R7 %08x %08x %08x %08x %08x %08x %08x %08x\n",
read_register (0),
read_register (1),
read_register (2),
@@ -663,6 +686,27 @@ sh_show_regs (args, from_tty)
read_register (13),
read_register (14),
read_register (15));
+ if (cpu == 2)
+ {
+ printf_filtered ("FP0-FP7 %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ read_register (FP0_REGNUM + 0),
+ read_register (FP0_REGNUM + 1),
+ read_register (FP0_REGNUM + 2),
+ read_register (FP0_REGNUM + 3),
+ read_register (FP0_REGNUM + 4),
+ read_register (FP0_REGNUM + 5),
+ read_register (FP0_REGNUM + 6),
+ read_register (FP0_REGNUM + 7));
+ printf_filtered ("FP8-FP15 %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ read_register (FP0_REGNUM + 8),
+ read_register (FP0_REGNUM + 9),
+ read_register (FP0_REGNUM + 10),
+ read_register (FP0_REGNUM + 11),
+ read_register (FP0_REGNUM + 12),
+ read_register (FP0_REGNUM + 13),
+ read_register (FP0_REGNUM + 14),
+ read_register (FP0_REGNUM + 15));
+ }
}
/* Function: extract_return_value