* inferior.h (read_sp): Remove prototype.
[deliverable/binutils-gdb.git] / gdb / sh-tdep.c
index 752f64223ab77bfe4bd4f6230859c787a98e6f77..204a29653bc3fa5f48caa63b647cee5d230bc5e8 100644 (file)
@@ -389,6 +389,24 @@ sh_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
   /* 0xc3c3 is trapa #c3, and it works in big and little endian modes */
   static unsigned char breakpoint[] = { 0xc3, 0xc3 };
 
+  /* For remote stub targets, trapa #20 is used.  */
+  if (strcmp (target_shortname, "remote") == 0)
+    {
+      static unsigned char big_remote_breakpoint[] = { 0xc3, 0x20 };
+      static unsigned char little_remote_breakpoint[] = { 0x20, 0xc3 };
+
+      if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+       {
+         *lenptr = sizeof (big_remote_breakpoint);
+         return big_remote_breakpoint;
+       }
+      else
+       {
+         *lenptr = sizeof (little_remote_breakpoint);
+         return little_remote_breakpoint;
+       }
+    }
+
   *lenptr = sizeof (breakpoint);
   return breakpoint;
 }
@@ -2037,7 +2055,7 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
 
       regcache_raw_write (regcache, BANK_REGNUM, buffer);
       for (bregnum = R0_BANK0_REGNUM; bregnum < MACLB_REGNUM; ++bregnum)
-        set_register_cached (bregnum, 0);
+        regcache_invalidate (regcache, bregnum);
     }
   else if (reg_nr >= DR0_REGNUM && reg_nr <= DR_LAST_REGNUM)
     {
@@ -2215,7 +2233,7 @@ sh_frame_cache (struct frame_info *next_frame, void **this_cache)
   if (cache->base == 0)
     return cache;
 
-  cache->pc = frame_func_unwind (next_frame);
+  cache->pc = frame_func_unwind (next_frame, NORMAL_FRAME);
   current_pc = frame_pc_unwind (next_frame);
   if (cache->pc != 0)
     sh_analyze_prologue (cache->pc, current_pc, cache);
This page took 0.023742 seconds and 4 git commands to generate.