diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-04-13 06:15:14 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-04-13 06:15:14 +0000 |
commit | f36492275cd36b470afcdc04e0a108830f03d650 (patch) | |
tree | e9217e38bf0dc623ea85de1d808740da19ac22ee | |
parent | 79f1d6a385ec0173d9b5a2b50312e8424efc49b3 (diff) | |
download | gdb-f36492275cd36b470afcdc04e0a108830f03d650.zip gdb-f36492275cd36b470afcdc04e0a108830f03d650.tar.gz gdb-f36492275cd36b470afcdc04e0a108830f03d650.tar.bz2 |
* config/rs6000/tm-rs6000.h, rs6000-tdep.c: Move FRAME_CHAIN
to rs6000_frame_chain and deal with it if we're in a signal handler.
(FRAME_SAVED_PC): Use rs6000_frame_chain.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 27 |
2 files changed, 31 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cc85f61..8fe721b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ Mon Apr 12 10:53:50 1993 Jim Kingdon (kingdon@cygnus.com) + * config/rs6000/tm-rs6000.h, rs6000-tdep.c: Move FRAME_CHAIN + to rs6000_frame_chain and deal with it if we're in a signal handler. + (FRAME_SAVED_PC): Use rs6000_frame_chain. + * breakpoint.c (within_scope): New function. (enable_breakpoint, watchpoint_check): Use it. diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 4d1b73a..5aa7632 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -1091,6 +1091,33 @@ frame_initial_stack_address (fi) return fi->initial_sp = read_register (fdata.alloca_reg); } +FRAME_ADDR +rs6000_frame_chain (thisframe) + struct frame_info *thisframe; +{ + FRAME_ADDR fp; + if (inside_entry_file ((thisframe)->pc)) + return 0; + fp = read_memory_integer ((thisframe)->frame, 4); + if (fp == 0 && thisframe->pc < TEXT_SEGMENT_BASE) + { + /* If we are doing a backtrace from a signal handler, fp will be 0 + and thisframe->pc will be something like 0x3f88 or 0x2790. */ + + /* This was determined by experimentation on AIX 3.2. 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_FRAME_FP_OFFSET 284 + fp = read_memory_integer (thisframe->frame + SIG_FRAME_FP_OFFSET, 4); + } + return fp; +} + + /* xcoff_relocate_symtab - hook for symbol table relocation. also reads shared libraries.. */ |