2004-05-01 Andrew Cagney <cagney@redhat.com>

* frame.h (deprecated_set_frame_type): Delete declaration.
	* frame.c (deprecated_set_frame_type): Delete function, update
	comments.
This commit is contained in:
Andrew Cagney 2004-05-01 19:02:11 +00:00
parent fcf70625fc
commit 55699d593f
3 changed files with 27 additions and 46 deletions

View file

@ -1,5 +1,9 @@
2004-05-01 Andrew Cagney <cagney@redhat.com> 2004-05-01 Andrew Cagney <cagney@redhat.com>
* frame.h (deprecated_set_frame_type): Delete declaration.
* frame.c (deprecated_set_frame_type): Delete function, update
comments.
* gdbarch.sh (DEPRECATED_PC_IN_SIGTRAMP): Delete. * gdbarch.sh (DEPRECATED_PC_IN_SIGTRAMP): Delete.
* gdbarch.h, gdbarch.c: Re-generate. * gdbarch.h, gdbarch.c: Re-generate.
* shnbsd-tdep.c (shnbsd_init_abi): Do not set pc_in_sigtramp. * shnbsd-tdep.c (shnbsd_init_abi): Do not set pc_in_sigtramp.

View file

@ -67,10 +67,10 @@ struct frame_info
int level; int level;
/* The frame's type. */ /* The frame's type. */
/* FIXME: cagney/2003-04-02: Should instead be returning /* FIXME: cagney/2004-05-01: Should instead just use ->unwind->type.
->unwind->type. Unfortunately, legacy code is still explicitly Unfortunately, legacy_get_prev_frame is still explicitly setting
setting the type using the method deprecated_set_frame_type. the type. Eliminate that method and this field can be
Eliminate that method and this field can be eliminated. */ eliminated. */
enum frame_type type; enum frame_type type;
/* For each register, address of where it was saved on entry to the /* For each register, address of where it was saved on entry to the
@ -233,11 +233,10 @@ get_frame_id (struct frame_info *fi)
{ {
fi->unwind = frame_unwind_find_by_frame (fi->next, fi->unwind = frame_unwind_find_by_frame (fi->next,
&fi->prologue_cache); &fi->prologue_cache);
/* FIXME: cagney/2003-04-02: Rather than storing the frame's /* FIXME: cagney/2004-05-01: Should instead just use
type in the frame, the unwinder's type should be returned ->unwind->type. Unfortunately, legacy_get_prev_frame is
directly. Unfortunately legacy code, called by still explicitly setting the type. Eliminate that method
legacy_get_prev_frame(), explicitly sets the frame's type and this field can be eliminated. */
using the method deprecated_set_frame_type(). */
fi->type = fi->unwind->type; fi->type = fi->unwind->type;
} }
/* Find THIS frame's ID. */ /* Find THIS frame's ID. */
@ -548,11 +547,10 @@ frame_register_unwind (struct frame_info *frame, int regnum,
{ {
frame->unwind = frame_unwind_find_by_frame (frame->next, frame->unwind = frame_unwind_find_by_frame (frame->next,
&frame->prologue_cache); &frame->prologue_cache);
/* FIXME: cagney/2003-04-02: Rather than storing the frame's /* FIXME: cagney/2004-05-01: Should instead just use ->unwind->type.
type in the frame, the unwinder's type should be returned Unfortunately, legacy_get_prev_frame is still explicitly setting
directly. Unfortunately, legacy code, called by the type. Eliminate that method and this field can be
legacy_get_prev_frame(), explicitly set the frames type using eliminated. */
the method deprecated_set_frame_type(). */
frame->type = frame->unwind->type; frame->type = frame->unwind->type;
} }
@ -1507,11 +1505,10 @@ legacy_get_prev_frame (struct frame_info *this_frame)
/* Find PREV frame's unwinder. */ /* Find PREV frame's unwinder. */
prev->unwind = frame_unwind_find_by_frame (this_frame, prev->unwind = frame_unwind_find_by_frame (this_frame,
&prev->prologue_cache); &prev->prologue_cache);
/* FIXME: cagney/2003-04-02: Rather than storing the frame's /* FIXME: cagney/2004-05-01: Should instead just use
type in the frame, the unwinder's type should be returned ->unwind->type. Unfortunately, legacy_get_prev_frame is
directly. Unfortunately, legacy code, called by still explicitly setting the type. Eliminate that method
legacy_get_prev_frame(), explicitly set the frames type and this field can be eliminated. */
using the method deprecated_set_frame_type(). */
prev->type = prev->unwind->type; prev->type = prev->unwind->type;
/* Find PREV frame's ID. */ /* Find PREV frame's ID. */
prev->unwind->this_id (this_frame, prev->unwind->this_id (this_frame,
@ -2105,11 +2102,10 @@ get_frame_type (struct frame_info *frame)
provides the frame's type. */ provides the frame's type. */
frame->unwind = frame_unwind_find_by_frame (frame->next, frame->unwind = frame_unwind_find_by_frame (frame->next,
&frame->prologue_cache); &frame->prologue_cache);
/* FIXME: cagney/2003-04-02: Rather than storing the frame's /* FIXME: cagney/2004-05-01: Should instead just use
type in the frame, the unwinder's type should be returned ->unwind->type. Unfortunately, legacy_get_prev_frame is
directly. Unfortunately, legacy code, called by still explicitly setting the type. Eliminate that method and
legacy_get_prev_frame(), explicitly set the frames type using this field can be eliminated. */
the method deprecated_set_frame_type(). */
frame->type = frame->unwind->type; frame->type = frame->unwind->type;
} }
if (frame->type == UNKNOWN_FRAME) if (frame->type == UNKNOWN_FRAME)
@ -2118,13 +2114,6 @@ get_frame_type (struct frame_info *frame)
return frame->type; return frame->type;
} }
void
deprecated_set_frame_type (struct frame_info *frame, enum frame_type type)
{
/* Arrrg! See comment in "frame.h". */
frame->type = type;
}
struct frame_extra_info * struct frame_extra_info *
get_frame_extra_info (struct frame_info *fi) get_frame_extra_info (struct frame_info *fi)
{ {

View file

@ -343,9 +343,9 @@ extern int frame_relative_level (struct frame_info *fi);
enum frame_type enum frame_type
{ {
/* The frame's type hasn't yet been defined. This is a catch-all /* The frame's type hasn't yet been defined. This is a catch-all
for legacy code that uses really strange technicques, such as for legacy_get_prev_frame that uses really strange techniques to
deprecated_set_frame_type, to set the frame's type. New code determine the frame's type. New code should not use this
should not use this value. */ value. */
UNKNOWN_FRAME, UNKNOWN_FRAME,
/* A true stack frame, created by the target program during normal /* A true stack frame, created by the target program during normal
execution. */ execution. */
@ -359,18 +359,6 @@ enum frame_type
}; };
extern enum frame_type get_frame_type (struct frame_info *); 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.
DEPRECATED_PC_IN_CALL_DUMMY() indicates a DUMMY_FRAME. I suspect
the real problem here is that get_prev_frame() only sets
initialized after DEPRECATED_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 /* Unwind the stack frame so that the value of REGNUM, in the previous
(up, older) frame is returned. If VALUEP is NULL, don't (up, older) frame is returned. If VALUEP is NULL, don't
fetch/compute the value. Instead just return the location of the fetch/compute the value. Instead just return the location of the