diff options
author | Michael Snyder <msnyder@vmware.com> | 1996-11-27 19:31:26 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 1996-11-27 19:31:26 +0000 |
commit | 409f64ae056e9f06ea492bfe4ffb42f85170ed5d (patch) | |
tree | 7d2a16ea8489169e39cbe23355ea43a540f6496f | |
parent | 50f04a5a37ce4bd1da4def5bee108c361cdfddac (diff) | |
download | gdb-409f64ae056e9f06ea492bfe4ffb42f85170ed5d.zip gdb-409f64ae056e9f06ea492bfe4ffb42f85170ed5d.tar.gz gdb-409f64ae056e9f06ea492bfe4ffb42f85170ed5d.tar.bz2 |
Wed Nov 27 11:29:06 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
* blockframe.c: ...Remove old-style CALL_DUMMY code...
* h8300-tdep.c:
* config/h8300/tm-h8300.h:
start-sanitize-m32r
* m32r-tdep.c:
* config/m32r/tm-m32r.h:
end-sanitize-m32r
* sh-tdep.c:
* config/sh/tm-sh.h:
start-sanitize-v850
* v850-tdep.c:
* config/v850/tm-v850.h:
end-sanitize-v850
-rw-r--r-- | gdb/ChangeLog | 16 | ||||
-rw-r--r-- | gdb/config/m32r/tm-m32r.h | 25 | ||||
-rw-r--r-- | gdb/config/sh/tm-sh.h | 32 | ||||
-rw-r--r-- | gdb/config/v850/tm-v850.h | 23 | ||||
-rw-r--r-- | gdb/h8300-tdep.c | 7 | ||||
-rw-r--r-- | gdb/sh-tdep.c | 11 | ||||
-rw-r--r-- | gdb/v850-tdep.c | 25 |
7 files changed, 24 insertions, 115 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a0a64cd..ccb9b8c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,19 @@ +Wed Nov 27 11:29:06 1996 Michael Snyder <msnyder@cleaver.cygnus.com> + + * blockframe.c: ...Remove old-style CALL_DUMMY code... + * h8300-tdep.c: + * config/h8300/tm-h8300.h: +start-sanitize-m32r + * m32r-tdep.c: + * config/m32r/tm-m32r.h: +end-sanitize-m32r + * sh-tdep.c: + * config/sh/tm-sh.h: +start-sanitize-v850 + * v850-tdep.c: + * config/v850/tm-v850.h: +end-sanitize-v850 + Wed Nov 27 10:32:14 1996 Michael Snyder <msnyder@cleaver.cygnus.com> * breakpoint.c: DELETE command will not delete CALL_DUMMY breakpoint. diff --git a/gdb/config/m32r/tm-m32r.h b/gdb/config/m32r/tm-m32r.h index c9342e1..4e01197 100644 --- a/gdb/config/m32r/tm-m32r.h +++ b/gdb/config/m32r/tm-m32r.h @@ -222,7 +222,6 @@ extern CORE_ADDR m32r_push_arguments PARAMS ((int nargs, one that takes account of generic CALL_DUMMY frames */ #define GET_SAVED_REGISTER -#if 1 #define CALL_DUMMY {0} #define CALL_DUMMY_LENGTH (0) #define CALL_DUMMY_START_OFFSET (0) @@ -230,27 +229,3 @@ extern CORE_ADDR m32r_push_arguments PARAMS ((int nargs, #define FIX_CALL_DUMMY(DUMMY1, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP) #define CALL_DUMMY_LOCATION AT_ENTRY_POINT #define CALL_DUMMY_ADDRESS() entry_point_address () - -#else -/* -/* Use these defines if, for whatever reason, you want to use a - genuine call_dummy sequence (A sequence of machine instructions - that GDB will write into the target address space, usually on the - stack, for calling a function in the inferior): - - This sequence of words defines the instructions: - - ld24 R8, <destination> - jl R8 - nop - trap -*/ -#define CALL_DUMMY { 0xe8000000, 0x1ec87000, 0x10f110f1 } -#define CALL_DUMMY_LENGTH (12) -#define CALL_DUMMY_START_OFFSET (0) -#define CALL_DUMMY_BREAKPOINT_OFFSET (8) -#define FIX_CALL_DUMMY(DUMMY1, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP) \ - m32r_fix_call_dummy (DUMMY1, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP) -#define CALL_DUMMY_LOCATION ON_STACK -#define NEED_TEXT_START_END -#endif diff --git a/gdb/config/sh/tm-sh.h b/gdb/config/sh/tm-sh.h index 5347d72..ce873e5 100644 --- a/gdb/config/sh/tm-sh.h +++ b/gdb/config/sh/tm-sh.h @@ -248,36 +248,6 @@ extern CORE_ADDR sh_push_arguments PARAMS ((int nargs, unsigned char struct_return, CORE_ADDR struct_addr)); -#if 0 -/* Use these defines if, for whatever reason, you want to use a - genuine call_dummy sequence (A sequence of machine instructions - that GDB will write into the target address space, usually on the - stack, for calling a function in the inferior): - - This sequence of words defines the instructions: - - mov.w @(2,PC), R8 - jsr @R8 - nop - trap - <destination> - - Note that the destination address is actually written into a word - 8 bytes after the start of the CALL_DUMMY. The first instruction - loads it from here using PC-relative addressing. Note also the - NOP that must follow the jsr instruction to fill up the delay slot. -*/ - -#define CALL_DUMMY { 0xd801480b, 0x0009c3c3, 0x32323232, } -#define CALL_DUMMY_LENGTH (12) -#define CALL_DUMMY_START_OFFSET (0) -#define CALL_DUMMY_BREAKPOINT_OFFSET (6) -#define FIX_CALL_DUMMY(DUMMY, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP) \ - sh_fix_call_dummy(DUMMY, STARTADDR, FUNADDR, NARGS, ARGS, TYPE, GCCP) -#define CALL_DUMMY_LOCATION ON_STACK - -#else /* These defines write NO instructions into the inferior process, - and are therefore preferred because they make target calls faster. */ #define CALL_DUMMY {0} #define CALL_DUMMY_LENGTH (0) #define CALL_DUMMY_START_OFFSET (0) @@ -287,7 +257,7 @@ extern CORE_ADDR sh_push_arguments PARAMS ((int nargs, #define CALL_DUMMY_ADDRESS() entry_point_address () extern CORE_ADDR sh_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR)); #define PUSH_RETURN_ADDRESS(PC, SP) sh_push_return_address (PC, SP) -#endif + #define FRAME_CHAIN(FRAME) sh_frame_chain(FRAME) #define PUSH_DUMMY_FRAME generic_push_dummy_frame () diff --git a/gdb/config/v850/tm-v850.h b/gdb/config/v850/tm-v850.h index 1bc61c4..9164617 100644 --- a/gdb/config/v850/tm-v850.h +++ b/gdb/config/v850/tm-v850.h @@ -113,27 +113,6 @@ extern CORE_ADDR v850_skip_prologue PARAMS ((CORE_ADDR pc)); extern void v850_pop_frame PARAMS ((struct frame_info *frame)); #define POP_FRAME v850_pop_frame (get_current_frame ()) -#if 0 -/* Use these defines if, for whatever reason, you want to use a - genuine call_dummy sequence (A sequence of machine instructions - that GDB will write into the target address space, usually on the - stack, for calling a function in the inferior): - - This sequence of words defines the instructions: - - jarl <offset24>, r31 - trap -*/ -#define CALL_DUMMY { 0x0000ff80, 0xffffffff } -#define CALL_DUMMY_LENGTH (8) -#define CALL_DUMMY_START_OFFSET (0) -#define CALL_DUMMY_BREAKPOINT_OFFSET (4) -#define CALL_DUMMY_LOCATION ON_STACK -#define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP) \ - v850_fix_call_dummy (DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP); - -#else /* These defines write NO instructions into the inferior process, - and are therefore preferred because they make target calls faster. */ #define CALL_DUMMY {0} #define CALL_DUMMY_START_OFFSET (0) #define CALL_DUMMY_BREAKPOINT_OFFSET (0) @@ -142,7 +121,7 @@ extern void v850_pop_frame PARAMS ((struct frame_info *frame)); #define CALL_DUMMY_ADDRESS() entry_point_address () extern CORE_ADDR v850_push_return_address PARAMS ((CORE_ADDR, CORE_ADDR)); #define PUSH_RETURN_ADDRESS(PC, SP) v850_push_return_address (PC, SP) -#endif + #define PUSH_DUMMY_FRAME generic_push_dummy_frame () diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index df179bb..7c340b1 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -613,13 +613,8 @@ h8300_push_return_address (pc, sp) else wordsize = 2; -#if CALL_DUMMY_LOCATION != AT_ENTRY_POINT - pc = pc - CALL_DUMMY_START_OFFSET + CALL_DUMMY_BREAKPOINT_OFFSET; -#else - pc = CALL_DUMMY_ADDRESS (); -#endif /* CALL_DUMMY_LOCATION */ sp -= wordsize; - store_unsigned_integer (buf, wordsize, pc); + store_unsigned_integer (buf, wordsize, CALL_DUMMY_ADDRESS ()); write_memory (sp, buf, wordsize); return sp; } diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index d088f44..4a3eb2e 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -482,7 +482,7 @@ sh_push_arguments (nargs, args, sp, struct_return, struct_addr) while (len > 0) { if (argreg > ARGLAST_REGNUM || odd_sized_struct) - { /* must go on the stack */ + { /* must go on the stack */ write_memory (sp + stack_offset, val, 4); stack_offset += 4; } @@ -490,7 +490,7 @@ sh_push_arguments (nargs, args, sp, struct_return, struct_addr) That's because some *&^%$ things get passed on the stack AND in the registers! */ if (argreg <= ARGLAST_REGNUM) - { /* there's room in a register */ + { /* there's room in a register */ regval = extract_address (val, REGISTER_RAW_SIZE(argreg)); write_register (argreg++, regval); } @@ -513,12 +513,7 @@ sh_push_return_address (pc, sp) CORE_ADDR pc; CORE_ADDR sp; { -#if CALL_DUMMY_LOCATION != AT_ENTRY_POINT - pc = pc - CALL_DUMMY_START_OFFSET + CALL_DUMMY_BREAKPOINT_OFFSET; -#else - pc = CALL_DUMMY_ADDRESS (); -#endif /* CALL_DUMMY_LOCATION */ - write_register (PR_REGNUM, pc); + write_register (PR_REGNUM, CALL_DUMMY_ADDRESS ()); return sp; } diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index 1a5d69a..f7149c4 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -407,21 +407,14 @@ v850_push_arguments (nargs, args, sp, struct_return, struct_addr) Set up the return address for the inferior function call. Needed for targets where we don't actually execute a JSR/BSR instruction */ -#ifdef PUSH_RETURN_ADDRESS CORE_ADDR v850_push_return_address (pc, sp) CORE_ADDR pc; CORE_ADDR sp; { -#if CALL_DUMMY_LOCATION != AT_ENTRY_POINT - pc = pc - CALL_DUMMY_START_OFFSET + CALL_DUMMY_BREAKPOINT_OFFSET; -#else - pc = CALL_DUMMY_ADDRESS (); -#endif /* CALL_DUMMY_LOCATION */ - write_register (RP_REGNUM, pc); + write_register (RP_REGNUM, CALL_DUMMY_ADDRESS ()); return sp; } -#endif /* PUSH_RETURN_ADDRESS */ /* Function: frame_saved_pc Find the caller of this frame. We do this by seeing if RP_REGNUM @@ -472,22 +465,8 @@ v850_fix_call_dummy (dummy, sp, fun, nargs, args, type, gcc_p) int gcc_p; { long offset24; - CORE_ADDR call_dummy_start; -#ifdef NEED_TEXT_START_END - extern CORE_ADDR text_end; -#endif - -#if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT) - call_dummy_start = entry_point_address (); -#elif (CALL_DUMMY_LOCATION == AFTER_TEXT_END) - call_dummy_start = text_end; -#elif (CALL_DUMMY_LOCATION == BEFORE_TEXT_END) - call_dummy_start = (text_end - CALL_DUMMY_LENGTH) & ~3; -#elif (CALL_DUMMY_LOCATION == ON_STACK) - call_dummy_start = sp; -#endif - offset24 = (long) fun - (long) call_dummy_start; + offset24 = (long) fun - (long) entry_point_address (); offset24 &= 0x3fffff; offset24 |= 0xff800000; /* jarl <offset24>, r31 */ |