mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
Convert SKIP_PROLOGUE_FRAMELESS_P into PROLOGUE_FRAMELESS_P.
This commit is contained in:
parent
0ca652e9ec
commit
dad41f9aa4
@ -1,3 +1,12 @@
|
||||
Fri Apr 28 16:22:34 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* blockframe.c (frameless_look_for_prologue): Use
|
||||
PROLOG_FRAMELESS_P instead of SKIP_PROLOGUE_FRAMELESS_P.
|
||||
* gdbarch.sh (PROLOG_FRAMELESS_P): Define.
|
||||
* gdbarch.h, gdbarch.c: Re-generate.
|
||||
* arch-utils.h, arch-utils.c (generic_prologue_frameless_p): New
|
||||
function.
|
||||
|
||||
Fri Apr 28 15:31:10 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
From "Serge Nikulin" <nikulin@actsw.amat.com>:
|
||||
|
@ -133,6 +133,17 @@ generic_remote_translate_xfer_address (CORE_ADDR gdb_addr, int gdb_len,
|
||||
*rem_len = gdb_len;
|
||||
}
|
||||
|
||||
int
|
||||
generic_prologue_frameless_p (CORE_ADDR ip)
|
||||
{
|
||||
#ifdef SKIP_PROLOGUE_FRAMELESS_P
|
||||
return ip == SKIP_PROLOGUE_FRAMELESS_P (ip);
|
||||
#else
|
||||
return ip == SKIP_PROLOGUE (ip);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
extern initialize_file_ftype __initialize_gdbarch_utils;
|
||||
|
@ -54,4 +54,9 @@ extern int legacy_sizeof_call_dummy_words;
|
||||
/* Typical remote_translate_xfer_address */
|
||||
extern gdbarch_remote_translate_xfer_address_ftype generic_remote_translate_xfer_address;
|
||||
|
||||
/* Generic implementation of prologue_frameless_p. Just calls
|
||||
SKIP_PROLOG and checks the return value to see if it actually
|
||||
changed. */
|
||||
extern gdbarch_prologue_frameless_p_ftype generic_prologue_frameless_p;
|
||||
|
||||
#endif
|
||||
|
@ -300,15 +300,9 @@ frameless_look_for_prologue (frame)
|
||||
if (func_start)
|
||||
{
|
||||
func_start += FUNCTION_START_OFFSET;
|
||||
after_prologue = func_start;
|
||||
#ifdef SKIP_PROLOGUE_FRAMELESS_P
|
||||
/* This is faster, since only care whether there *is* a
|
||||
prologue, not how long it is. */
|
||||
after_prologue = SKIP_PROLOGUE_FRAMELESS_P (after_prologue);
|
||||
#else
|
||||
after_prologue = SKIP_PROLOGUE (after_prologue);
|
||||
#endif
|
||||
return after_prologue == func_start;
|
||||
return PROLOGUE_FRAMELESS_P (func_start);
|
||||
}
|
||||
else if (frame->pc == 0)
|
||||
/* A frame with a zero PC is usually created by dereferencing a
|
||||
|
@ -197,6 +197,7 @@ struct gdbarch
|
||||
gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
|
||||
gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
|
||||
gdbarch_skip_prologue_ftype *skip_prologue;
|
||||
gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
|
||||
gdbarch_inner_than_ftype *inner_than;
|
||||
gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
|
||||
gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
|
||||
@ -321,6 +322,7 @@ struct gdbarch startup_gdbarch = {
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
/* startup_gdbarch() */
|
||||
};
|
||||
struct gdbarch *current_gdbarch = &startup_gdbarch;
|
||||
@ -366,6 +368,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
|
||||
gdbarch->pointer_to_address = generic_pointer_to_address;
|
||||
gdbarch->address_to_pointer = generic_address_to_pointer;
|
||||
gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
|
||||
gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
|
||||
gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
|
||||
gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
|
||||
gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
|
||||
@ -578,6 +581,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
|
||||
if ((GDB_MULTI_ARCH >= 2)
|
||||
&& (gdbarch->skip_prologue == 0))
|
||||
internal_error ("gdbarch: verify_gdbarch: skip_prologue invalid");
|
||||
/* Skip verify of prologue_frameless_p, invalid_p == 0 */
|
||||
if ((GDB_MULTI_ARCH >= 2)
|
||||
&& (gdbarch->inner_than == 0))
|
||||
internal_error ("gdbarch: verify_gdbarch: inner_than invalid");
|
||||
@ -892,6 +896,10 @@ gdbarch_dump (void)
|
||||
"gdbarch_update: SKIP_PROLOGUE = 0x%08lx\n",
|
||||
(long) current_gdbarch->skip_prologue
|
||||
/*SKIP_PROLOGUE ()*/);
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"gdbarch_update: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
|
||||
(long) current_gdbarch->prologue_frameless_p
|
||||
/*PROLOGUE_FRAMELESS_P ()*/);
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"gdbarch_update: INNER_THAN = 0x%08lx\n",
|
||||
(long) current_gdbarch->inner_than
|
||||
@ -2208,6 +2216,25 @@ set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
|
||||
gdbarch->skip_prologue = skip_prologue;
|
||||
}
|
||||
|
||||
int
|
||||
gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
|
||||
{
|
||||
if (GDB_MULTI_ARCH == 0)
|
||||
return generic_prologue_frameless_p (ip);
|
||||
if (gdbarch->prologue_frameless_p == 0)
|
||||
internal_error ("gdbarch: gdbarch_prologue_frameless_p invalid");
|
||||
if (gdbarch_debug >= 2)
|
||||
fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
|
||||
return gdbarch->prologue_frameless_p (ip);
|
||||
}
|
||||
|
||||
void
|
||||
set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
|
||||
gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
|
||||
{
|
||||
gdbarch->prologue_frameless_p = prologue_frameless_p;
|
||||
}
|
||||
|
||||
int
|
||||
gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
|
||||
{
|
||||
|
@ -659,6 +659,13 @@ extern void set_gdbarch_skip_prologue (struct gdbarch *gdbarch, gdbarch_skip_pro
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef int (gdbarch_prologue_frameless_p_ftype) (CORE_ADDR ip);
|
||||
extern int gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip);
|
||||
extern void set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, gdbarch_prologue_frameless_p_ftype *prologue_frameless_p);
|
||||
#if (GDB_MULTI_ARCH > 1) || !defined (PROLOGUE_FRAMELESS_P)
|
||||
#define PROLOGUE_FRAMELESS_P(ip) (gdbarch_prologue_frameless_p (current_gdbarch, ip))
|
||||
#endif
|
||||
|
||||
typedef int (gdbarch_inner_than_ftype) (CORE_ADDR lhs, CORE_ADDR rhs);
|
||||
extern int gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs);
|
||||
extern void set_gdbarch_inner_than (struct gdbarch *gdbarch, gdbarch_inner_than_ftype *inner_than);
|
||||
|
@ -302,6 +302,7 @@ f:2:FRAME_INIT_SAVED_REGS:void:frame_init_saved_regs:struct frame_info *frame:fr
|
||||
f:2:INIT_EXTRA_FRAME_INFO:void:init_extra_frame_info:int fromleaf, struct frame_info *frame:fromleaf, frame:::0
|
||||
#
|
||||
f:2:SKIP_PROLOGUE:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip::0:0
|
||||
f:2:PROLOGUE_FRAMELESS_P:int:prologue_frameless_p:CORE_ADDR ip:ip::0:generic_prologue_frameless_p:0
|
||||
f:2:INNER_THAN:int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs::0:0
|
||||
f:2:BREAKPOINT_FROM_PC:unsigned char *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr:::legacy_breakpoint_from_pc:0
|
||||
f:2:MEMORY_INSERT_BREAKPOINT:int:memory_insert_breakpoint:CORE_ADDR addr, char *contents_cache:addr, contents_cache::0:default_memory_insert_breakpoint:0
|
||||
|
Loading…
Reference in New Issue
Block a user