* gdbarch.sh (FRAME_CHAIN_VALID): Set default to
generic_func_frame_chain_valid. * gdbarch.h, gdbarch.c: Re-generate. * blockframe.c (generic_func_frame_chain_valid): Only check PC_IN_CALL_DUMMY when generic dummy frames. Don't worry about passing FP to PC_IN_CALL_DUMMY. Fix PR gdb/360.
This commit is contained in:
parent
2af496cb21
commit
ca0d0b529b
5 changed files with 24 additions and 4 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
2002-06-08 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
|
* gdbarch.sh (FRAME_CHAIN_VALID): Set default to
|
||||||
|
generic_func_frame_chain_valid.
|
||||||
|
* gdbarch.h, gdbarch.c: Re-generate.
|
||||||
|
* blockframe.c (generic_func_frame_chain_valid): Only check
|
||||||
|
PC_IN_CALL_DUMMY when generic dummy frames. Don't worry about
|
||||||
|
passing FP to PC_IN_CALL_DUMMY.
|
||||||
|
Fix PR gdb/360.
|
||||||
|
|
||||||
2002-06-08 Andrew Cagney <ac131313@redhat.com>
|
2002-06-08 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
* gdbarch.sh (struct gdbarch_data): Add field init_p.
|
* gdbarch.sh (struct gdbarch_data): Add field init_p.
|
||||||
|
|
|
@ -414,6 +414,15 @@ get_prev_frame (struct frame_info *next_frame)
|
||||||
start go curfluy than have an abort called from main not show
|
start go curfluy than have an abort called from main not show
|
||||||
main. */
|
main. */
|
||||||
address = FRAME_CHAIN (next_frame);
|
address = FRAME_CHAIN (next_frame);
|
||||||
|
|
||||||
|
/* FIXME: cagney/2002-06-08: There should be two tests here.
|
||||||
|
The first would check for a valid frame chain based on a user
|
||||||
|
selectable policy. The default being ``stop at main'' (as
|
||||||
|
implemented by generic_func_frame_chain_valid()). Other
|
||||||
|
policies would be available - stop at NULL, .... The second
|
||||||
|
test, if provided by the target architecture, would check for
|
||||||
|
more exotic cases - most target architectures wouldn't bother
|
||||||
|
with this second case. */
|
||||||
if (!FRAME_CHAIN_VALID (address, next_frame))
|
if (!FRAME_CHAIN_VALID (address, next_frame))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1298,7 +1307,8 @@ generic_file_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
|
||||||
int
|
int
|
||||||
generic_func_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
|
generic_func_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
|
||||||
{
|
{
|
||||||
if (PC_IN_CALL_DUMMY ((fi)->pc, fp, fp))
|
if (USE_GENERIC_DUMMY_FRAMES
|
||||||
|
&& PC_IN_CALL_DUMMY ((fi)->pc, 0, 0))
|
||||||
return 1; /* don't prune CALL_DUMMY frames */
|
return 1; /* don't prune CALL_DUMMY frames */
|
||||||
else /* fall back to default algorithm (see frame.h) */
|
else /* fall back to default algorithm (see frame.h) */
|
||||||
return (fp != 0
|
return (fp != 0
|
||||||
|
|
|
@ -523,7 +523,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
|
||||||
current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
|
current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
|
||||||
current_gdbarch->frame_args_skip = -1;
|
current_gdbarch->frame_args_skip = -1;
|
||||||
current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
|
current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
|
||||||
current_gdbarch->frame_chain_valid = func_frame_chain_valid;
|
current_gdbarch->frame_chain_valid = generic_func_frame_chain_valid;
|
||||||
current_gdbarch->extra_stack_alignment_needed = 1;
|
current_gdbarch->extra_stack_alignment_needed = 1;
|
||||||
current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
|
current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
|
||||||
current_gdbarch->addr_bits_remove = core_addr_identity;
|
current_gdbarch->addr_bits_remove = core_addr_identity;
|
||||||
|
|
|
@ -1887,7 +1887,7 @@ extern void set_gdbarch_frame_chain (struct gdbarch *gdbarch, gdbarch_frame_chai
|
||||||
|
|
||||||
/* Default (function) for non- multi-arch platforms. */
|
/* Default (function) for non- multi-arch platforms. */
|
||||||
#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID)
|
#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID)
|
||||||
#define FRAME_CHAIN_VALID(chain, thisframe) (func_frame_chain_valid (chain, thisframe))
|
#define FRAME_CHAIN_VALID(chain, thisframe) (generic_func_frame_chain_valid (chain, thisframe))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef int (gdbarch_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
|
typedef int (gdbarch_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe);
|
||||||
|
|
|
@ -567,7 +567,7 @@ f:2:FRAME_CHAIN:CORE_ADDR:frame_chain:struct frame_info *frame:frame::0:0
|
||||||
# XXXX - both default and alternate frame_chain_valid functions are
|
# XXXX - both default and alternate frame_chain_valid functions are
|
||||||
# deprecated. New code should use dummy frames and one of the generic
|
# deprecated. New code should use dummy frames and one of the generic
|
||||||
# functions.
|
# functions.
|
||||||
f:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe:::func_frame_chain_valid::0
|
f:2:FRAME_CHAIN_VALID:int:frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe:::generic_func_frame_chain_valid::0
|
||||||
f:2:FRAME_SAVED_PC:CORE_ADDR:frame_saved_pc:struct frame_info *fi:fi::0:0
|
f:2:FRAME_SAVED_PC:CORE_ADDR:frame_saved_pc:struct frame_info *fi:fi::0:0
|
||||||
f:2:FRAME_ARGS_ADDRESS:CORE_ADDR:frame_args_address:struct frame_info *fi:fi::0:0
|
f:2:FRAME_ARGS_ADDRESS:CORE_ADDR:frame_args_address:struct frame_info *fi:fi::0:0
|
||||||
f:2:FRAME_LOCALS_ADDRESS:CORE_ADDR:frame_locals_address:struct frame_info *fi:fi::0:0
|
f:2:FRAME_LOCALS_ADDRESS:CORE_ADDR:frame_locals_address:struct frame_info *fi:fi::0:0
|
||||||
|
|
Loading…
Reference in a new issue