* 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.
This commit is contained in:
Jim Kingdon 1993-04-13 06:15:14 +00:00
parent 79f1d6a385
commit f36492275c
2 changed files with 31 additions and 0 deletions

View File

@ -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.

View File

@ -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.. */