aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Alexander <marka@cygnus>1998-08-24 21:51:33 +0000
committerMark Alexander <marka@cygnus>1998-08-24 21:51:33 +0000
commitce8f5b49f69cd6cdffc9548aa3b409876f05c2a5 (patch)
treec2b2d27e9607ed93c0f1b1c1e9caea72ca5f4f14
parent080a50b635c8b89b09d3bf25e2e24dd9944ec54e (diff)
downloadgdb-ce8f5b49f69cd6cdffc9548aa3b409876f05c2a5.zip
gdb-ce8f5b49f69cd6cdffc9548aa3b409876f05c2a5.tar.gz
gdb-ce8f5b49f69cd6cdffc9548aa3b409876f05c2a5.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/config/sparc/tm-sparc.h34
-rw-r--r--gdb/sh-stub.c8
-rw-r--r--gdb/sparcl-tdep.c6
4 files changed, 35 insertions, 22 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7f4c653..2ac8f9f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index cff3189..273a218 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -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
diff --git a/gdb/sh-stub.c b/gdb/sh-stub.c
index 86c3f0b..beb8708 100644
--- a/gdb/sh-stub.c
+++ b/gdb/sh-stub.c
@@ -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;
diff --git a/gdb/sparcl-tdep.c b/gdb/sparcl-tdep.c
index 89e1c2c..e50fdce 100644
--- a/gdb/sparcl-tdep.c
+++ b/gdb/sparcl-tdep.c
@@ -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)