* 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.
This commit is contained in:
Mark Alexander 1998-08-24 21:51:33 +00:00
parent 080a50b635
commit ce8f5b49f6
4 changed files with 35 additions and 22 deletions

View 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.

View 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

View 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;

View 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)