aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-04-20 18:02:54 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-04-20 18:02:54 +0000
commitcee86be37f49b8e1ec399271b9e7a4945faf34e5 (patch)
tree7e4ad00eb100e5c1d5918fe623efeacd00160a50 /gdb/rs6000-tdep.c
parent01f5a1f8257c2837c4d3388e0f6b5d13ffb1422b (diff)
downloadgdb-cee86be37f49b8e1ec399271b9e7a4945faf34e5.zip
gdb-cee86be37f49b8e1ec399271b9e7a4945faf34e5.tar.gz
gdb-cee86be37f49b8e1ec399271b9e7a4945faf34e5.tar.bz2
* rs6000-tdep.c: Delete unused function print_frame.
* frame.h (struct frame_info): Doc fix for next_frame. New field signal_handler_caller. blockframe.c (create_new_frame, get_prev_frame_info), config/rs6000/tm-rs6000.h (INIT_EXTRA_FRAME_INFO): Set it (needs INIT_FRAME_PC_FIRST). stack.c (print_frame_info), rs6000-tdep.c (rs6000_frame_chain): Check it.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 5aa7632..12d3361 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -892,23 +892,6 @@ extract_return_value (valtype, regbuf, valbuf)
CORE_ADDR rs6000_struct_return_address;
-/* Throw away this debugging code. FIXMEmgo. */
-void
-print_frame(fram)
-int fram;
-{
- int ii, val;
- for (ii=0; ii<40; ++ii) {
- if ((ii % 4) == 0)
- printf ("\n");
- val = read_memory_integer (fram + ii * 4, 4);
- printf ("0x%08x\t", val);
- }
- printf ("\n");
-}
-
-
-
/* Indirect function calls use a piece of trampoline code to do context
switching, i.e. to set the new TOC table. Skip such code if we are on
its first instruction (as when we have single-stepped to here).
@@ -1098,12 +1081,8 @@ rs6000_frame_chain (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 (thisframe->signal_handler_caller)
{
- /* 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
@@ -1114,6 +1093,9 @@ rs6000_frame_chain (thisframe)
#define SIG_FRAME_FP_OFFSET 284
fp = read_memory_integer (thisframe->frame + SIG_FRAME_FP_OFFSET, 4);
}
+ else
+ fp = read_memory_integer ((thisframe)->frame, 4);
+
return fp;
}