summaryrefslogtreecommitdiff
path: root/gdb/i386-tdep.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-11-18 22:19:33 +0000
committerAndrew Cagney <cagney@redhat.com>2002-11-18 22:19:33 +0000
commit797afe95d4006be6d9a1c70039998b732bd99ae8 (patch)
tree2b90d1e03c7a90ea71b0e288fd52d9ad1f61cc00 /gdb/i386-tdep.c
parentb10bf9d26d80c767faaa85a7e54295eebc1addca (diff)
downloadgdb-797afe95d4006be6d9a1c70039998b732bd99ae8.tar.gz
2002-11-18 Andrew Cagney <ac131313@redhat.com>
* frame.h (enum frame_type): Define. (get_frame_type): Declare. (struct frame_info): Add field `type'. Delete field signal_handler_caller. (deprecated_set_frame_signal_handler_caller): Declare. * frame.c (get_frame_type): New function. (deprecated_set_frame_type): New function. (create_new_frame): Set the frame's type. (get_prev_frame): Similar. * sparc-tdep.c: Use get_frame_type instead of signal_handler_caller. * s390-tdep.c: Ditto. * m68klinux-nat.c: Ditto. * ns32k-tdep.c: Ditto. * x86-64-linux-tdep.c: Ditto. * vax-tdep.c: Ditto. * rs6000-tdep.c: Ditto. * ppc-linux-tdep.c: Ditto. * i386-interix-tdep.c: Ditto. * mips-tdep.c: Ditto. * m68k-tdep.c: Ditto. * hppa-tdep.c: Ditto. * ia64-tdep.c: Ditto. * cris-tdep.c: Ditto. * arm-tdep.c: Ditto. * alpha-tdep.c: Ditto. * i386-tdep.c: Ditto. * stack.c: Ditto. * ada-lang.c: Ditto. * blockframe.c: Update. * i386-interix-tdep.c (i386_interix_back_one_frame): Use deprecated_set_frame_type instead of signal_handler_caller. * ppc-linux-tdep.c (ppc_linux_init_extra_frame_info): Ditto. * rs6000-tdep.c (rs6000_init_extra_frame_info): Ditto. * breakpoint.h: Delete FIXME suggesting get_frame_type. Index: tui/ChangeLog 2002-11-18 Andrew Cagney <ac131313@redhat.com> * tuiStack.c (tuiShowFrameInfo): Use get_frame_type instead of signal_handler_caller.
Diffstat (limited to 'gdb/i386-tdep.c')
-rw-r--r--gdb/i386-tdep.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 579652fcb6d..d1336a03602 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -472,17 +472,16 @@ i386_get_frame_setup (CORE_ADDR pc)
frame -- that is, the frame which was in progress when the signal
trampoline was entered. GDB mostly treats this frame pointer value
as a magic cookie. We detect the case of a signal trampoline by
- looking at the SIGNAL_HANDLER_CALLER field, which is set based on
- PC_IN_SIGTRAMP.
+ testing for get_frame_type() == SIGTRAMP_FRAME, which is set based
+ on PC_IN_SIGTRAMP.
When a signal trampoline is invoked from a frameless function, we
essentially have two frameless functions in a row. In this case,
we use the same magic cookie for three frames in a row. We detect
- this case by seeing whether the next frame has
- SIGNAL_HANDLER_CALLER set, and, if it does, checking whether the
- current frame is actually frameless. In this case, we need to get
- the PC by looking at the SP register value stored in the signal
- context.
+ this case by seeing whether the next frame is a SIGTRAMP_FRAME,
+ and, if it does, checking whether the current frame is actually
+ frameless. In this case, we need to get the PC by looking at the
+ SP register value stored in the signal context.
This should work in most cases except in horrible situations where
a signal occurs just as we enter a function but before the frame
@@ -498,7 +497,7 @@ i386_get_frame_setup (CORE_ADDR pc)
int
i386_frameless_signal_p (struct frame_info *frame)
{
- return (frame->next && frame->next->signal_handler_caller
+ return (frame->next && get_frame_type (frame->next) == SIGTRAMP_FRAME
&& (frameless_look_for_prologue (frame)
|| frame->pc == get_pc_function_start (frame->pc)));
}
@@ -513,7 +512,7 @@ i386_frame_chain (struct frame_info *frame)
if (PC_IN_CALL_DUMMY (frame->pc, 0, 0))
return frame->frame;
- if (frame->signal_handler_caller
+ if (get_frame_type (frame) == SIGTRAMP_FRAME
|| i386_frameless_signal_p (frame))
return frame->frame;
@@ -530,7 +529,7 @@ i386_frame_chain (struct frame_info *frame)
static int
i386_frameless_function_invocation (struct frame_info *frame)
{
- if (frame->signal_handler_caller)
+ if (get_frame_type (frame) == SIGTRAMP_FRAME)
return 0;
return frameless_look_for_prologue (frame);
@@ -575,7 +574,7 @@ i386_frame_saved_pc (struct frame_info *frame)
return pc;
}
- if (frame->signal_handler_caller)
+ if (get_frame_type (frame) == SIGTRAMP_FRAME)
return i386_sigtramp_saved_pc (frame);
if (i386_frameless_signal_p (frame))
@@ -592,7 +591,7 @@ i386_frame_saved_pc (struct frame_info *frame)
static CORE_ADDR
i386_saved_pc_after_call (struct frame_info *frame)
{
- if (frame->signal_handler_caller)
+ if (get_frame_type (frame) == SIGTRAMP_FRAME)
return i386_sigtramp_saved_pc (frame);
return read_memory_unsigned_integer (read_register (SP_REGNUM), 4);