mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-31 18:20:12 +08:00
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.
This commit is contained in:
40
gdb/frame.h
40
gdb/frame.h
@ -93,6 +93,35 @@ extern void get_frame_id (struct frame_info *fi, struct frame_id *id);
|
||||
for an invalid frame). */
|
||||
extern int frame_relative_level (struct frame_info *fi);
|
||||
|
||||
/* Return the frame's type. Some are real, some are signal
|
||||
trampolines, and some are completly artificial (dummy). */
|
||||
|
||||
enum frame_type
|
||||
{
|
||||
/* A true stack frame, created by the target program during normal
|
||||
execution. */
|
||||
NORMAL_FRAME,
|
||||
/* A fake frame, created by GDB when performing an inferior function
|
||||
call. */
|
||||
DUMMY_FRAME,
|
||||
/* In a signal handler, various OSs handle this in various ways.
|
||||
The main thing is that the frame may be far from normal. */
|
||||
SIGTRAMP_FRAME
|
||||
};
|
||||
extern enum frame_type get_frame_type (struct frame_info *);
|
||||
|
||||
/* FIXME: cagney/2002-11-10: Some targets want to directly mark a
|
||||
frame as being of a specific type. This shouldn't be necessary.
|
||||
PC_IN_SIGTRAMP() indicates a SIGTRAMP_FRAME and PC_IN_CALL_DUMMY()
|
||||
indicates a DUMMY_FRAME. I suspect the real problem here is that
|
||||
get_prev_frame() only sets initialized after INIT_EXTRA_FRAME_INFO
|
||||
as been called. Consequently, some targets found that the frame's
|
||||
type was wrong and tried to fix it. The correct fix is to modify
|
||||
get_prev_frame() so that it initializes the frame's type before
|
||||
calling any other functions. */
|
||||
extern void deprecated_set_frame_type (struct frame_info *,
|
||||
enum frame_type type);
|
||||
|
||||
/* Unwind the stack frame so that the value of REGNUM, in the previous
|
||||
(up, older) frame is returned. If VALUEP is NULL, don't
|
||||
fetch/compute the value. Instead just return the location of the
|
||||
@ -227,15 +256,8 @@ struct frame_info
|
||||
moment leave this as speculation. */
|
||||
int level;
|
||||
|
||||
/* Nonzero if this is a frame associated with calling a signal handler.
|
||||
|
||||
Set by machine-dependent code. On some machines, if
|
||||
the machine-dependent code fails to check for this, the backtrace
|
||||
will look relatively normal. For example, on the i386
|
||||
#3 0x158728 in sighold ()
|
||||
On other machines (e.g. rs6000), the machine-dependent code better
|
||||
set this to prevent us from trying to print it like a normal frame. */
|
||||
int signal_handler_caller;
|
||||
/* The frame's type. */
|
||||
enum frame_type type;
|
||||
|
||||
/* For each register, address of where it was saved on entry to
|
||||
the frame, or zero if it was not saved on entry to this frame.
|
||||
|
Reference in New Issue
Block a user