One step closer.
authorSteve Chamberlain <sac@cygnus>
Fri, 24 Jan 1992 02:37:13 +0000 (02:37 +0000)
committerSteve Chamberlain <sac@cygnus>
Fri, 24 Jan 1992 02:37:13 +0000 (02:37 +0000)
gdb/.Sanitize
gdb/h8300-tdep.c
gdb/tm-h8300.h

index bd5e1575d165eeb01fb3582094c48adad41d71f5..6402283f621a8657cea3f756ed33a04bcd4c8fee 100644 (file)
@@ -89,7 +89,6 @@ gmalloc.h
 gould-pinsn.c
 gould-xdep.c
 h8300-tdep.c
-hds-tdep.c
 hp300ux-xdep.c
 i386-pinsn.c
 i386-stub.c
@@ -150,6 +149,7 @@ regex.h
 rem-multi.shar
 remote-adapt.c
 remote-eb.c
+remote-hds.c
 remote-mm.c
 remote-nindy.c
 remote-vx.c
index 21dde42e5a1199c8bc9293114562439f4875adda..50a0092406617855c3f34b44e9c587e89043a510 100644 (file)
@@ -1,10 +1,30 @@
+#include <stdio.h>
+#include "defs.h"
+
+/* an easy to debug H8 stack frame looks like:
+0x6df2 push    r2
+0x6df3 push    r3
+0x6df6 push    r6
+0x     mov.w   r7,r6
+       subs    stuff,sp  mov.w #x,r5
+                         subs  r5,sp
+
+ */
+#define IS_PUSH(x) ((x & 0xff00)==0x6d00)
+CORE_ADDR h8300_skip_prologue(start_pc)
+CORE_ADDR start_pc;
 
-h8300_skip_prologue()
 {
+  /* Skip past all push insns */
+  short int w;
   
-  printf("skip prologue\n");
-  
-  abort();
+  w = read_memory_integer(start_pc, 2);
+  while (IS_PUSH(w)) 
+  {
+    start_pc+=2;  
+    w = read_memory_integer(start_pc, 2);
+  }
+return start_pc;  
   
 }
 
@@ -14,19 +34,26 @@ h8300_pop_frame()
   
 }
 
-print_insn()
+int
+print_insn(memaddr, stream)
+CORE_ADDR memaddr;
+FILE *stream;
 {
-  printf("print insn\n");
-  
+  /* Nothing is bigger than 8 bytes */
+  char   data[8];
+  read_memory (memaddr, data, sizeof(data));
+  return print_insn_h8300(memaddr,  data   , stream);
+     
+     
 }
-
-
-
-FRAME_CHAIN()
-{
-  
-  printf("Frame chain\n");
-  
-}
-
-
+     
+     
+     
+     FRAME_CHAIN()
+     {
+     
+     printf("Frame chain\n");
+     
+     }
+     
+     
index 8185e409dae506eea0ae1c69718ebab1b8ce45ec..fdba3ead7b40d07a1b3e88a24b930de938cb72fb 100644 (file)
@@ -90,7 +90,7 @@ read_memory_integer (read_register (SP_REGNUM), 2)
 
 /* Say how long registers are.  */
 
-#define REGISTER_TYPE short
+#define REGISTER_TYPE unsigned short
 
 #  define NUM_REGS 10 
 #  define REGISTER_BYTES (10*2)
@@ -262,3 +262,6 @@ read_memory_integer (read_register (SP_REGNUM), 2)
 
 #define POP_FRAME              { h8300_pop_frame (); }
 
+
+#define        BEFORE_MAIN_LOOP_HOOK   \
+  hms_before_main_loop();