Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] h8300 "info registers" broken
@ 2014-02-01 12:43 Yoshinori Sato
  2014-02-04 19:38 ` Pedro Alves
  0 siblings, 1 reply; 13+ messages in thread
From: Yoshinori Sato @ 2014-02-01 12:43 UTC (permalink / raw)
  To: gdb-patches

Following result in h8300-elf-gdb.

 (gdb) info registers ccr
 memory clobbered past end of allocated block

This cause of missing register size.

diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index ffffbc9..a21f7de 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -946,7 +946,7 @@ h8300_register_name (struct gdbarch *gdbarch, int regno)
      type is selected.  */
   static char *register_names[] = {
     "r0", "r1", "r2", "r3", "r4", "r5", "r6",
-    "sp", "", "pc", "cycles", "tick", "inst",
+    "sp", "ccr", "pc", "cycles", "tick", "inst",
     "ccr",			/* pseudo register */
   };
   if (regno < 0
@@ -963,7 +963,7 @@ h8300s_register_name (struct gdbarch *gdbarch, int regno)
 {
   static char *register_names[] = {
     "er0", "er1", "er2", "er3", "er4", "er5", "er6",
-    "sp", "", "pc", "cycles", "", "tick", "inst",
+    "sp", "ccr", "pc", "cycles", "exr", "tick", "inst",
     "mach", "macl",
     "ccr", "exr"		/* pseudo registers */
   };
@@ -981,7 +981,7 @@ h8300sx_register_name (struct gdbarch *gdbarch, int regno)
 {
   static char *register_names[] = {
     "er0", "er1", "er2", "er3", "er4", "er5", "er6",
-    "sp", "", "pc", "cycles", "", "tick", "inst",
+    "sp", "ccr", "pc", "cycles", "exr", "tick", "inst",
     "mach", "macl", "sbr", "vbr",
     "ccr", "exr"		/* pseudo registers */
   };
@@ -1136,9 +1136,9 @@ h8300_register_type (struct gdbarch *gdbarch, int regno)
 	case E_FP_REGNUM:
 	  return builtin_type (gdbarch)->builtin_data_ptr;
 	default:
-	  if (regno == E_PSEUDO_CCR_REGNUM (gdbarch))
+	  if (regno == E_PSEUDO_CCR_REGNUM (gdbarch) || regno == E_CCR_REGNUM)
 	    return builtin_type (gdbarch)->builtin_uint8;
-	  else if (regno == E_PSEUDO_EXR_REGNUM (gdbarch))
+	  else if (regno == E_PSEUDO_EXR_REGNUM (gdbarch) || regno == E_EXR_REGNUM)
 	    return builtin_type (gdbarch)->builtin_uint8;
 	  else if (is_h8300hmode (gdbarch))
 	    return builtin_type (gdbarch)->builtin_int32;

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-02-12 12:59 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-01 12:43 [PATCH] h8300 "info registers" broken Yoshinori Sato
2014-02-04 19:38 ` Pedro Alves
2014-02-05 17:51   ` Yoshinori Sato
2014-02-05 17:59     ` Mark Kettenis
2014-02-08 18:36       ` Yoshinori Sato
2014-02-10 15:53         ` Pedro Alves
2014-02-11 10:29           ` Yoshinori Sato
2014-02-11 11:47             ` Pedro Alves
2014-02-11 13:11               ` Yoshinori Sato
2014-02-12 12:42                 ` [PATCH 0/2] H8/300: Fix registers Pedro Alves
2014-02-12 12:42                   ` [PATCH 2/2] H8/300: Fix pseudo registers reads/writes Pedro Alves
2014-02-12 12:59                     ` Mark Kettenis
2014-02-12 12:42                   ` [PATCH 1/2] H8/300: Fix gdb<->sim register mapping Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox