* d10v-tdep.c (show_regs): Avoid use of %llx when printing 8 byte
authorAndrew Cagney <cagney@redhat.com>
Thu, 12 Feb 1998 07:32:58 +0000 (07:32 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 12 Feb 1998 07:32:58 +0000 (07:32 +0000)
accumulators.

gdb/ChangeLog
gdb/d10v-tdep.c

index e8d8eea74255698d35a39e0e01a54b01f91e350f..44d698975959e0451c70991e909038d09e307ad9 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb 12 18:25:42 1998  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * d10v-tdep.c (show_regs): Avoid use of %llx when printing 8 byte
+       accumulators.
+
 Thu Feb 12 17:10:22 1998  Andrew Cagney  <cagney@b1.cygnus.com>
 
        * valops.c (value_at): For d10v, make read pointers with
index 95b1ef55560f8f402d1079a3246b85c19c8c661e..6e5789172d8991bbae8f62923c12212cb1ecb800 100644 (file)
@@ -414,7 +414,7 @@ show_regs (args, from_tty)
      char *args;
      int from_tty;
 {
-  LONGEST num1, num2;
+  int a;
   printf_filtered ("PC=%04x (0x%x) PSW=%04x RPT_S=%04x RPT_E=%04x RPT_C=%04x\n",
                    read_register (PC_REGNUM), D10V_MAKE_IADDR (read_register (PC_REGNUM)),
                    read_register (PSW_REGNUM),
@@ -443,9 +443,19 @@ show_regs (args, from_tty)
                    read_register (IMAP0_REGNUM),
                    read_register (IMAP1_REGNUM),
                    read_register (DMAP_REGNUM));
-  read_register_gen (A0_REGNUM, (char *)&num1);
-  read_register_gen (A0_REGNUM+1, (char *)&num2);
-  printf_filtered ("A0-A1  %010llx %010llx\n",num1, num2);
+  printf_filtered ("A0-A1");
+  for (a = A0_REGNUM; a <= A0_REGNUM + 1; a++)
+    {
+      char num[MAX_REGISTER_RAW_SIZE];
+      int i;
+      printf_filtered ("  ");
+      read_register_gen (a, (char *)&num);
+      for (i = 0; i < MAX_REGISTER_RAW_SIZE; i++)
+       {
+         printf_filtered ("%02x", (num[i] & 0xff));
+       }
+    }
+  printf_filtered ("\n");
 }
 
 CORE_ADDR