Modified Files:
authorKeith Seitz <keiths@cygnus>
Fri, 6 Jun 1997 21:47:12 +0000 (21:47 +0000)
committerKeith Seitz <keiths@cygnus>
Fri, 6 Jun 1997 21:47:12 +0000 (21:47 +0000)
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

gdb/ChangeLog
gdb/config/sh/tm-sh.h
gdb/sh-tdep.c

index 98b9cb3139a8f0fc8e7af5f849e1c28b17704809..d2b557ade1bf9e2dc9e267b2dd79a3e47b8d70e3 100644 (file)
@@ -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
index 0fe3b5e8c805c99de8d1d05a06505b69a0c35144..0a3c0836dc9823e06cf3207a88b0353890a987d5 100644 (file)
@@ -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
index dcec84629814c01cdf306dc13bb56edcf7ea939a..57075d9f3a913efd070669a52c63f5ed9e15f221 100644 (file)
@@ -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