diff options
author | Jeff Law <law@redhat.com> | 1994-11-24 08:02:01 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1994-11-24 08:02:01 +0000 |
commit | 481faa25acc8ea42f8d5f5e5e37f137806616226 (patch) | |
tree | 337b91a7363832ffd22ea45c5ef30a7d48c3fdaa /gdb/config | |
parent | b5a37058d497b85520b1cd21d88ce40864a04f46 (diff) | |
download | gdb-481faa25acc8ea42f8d5f5e5e37f137806616226.zip gdb-481faa25acc8ea42f8d5f5e5e37f137806616226.tar.gz gdb-481faa25acc8ea42f8d5f5e5e37f137806616226.tar.bz2 |
* blockframe.c (find_pc_partial_function): Inhibit mst_trampoline
symbol special handling when INHIBIT_SUNSOLIB_TRANSFER_TABLE_HACK
is defined.
* infrun.c (IN_SOLIB_CALL_TRAMPOLINE): Renamed from
IN_SOLIB_TRAMPOLINE. All callers changed.
(IN_SOLIB_RETURN_TRAMPOLINE): Provide default definition.
(wait_for_inferior): Handle single stepping through trampolines on
return paths from shared libraries.
* config/pa/tm-hppa.h (IN_SOLIB_CALL_TRAMPOLINE): Use
in_solib_call_trampoline.
(IN_SOLIB_RETURN_TRAMPOLINE): Use in_solib_return_trampoline.
(INHIBIT_SUNSOLIB_TRANSFER_TABLE_HACK): Define.
* hppa-tdep.c (in_solib_call_trampoline): New function.
(in_solib_return_trampoline): New function.
Diffstat (limited to 'gdb/config')
-rw-r--r-- | gdb/config/m68k/tm-apollo68b.h | 2 | ||||
-rw-r--r-- | gdb/config/pa/tm-hppa.h | 54 | ||||
-rw-r--r-- | gdb/config/tm-sunos.h | 3 | ||||
-rw-r--r-- | gdb/config/tm-sysv4.h | 2 |
4 files changed, 37 insertions, 24 deletions
diff --git a/gdb/config/m68k/tm-apollo68b.h b/gdb/config/m68k/tm-apollo68b.h index 0e33df6..720f980 100644 --- a/gdb/config/m68k/tm-apollo68b.h +++ b/gdb/config/m68k/tm-apollo68b.h @@ -56,4 +56,4 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* How to decide if we're in a shared library function. (Probably a wrong definintion inherited from the VxWorks config file). */ -#define IN_SOLIB_TRAMPOLINE(pc, name) (name && strcmp(name, "<end_of_program>") == 0) +#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) (name && strcmp(name, "<end_of_program>") == 0) diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h index 20fc438..f88462b 100644 --- a/gdb/config/pa/tm-hppa.h +++ b/gdb/config/pa/tm-hppa.h @@ -56,9 +56,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Advance PC across any function entry prologue instructions to reach some "real" code. */ -/* skip (stw rp, -20(0,sp)); copy 4,1; copy sp, 4; stwm 1,framesize(sp) - for gcc, or (stw rp, -20(0,sp); stwm 1, framesize(sp) for hcc */ - #define SKIP_PROLOGUE(pc) pc = skip_prologue (pc) /* If PC is in some function-call trampoline code, return the PC @@ -66,9 +63,26 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define SKIP_TRAMPOLINE_CODE(pc) skip_trampoline_code (pc, NULL) -/* Return non-zero if we are in some sort of a trampoline. */ +/* Return non-zero if we are in an appropriate trampoline. */ + +#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \ + in_solib_call_trampoline (pc, name) + +#define IN_SOLIB_RETURN_TRAMPOLINE(pc, name) \ + in_solib_return_trampoline (pc, name) + +/* For some stupid reason find_pc_partial_function wants to treat + trampoline symbols differently. + + In a nutshell, find_pc_partial_fucntion sets the low address for + the function to the PC value that was passed in if the PC value + passed in is a mst_trampoline symbol. -#define IN_SOLIB_TRAMPOLINE(pc, name) skip_trampoline_code (pc, name) + This causes wait_for_inferior to execute code for stepping over + or around a function (stop_pc == stop_func_start). This is + extremely bad when we're stepping through a return from a shared + library back to user code (which on the PA uses trampolines). */ +#define INHIBIT_SUNSOLIB_TRANSFER_TABLE_HACK /* Immediately after a function call, return the saved pc. Can't go through the frames for this because on some machines @@ -82,15 +96,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define INNER_THAN > - /* Sequence of bytes for breakpoint instruction. */ -/*#define BREAKPOINT {0x00, 0x00, 0x00, 0x00}*/ -#ifdef KERNELDEBUG /* XXX */ -#define BREAKPOINT {0x00, 0x00, 0xa0, 0x00} -#else #define BREAKPOINT {0x00, 0x01, 0x00, 0x04} -#endif /* Amount PC must be decremented by after a breakpoint. This is often the number of bytes in BREAKPOINT @@ -104,10 +112,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define ABOUT_TO_RETURN(pc) ((read_memory_integer (pc, 4) | 0x2) == 0xE840C002) -/* Return 1 if P points to an invalid floating point value. */ - -#define INVALID_FLOAT(p, len) 0 /* Just a first guess; not checked */ - /* Say how long (ordinary) registers are. This is a piece of bogosity used in push_word and a few other places; REGISTER_RAW_SIZE is the real way to know how big a register is. */ @@ -124,7 +128,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define REGISTER_NAMES \ {"flags", "r1", "rp", "r3", "r4", "r5", "r6", "r7", "r8", "r9", \ "r10", "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19", \ - "r20", "r21", "r22", "arg3", "arg2", "arg1", "arg0", "dp", "ret0", "ret1", \ + "r20", "r21", "r22", "r23", "r24", "r25", "r26", "dp", "ret0", "ret1", \ "sp", "r31", "sar", "pcoqh", "pcsqh", "pcoqt", "pcsqt", \ "eiem", "iir", "isr", "ior", "ipsw", "goto", "sr4", "sr0", "sr1", "sr2", \ "sr3", "sr5", "sr6", "sr7", "cr0", "cr8", "cr9", "ccr", "cr12", "cr13", \ @@ -189,7 +193,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Total amount of space needed to store our copies of the machine's register state, the array `registers'. */ -#define REGISTER_BYTES (NUM_REGS * REGISTER_RAW_SIZE (1)) +#define REGISTER_BYTES (NUM_REGS * 4) /* Index within `registers' of the first byte of the space for register N. */ @@ -512,8 +516,16 @@ struct obj_unwind_info { #define OBJ_UNWIND_INFO(obj) ((struct obj_unwind_info *)obj->obj_private) -extern CORE_ADDR target_read_pc PARAMS ((void)); -extern void target_write_pc PARAMS ((CORE_ADDR)); +extern CORE_ADDR target_read_pc PARAMS ((int)); +extern void target_write_pc PARAMS ((CORE_ADDR, int)); + +#define TARGET_READ_PC(pid) target_read_pc (pid) +#define TARGET_WRITE_PC(v,pid) target_write_pc (v,pid) + +/* start-sanitize-hpread */ +/* For a number of horrible reasons we may have to adjust the location + of variables on the stack. Ugh. */ +#define HPREAD_ADJUST_STACK_ADDRESS(ADDR) hpread_adjust_stack_address(ADDR) +/* end-sanitize-hpread */ -#define TARGET_READ_PC() target_read_pc () -#define TARGET_WRITE_PC(v) target_write_pc (v) +extern int hpread_adjust_stack_address PARAMS ((CORE_ADDR)); diff --git a/gdb/config/tm-sunos.h b/gdb/config/tm-sunos.h index 1a1ee10..a747ffd 100644 --- a/gdb/config/tm-sunos.h +++ b/gdb/config/tm-sunos.h @@ -22,7 +22,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Return non-zero if we are in a shared library trampoline code stub. */ -#define IN_SOLIB_TRAMPOLINE(pc, name) lookup_solib_trampoline_symbol_by_pc (pc) +#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) \ + lookup_solib_trampoline_symbol_by_pc (pc) /* If PC is in a shared library trampoline code, return the PC where the function itself actually starts. If not, return 0. */ diff --git a/gdb/config/tm-sysv4.h b/gdb/config/tm-sysv4.h index 58ae568..dcb6935 100644 --- a/gdb/config/tm-sysv4.h +++ b/gdb/config/tm-sysv4.h @@ -26,7 +26,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ we cannot always find the shared library trampoline symbols (e.g. on Irix5). */ -#define IN_SOLIB_TRAMPOLINE(pc, name) in_plt_section((pc), (name)) +#define IN_SOLIB_CALL_TRAMPOLINE(pc, name) in_plt_section((pc), (name)) extern int in_plt_section PARAMS ((CORE_ADDR, char *)); /* If PC is in a shared library trampoline code, return the PC |