From: Jim Kingdon Date: Tue, 13 Apr 1993 06:15:14 +0000 (+0000) Subject: * config/rs6000/tm-rs6000.h, rs6000-tdep.c: Move FRAME_CHAIN X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f36492275cd36b470afcdc04e0a108830f03d650;p=binutils-gdb.git * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cc85f615c06..8fe721bf437 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 4d1b73a4929..5aa76326485 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.. */