diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-05-19 00:57:48 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-05-19 00:57:48 +0000 |
commit | 993583e53b5537544f01aa235f068318557f4753 (patch) | |
tree | 80f7fbf0af136f7c30264c36388804a6fce9a77c /gdb/config/m68k/tm-m68k.h | |
parent | 27daf1a9146abed8dc51ff9e8f3bb1967b39da68 (diff) | |
download | gdb-993583e53b5537544f01aa235f068318557f4753.zip gdb-993583e53b5537544f01aa235f068318557f4753.tar.gz gdb-993583e53b5537544f01aa235f068318557f4753.tar.bz2 |
* blockframe.c (get_prev_frame_info): If pc in sigtramp, set
signal_handler_caller.
* tm-68k.h (FRAME_{CHAIN,SAVED_PC}): Deal with sigtramp.
* tm-hp300bsd.h: Define SIGTRAMP_{START,END} not IN_SIGTRAMP.
* inferior.h (IN_SIGTRAMP): Definition moved from infrun.c.
Use SIGTRAMP_START if defined.
* infcmd.c (step_1): Use SIGTRAMP_{START,END} if needed.
* infrun.c (wait_for_inferior): Check IN_SIGTRAMP before SKIP_PROLOGUE.
Diffstat (limited to 'gdb/config/m68k/tm-m68k.h')
-rw-r--r-- | gdb/config/m68k/tm-m68k.h | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h index 96d71de..062445b 100644 --- a/gdb/config/m68k/tm-m68k.h +++ b/gdb/config/m68k/tm-m68k.h @@ -293,10 +293,15 @@ extern const struct ext_format ext_format_68881; In the case of the 68000, the frame's nominal address is the address of a 4-byte word containing the calling frame's address. */ +/* If we are chaining from sigtramp, then manufacture a sigtramp frame + (which isn't really on the stack. I'm not sure this is right for anything + but BSD4.3 on an hp300. */ #define FRAME_CHAIN(thisframe) \ - (!inside_entry_file ((thisframe)->pc) ? \ - read_memory_integer ((thisframe)->frame, 4) :\ - 0) + (thisframe->signal_handler_caller \ + ? thisframe->frame \ + : (!inside_entry_file ((thisframe)->pc) ? \ + read_memory_integer ((thisframe)->frame, 4) :\ + 0) /* Define other aspects of the stack frame. */ @@ -304,9 +309,31 @@ extern const struct ext_format ext_format_68881; by FI does not have a frame on the stack associated with it. If it does not, FRAMELESS is set to 1, else 0. */ #define FRAMELESS_FUNCTION_INVOCATION(FI, FRAMELESS) \ - (FRAMELESS) = frameless_look_for_prologue(FI) - -#define FRAME_SAVED_PC(FRAME) (read_memory_integer ((FRAME)->frame + 4, 4)) + do { \ + if ((FI)->signal_handler_caller) \ + (FRAMELESS) = 0; \ + else \ + (FRAMELESS) = frameless_look_for_prologue(FI); \ + } while (0) + +/* This was determined by experimentation on hp300 BSD 4.3. Perhaps + it corresponds to some offset in /usr/include/sys/user.h or + something like that. Using some system include file would + have the advantage of probably being more robust in the face + of OS upgrades, but the disadvantage of being wrong for + cross-debugging. */ + +#define SIG_PC_FP_OFFSET 530 + +#define FRAME_SAVED_PC(FRAME) \ + (((FRAME)->signal_handler_caller \ + ? ((FRAME)->next \ + ? read_memory_integer ((FRAME)->next->frame + SIG_PC_FP_OFFSET, 4) \ + : read_memory_integer (read_register (SP_REGNUM) \ + + SIG_PC_FP_OFFSET - 8, 4) \ + ) \ + : read_memory_integer ((FRAME)->frame + 4, 4)) \ + ) #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame) |