diff options
author | Peter Schauer <Peter.Schauer@mytum.de> | 1993-08-17 08:49:07 +0000 |
---|---|---|
committer | Peter Schauer <Peter.Schauer@mytum.de> | 1993-08-17 08:49:07 +0000 |
commit | 7b98a091361fd9660ed38f0e196a605bf324e160 (patch) | |
tree | d09e33c33861ec3c806103e1accd9bb08a8e79e4 /gdb/config/i386/tm-i386bsd.h | |
parent | d541211d612abbf36c99e7204b7cf3db6ba81aa5 (diff) | |
download | gdb-7b98a091361fd9660ed38f0e196a605bf324e160.zip gdb-7b98a091361fd9660ed38f0e196a605bf324e160.tar.gz gdb-7b98a091361fd9660ed38f0e196a605bf324e160.tar.bz2 |
* config/i386/tm-i386bsd.h (SIGTRAMP_START, SIGTRAMP_END, FRAME_CHAIN,
FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC, SIGCONTEXT_PC_OFFSET):
Define to make backtracing through sigtramp work.
* config/vax/tm-vax.h (SIGTRAMP_START, SIGTRAMP_END, TARGET_UPAGES,
FRAME_SAVED_PC, SIGCONTEXT_PC_OFFSET): Ditto.
Diffstat (limited to 'gdb/config/i386/tm-i386bsd.h')
-rw-r--r-- | gdb/config/i386/tm-i386bsd.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/gdb/config/i386/tm-i386bsd.h b/gdb/config/i386/tm-i386bsd.h index 6f4dbd9..f75fd93 100644 --- a/gdb/config/i386/tm-i386bsd.h +++ b/gdb/config/i386/tm-i386bsd.h @@ -27,3 +27,50 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* BSDI can't handle them either. */ #undef NUM_REGS #define NUM_REGS 10 + +/* On 386 bsd, sigtramp is above the user stack and immediately below + the user area. Using constants here allows for cross debugging. + These are tested for BSDI but should work on 386BSD. */ +#define SIGTRAMP_START 0xfdbfdfc0 +#define SIGTRAMP_END 0xfdbfe000 + +/* The following redefines make backtracing through sigtramp work. + They manufacture a fake sigtramp frame and obtain the saved pc in sigtramp + from the sigcontext structure which is pushed by the kernel on the + user stack, along with a pointer to it. */ + +/* FRAME_CHAIN takes a frame's nominal address and produces the frame's + chain-pointer. + In the case of the i386, the frame's nominal address + is the address of a 4-byte word containing the calling frame's address. */ +#undef FRAME_CHAIN +#define FRAME_CHAIN(thisframe) \ + (thisframe->signal_handler_caller \ + ? thisframe->frame \ + : (!inside_entry_file ((thisframe)->pc) \ + ? read_memory_integer ((thisframe)->frame, 4) \ + : 0)) + +/* A macro that tells us whether the function invocation represented + by FI does not have a frame on the stack associated with it. If it + does not, FRAMELESS is set to 1, else 0. */ +#undef FRAMELESS_FUNCTION_INVOCATION +#define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \ + do { \ + if ((FI)->signal_handler_caller) \ + (FRAMELESS) = 0; \ + else \ + (FRAMELESS) = frameless_look_for_prologue(FI); \ + } while (0) + +/* Saved Pc. Get it from sigcontext if within sigtramp. */ + +/* Offset to saved PC in sigcontext, from <sys/signal.h>. */ +#define SIGCONTEXT_PC_OFFSET 20 + +#undef FRAME_SAVED_PC(FRAME) +#define FRAME_SAVED_PC(FRAME) \ + (((FRAME)->signal_handler_caller \ + ? sigtramp_saved_pc (FRAME) \ + : read_memory_integer ((FRAME)->frame + 4, 4)) \ + ) |