2003-04-06 Andrew Cagney <cagney@redhat.com>
* frame.h (legacy_frame_chain_valid): Rename frame_chain_valid. Update comment. * frame.c (legacy_saved_regs_this_id): Update. (legacy_get_prev_frame): Update. * xstormy16-tdep.c: Update comment. * sparc-tdep.c (sparc_frame_chain): Update comment. * blockframe.c (legacy_frame_chain_valid): Update.
This commit is contained in:
parent
996179eebb
commit
e6ba3bc976
6 changed files with 36 additions and 22 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
2003-04-06 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
|
* frame.h (legacy_frame_chain_valid): Rename frame_chain_valid.
|
||||||
|
Update comment.
|
||||||
|
* frame.c (legacy_saved_regs_this_id): Update.
|
||||||
|
(legacy_get_prev_frame): Update.
|
||||||
|
* xstormy16-tdep.c: Update comment.
|
||||||
|
* sparc-tdep.c (sparc_frame_chain): Update comment.
|
||||||
|
* blockframe.c (legacy_frame_chain_valid): Update.
|
||||||
|
|
||||||
2003-04-06 Andrew Cagney <cagney@redhat.com>
|
2003-04-06 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
* valprint.c (val_print_type_code_int): Delete #ifdef
|
* valprint.c (val_print_type_code_int): Delete #ifdef
|
||||||
|
|
|
@ -554,12 +554,12 @@ deprecated_pc_in_call_dummy_at_entry_point (CORE_ADDR pc, CORE_ADDR sp,
|
||||||
&& (pc) <= (CALL_DUMMY_ADDRESS () + DECR_PC_AFTER_BREAK));
|
&& (pc) <= (CALL_DUMMY_ADDRESS () + DECR_PC_AFTER_BREAK));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Function: frame_chain_valid
|
/* Returns true for a user frame or a call_function_by_hand dummy
|
||||||
Returns true for a user frame or a call_function_by_hand dummy frame,
|
frame, and false for the CRT0 start-up frame. Purpose is to
|
||||||
and false for the CRT0 start-up frame. Purpose is to terminate backtrace. */
|
terminate backtrace. */
|
||||||
|
|
||||||
int
|
int
|
||||||
frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
|
legacy_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
|
||||||
{
|
{
|
||||||
/* Don't prune CALL_DUMMY frames. */
|
/* Don't prune CALL_DUMMY frames. */
|
||||||
if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
|
if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES
|
||||||
|
|
|
@ -821,7 +821,7 @@ legacy_saved_regs_this_id (struct frame_info *next_frame,
|
||||||
gdb_assert (DEPRECATED_FRAME_CHAIN_P ());
|
gdb_assert (DEPRECATED_FRAME_CHAIN_P ());
|
||||||
base = DEPRECATED_FRAME_CHAIN (next_frame);
|
base = DEPRECATED_FRAME_CHAIN (next_frame);
|
||||||
|
|
||||||
if (!frame_chain_valid (base, next_frame))
|
if (!legacy_frame_chain_valid (base, next_frame))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (base == 0)
|
if (base == 0)
|
||||||
|
@ -1246,7 +1246,7 @@ legacy_get_prev_frame (struct frame_info *this_frame)
|
||||||
gdb_assert (DEPRECATED_FRAME_CHAIN_P ());
|
gdb_assert (DEPRECATED_FRAME_CHAIN_P ());
|
||||||
address = DEPRECATED_FRAME_CHAIN (this_frame);
|
address = DEPRECATED_FRAME_CHAIN (this_frame);
|
||||||
|
|
||||||
if (!frame_chain_valid (address, this_frame))
|
if (!legacy_frame_chain_valid (address, this_frame))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (address == 0)
|
if (address == 0)
|
||||||
|
|
10
gdb/frame.h
10
gdb/frame.h
|
@ -455,10 +455,14 @@ enum print_what
|
||||||
extern void *frame_obstack_zalloc (unsigned long size);
|
extern void *frame_obstack_zalloc (unsigned long size);
|
||||||
#define FRAME_OBSTACK_ZALLOC(TYPE) ((TYPE *) frame_obstack_zalloc (sizeof (TYPE)))
|
#define FRAME_OBSTACK_ZALLOC(TYPE) ((TYPE *) frame_obstack_zalloc (sizeof (TYPE)))
|
||||||
|
|
||||||
/* If DEPRECATED_FRAME_CHAIN_VALID returns zero it means that the
|
/* If legacy_frame_chain_valid() returns zero it means that the given
|
||||||
given frame is the outermost one and has no caller. */
|
frame is the outermost one and has no caller.
|
||||||
|
|
||||||
extern int frame_chain_valid (CORE_ADDR, struct frame_info *);
|
This method has been superseeded by the per-architecture
|
||||||
|
frame_unwind_pc() (returns 0 to indicate an invalid return address)
|
||||||
|
and per-frame this_id() (returns a NULL frame ID to indicate an
|
||||||
|
invalid frame). */
|
||||||
|
extern int legacy_frame_chain_valid (CORE_ADDR, struct frame_info *);
|
||||||
|
|
||||||
extern void generic_save_dummy_frame_tos (CORE_ADDR sp);
|
extern void generic_save_dummy_frame_tos (CORE_ADDR sp);
|
||||||
|
|
||||||
|
|
|
@ -437,16 +437,17 @@ sparc_frame_chain (struct frame_info *frame)
|
||||||
about the chain value. If it really is zero, we detect it later
|
about the chain value. If it really is zero, we detect it later
|
||||||
in sparc_init_prev_frame.
|
in sparc_init_prev_frame.
|
||||||
|
|
||||||
Note: kevinb/2003-02-18: The constant 1 used to be returned
|
Note: kevinb/2003-02-18: The constant 1 used to be returned here,
|
||||||
here, but, after some recent changes to frame_chain_valid(),
|
but, after some recent changes to legacy_frame_chain_valid(),
|
||||||
this value is no longer suitable for causing frame_chain_valid()
|
this value is no longer suitable for causing
|
||||||
to "not worry about the chain value." The constant ~0 (i.e,
|
legacy_frame_chain_valid() to "not worry about the chain value."
|
||||||
0xfff...) causes the failing test in frame_chain_valid() to
|
The constant ~0 (i.e, 0xfff...) causes the failing test in
|
||||||
succeed thus preserving the "not worry" property. I had considered
|
legacy_frame_chain_valid() to succeed thus preserving the "not
|
||||||
using something like ``get_frame_base (frame) + 1''. However, I think
|
worry" property. I had considered using something like
|
||||||
a constant value is better, because when debugging this problem,
|
``get_frame_base (frame) + 1''. However, I think a constant
|
||||||
I knew that something funny was going on as soon as I saw the
|
value is better, because when debugging this problem, I knew that
|
||||||
constant 1 being used as the frame chain elsewhere in GDB. */
|
something funny was going on as soon as I saw the constant 1
|
||||||
|
being used as the frame chain elsewhere in GDB. */
|
||||||
|
|
||||||
return ~ (CORE_ADDR) 0;
|
return ~ (CORE_ADDR) 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -748,9 +748,8 @@ xstormy16_frame_init_saved_regs (struct frame_info *fi)
|
||||||
|
|
||||||
/* Function: xstormy16_frame_saved_pc
|
/* Function: xstormy16_frame_saved_pc
|
||||||
Returns the return address for the selected frame.
|
Returns the return address for the selected frame.
|
||||||
Called by frame_info, frame_chain_valid, and sometimes by
|
Called by frame_info, legacy_frame_chain_valid, and sometimes by
|
||||||
get_prev_frame.
|
get_prev_frame. */
|
||||||
*/
|
|
||||||
|
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
xstormy16_frame_saved_pc (struct frame_info *fi)
|
xstormy16_frame_saved_pc (struct frame_info *fi)
|
||||||
|
|
Loading…
Add table
Reference in a new issue