* 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.
This commit is contained in:
Jim Kingdon 1993-04-20 18:02:54 +00:00
parent 01f5a1f825
commit cee86be37f
3 changed files with 25 additions and 22 deletions

View file

@ -1,3 +1,15 @@
Tue Apr 20 08:55:11 1993 Jim Kingdon (kingdon@cygnus.com)
* 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.
Mon Apr 19 22:52:33 1993 Stu Grossman (grossman@cygnus.com) Mon Apr 19 22:52:33 1993 Stu Grossman (grossman@cygnus.com)
* irix4-nat.c (fetch_core_registers): Special version of this for * irix4-nat.c (fetch_core_registers): Special version of this for

View file

@ -892,23 +892,6 @@ extract_return_value (valtype, regbuf, valbuf)
CORE_ADDR rs6000_struct_return_address; 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 /* 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 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). its first instruction (as when we have single-stepped to here).
@ -1098,12 +1081,8 @@ rs6000_frame_chain (thisframe)
FRAME_ADDR fp; FRAME_ADDR fp;
if (inside_entry_file ((thisframe)->pc)) if (inside_entry_file ((thisframe)->pc))
return 0; return 0;
fp = read_memory_integer ((thisframe)->frame, 4); if (thisframe->signal_handler_caller)
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 /* This was determined by experimentation on AIX 3.2. Perhaps
it corresponds to some offset in /usr/include/sys/user.h or it corresponds to some offset in /usr/include/sys/user.h or
something like that. Using some system include file would something like that. Using some system include file would
@ -1114,6 +1093,9 @@ rs6000_frame_chain (thisframe)
#define SIG_FRAME_FP_OFFSET 284 #define SIG_FRAME_FP_OFFSET 284
fp = read_memory_integer (thisframe->frame + SIG_FRAME_FP_OFFSET, 4); fp = read_memory_integer (thisframe->frame + SIG_FRAME_FP_OFFSET, 4);
} }
else
fp = read_memory_integer ((thisframe)->frame, 4);
return fp; return fp;
} }

View file

@ -152,6 +152,15 @@ print_frame_info (fi, level, source, args)
printf_filtered ("<function called from gdb>\n"); printf_filtered ("<function called from gdb>\n");
return; return;
} }
if (fi->signal_handler_caller)
{
/* Do this regardless of SOURCE because we don't have any source
to list for this frame. */
if (level >= 0)
printf_filtered ("#%-2d ", level);
printf_filtered ("<signal handler called>\n");
return;
}
sal = find_pc_line (fi->pc, fi->next_frame); sal = find_pc_line (fi->pc, fi->next_frame);
func = find_pc_function (fi->pc); func = find_pc_function (fi->pc);