Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] h8300 "info registers" fix
@ 2006-09-12 15:05 Yoshinori Sato
  2006-09-12 20:28 ` Michael Snyder
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Yoshinori Sato @ 2006-09-12 15:05 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 600 bytes --]

A result of ccr and exr mistakes by a "info registers" of h8300 target.
There was two faults.

- A name of E_CCR_REGNUM is not defined with h8300_register_name.
  Accordingly regcache_raw_read of h8300_pseudo_regitser_read fails.
- Assume size of E_PSEUDO_CCR_REGNUM by 1 byte with h8300_register_type.
  But assume 4 bytes from a remote target.
  Accordingly cannot take response of remote side to be really.

I correct an issue of a thing of the patch box which I attached.
The issue was corrected, but not know you whether this is good technique.

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


[-- Attachment #2: h8300-tdep.diff --]
[-- Type: application/octet-stream, Size: 2248 bytes --]

Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.7897
diff -u -r1.7897 ChangeLog
--- ChangeLog	10 Sep 2006 16:21:03 -0000	1.7897
+++ ChangeLog	12 Sep 2006 14:51:35 -0000
@@ -1,3 +1,11 @@
+2006-09-12  Yoshinori Sato  <ysato@users.sourceforge.jp>
+
+	* h8300-tdep.c (h8300_register_name): set E_CCR_REGNUM name.
+	(h8300s_register_name): set E_CCR_REGNUM and E_EXR_REGNUM name.
+	(h8300sx_register_name): Ditto.
+	(h8300_register_type): E_PSEUD_CCR_REGNUM and E_PSEUD_EXR_REGNUM 
+	size fix.
+
 2006-09-10  Daniel Jacobowitz  <dan@codesourcery.com>
 
 	PR threads/2149
Index: h8300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/h8300-tdep.c,v
retrieving revision 1.103
diff -u -r1.103 h8300-tdep.c
--- h8300-tdep.c	17 Dec 2005 22:34:00 -0000	1.103
+++ h8300-tdep.c	12 Sep 2006 14:51:35 -0000
@@ -949,7 +949,7 @@
      type is selected. */
   static char *register_names[] = {
     "r0", "r1", "r2", "r3", "r4", "r5", "r6",
-    "sp", "", "pc", "cycles", "tick", "inst",
+    "sp", "gdb-ccr", "pc", "cycles", "tick", "inst",
     "ccr",			/* pseudo register */
   };
   if (regno < 0
@@ -965,7 +965,7 @@
 {
   static char *register_names[] = {
     "er0", "er1", "er2", "er3", "er4", "er5", "er6",
-    "sp", "", "pc", "cycles", "", "tick", "inst",
+    "sp", "dbg-ccr", "pc", "cycles", "dbg-exr", "tick", "inst",
     "mach", "macl",
     "ccr", "exr"		/* pseudo registers */
   };
@@ -983,7 +983,7 @@
 {
   static char *register_names[] = {
     "er0", "er1", "er2", "er3", "er4", "er5", "er6",
-    "sp", "", "pc", "cycles", "", "tick", "inst",
+    "sp", "dbg-ccr", "pc", "cycles", "dbg-exr", "tick", "inst",
     "mach", "macl", "sbr", "vbr",
     "ccr", "exr"		/* pseudo registers */
   };
@@ -1131,11 +1131,7 @@
 	case E_FP_REGNUM:
 	  return builtin_type_void_data_ptr;
 	default:
-	  if (regno == E_PSEUDO_CCR_REGNUM)
-	    return builtin_type_uint8;
-	  else if (regno == E_PSEUDO_EXR_REGNUM)
-	    return builtin_type_uint8;
-	  else if (is_h8300hmode (current_gdbarch))
+	  if (is_h8300hmode (current_gdbarch))
 	    return builtin_type_int32;
 	  else
 	    return builtin_type_int16;

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

end of thread, other threads:[~2006-11-16  8:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-12 15:05 [RFC] h8300 "info registers" fix Yoshinori Sato
2006-09-12 20:28 ` Michael Snyder
2006-09-13  2:28   ` Yoshinori Sato
2006-09-13 15:54 ` Yoshinori Sato
2006-09-13 20:05   ` Michael Snyder
2006-09-13 20:09     ` Daniel Jacobowitz
2006-09-13 20:23       ` Michael Snyder
2006-09-13 20:30         ` Daniel Jacobowitz
2006-09-13 20:59           ` Michael Snyder
2006-09-23  1:08             ` Mark Kettenis
2006-09-23  1:06           ` Mark Kettenis
2006-09-23  3:20             ` Jim Blandy
2006-09-23  3:26               ` Daniel Jacobowitz
2006-09-14  9:40     ` Yoshinori Sato
2006-09-19 16:28 ` Yoshinori Sato
2006-09-23 18:00   ` Mark Kettenis
2006-11-16  8:30     ` Yoshinori Sato

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