* sh-stub.c (undoSStep): Improve comment.
authorMark Alexander <marka@cygnus>
Mon, 24 Aug 1998 21:51:33 +0000 (21:51 +0000)
committerMark Alexander <marka@cygnus>
Mon, 24 Aug 1998 21:51:33 +0000 (21:51 +0000)
* sparc-tdep.c (sparc_extract_struct_value_address): Simplify to use
same method on both 32-bit and 64-bit machines.
* sparcl-tdep.c (sparclite_check_watch_resources): Simulator doesn't
support hardware breakpoints.
* config/sparc/tm-sparc.h (CALL_DUMMY): Improve comments.

gdb/ChangeLog
gdb/config/sparc/tm-sparc.h
gdb/sh-stub.c
gdb/sparcl-tdep.c

index 7f4c653bff3ed83b8acdab192e79ff30a1aef347..2ac8f9f31336e88c20c3e7c90d6a9ccdfa666613 100644 (file)
@@ -1,3 +1,12 @@
+Mon Aug 24 14:39:08 1998  Mark Alexander  <marka@cygnus.com>
+
+       * sh-stub.c (undoSStep): Improve comment.
+       * sparc-tdep.c (sparc_extract_struct_value_address): Simplify to use
+       same method on both 32-bit and 64-bit machines.
+       * sparcl-tdep.c (sparclite_check_watch_resources): Simulator doesn't
+       support hardware breakpoints.
+       * config/sparc/tm-sparc.h (CALL_DUMMY): Improve comments.
+
 1998-08-20  Jason Molenda  (jsm@bugshack.cygnus.com)
 
         * rdi-share/Makefile.am (INCLUDES): Fix typeo.
index cff31890a4ea662333adce80a902f99423a6f519..273a218932b2a184e4509ee1c265d4139f941209 100644 (file)
@@ -471,20 +471,20 @@ void sparc_push_dummy_frame PARAMS ((void)), sparc_pop_frame PARAMS ((void));
 #ifndef CALL_DUMMY
 /* This sequence of words is the instructions
 
0:    mov     %g1, %fp
4:    save    %sp, %g0, %sp
8:    mov     %g2, %fp
-12:    mov     %g3, %i7
-16:    ld      [%sp+0x58],%o5
-20:    ld      [%sp+0x54],%o4
-24:    ld      [%sp+0x50],%o3
-28:    ld      [%sp+0x4c],%o2
-32:    ld      [%sp+0x48],%o1
-36:    call 0x00000000
-40:    ld      [%sp+0x44],%o0
-44:    nop
-48:    ta 1
-52:    nop
  0:   bc 10 00 01     mov  %g1, %fp
  4:   9d e3 80 00     save  %sp, %g0, %sp
  8:   bc 10 00 02     mov  %g2, %fp
+   c:   be 10 00 03     mov  %g3, %i7
+  10:   da 03 a0 58     ld  [ %sp + 0x58 ], %o5
+  14:   d8 03 a0 54     ld  [ %sp + 0x54 ], %o4
+  18:   d6 03 a0 50     ld  [ %sp + 0x50 ], %o3
+  1c:   d4 03 a0 4c     ld  [ %sp + 0x4c ], %o2
+  20:   d2 03 a0 48     ld  [ %sp + 0x48 ], %o1
+  24:   40 00 00 00     call  <fun>
+  28:   d0 03 a0 44     ld  [ %sp + 0x44 ], %o0
+  2c:   01 00 00 00     nop 
+  30:   91 d0 20 01     ta  1
+  34:   01 00 00 00     nop
 
    NOTES:
        * the first four instructions are necessary only on the simulator.
@@ -502,7 +502,7 @@ void sparc_push_dummy_frame PARAMS ((void)), sparc_pop_frame PARAMS ((void));
 
 /* Size of the call dummy in bytes. */
 
-#define CALL_DUMMY_LENGTH 56
+#define CALL_DUMMY_LENGTH 0x38
 
 /* Offset within call dummy of first instruction to execute. */
 
@@ -510,11 +510,11 @@ void sparc_push_dummy_frame PARAMS ((void)), sparc_pop_frame PARAMS ((void));
 
 /* Offset within CALL_DUMMY of the 'call' instruction. */
 
-#define CALL_DUMMY_CALL_OFFSET (CALL_DUMMY_START_OFFSET + 36)
+#define CALL_DUMMY_CALL_OFFSET (CALL_DUMMY_START_OFFSET + 0x24)
 
 /* Offset within CALL_DUMMY of the 'ta 1' instruction. */
 
-#define CALL_DUMMY_BREAKPOINT_OFFSET (CALL_DUMMY_START_OFFSET + 48)
+#define CALL_DUMMY_BREAKPOINT_OFFSET (CALL_DUMMY_START_OFFSET + 0x30)
 
 #define CALL_DUMMY_STACK_ADJUST 68
 
index 86c3f0b5876a853232cd30a4c9039d1fad997e42..beb87085c7e46c380ec9f49d449d56acd921bf08 100644 (file)
@@ -895,13 +895,13 @@ doSStep (void)
   *instrMem = SSTEP_INSTR;
 }
 
+
+/* Undo the effect of a previous doSStep.  If we single stepped,
+   restore the old instruction. */
+
 void
 undoSStep (void)
 {
-  /*
-    If we single stepped,
- restore the old instruction!
-*/
   if (stepped)
     {  short *instrMem;
       instrMem = instrBuffer.memAddr;
index 89e1c2c24aee16c2c0357008c0423f753088d850..e50fdce46e6790be64dc22df99be44e4503e86e9 100644 (file)
@@ -83,7 +83,7 @@ static void sparclite_download PARAMS ((char *filename, int from_tty));
 #define DDA1_ENABLE            0x80
 #define DIA2_ENABLE            0x40
 #define DIA1_ENABLE            0x20
-#define DSINGLE_STEP           0x10
+#define DSINGLE_STEP           0x10            /* not used */
 #define DDV_TYPE_MASK          0xc
 #define DDV_TYPE_LOAD          0x0
 #define DDV_TYPE_STORE                 0x4
@@ -232,6 +232,10 @@ sparclite_check_watch_resources (type, cnt, ot)
      int cnt;
      int ot;
 {
+  /* Watchpoints not supported on simulator.  */
+  if (strcmp (target_shortname, "sim") == 0)
+    return 0;
+
   if (type == bp_hardware_breakpoint)
     {
       if (TARGET_HW_BREAK_LIMIT == 0)