mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
Change INIT_EXTRA_FRAME_INFO() to a function with predicate.
This commit is contained in:
parent
0a2a5e0f3c
commit
5fdff4261c
@ -1,3 +1,12 @@
|
||||
2001-11-05 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
* gdbarch.sh (init_extra_frame_info): Change to a function with
|
||||
pedicate.
|
||||
* gdbarch.h, gdbarch.c: Re-generate.
|
||||
* blockframe.c (create_new_frame): Replace #ifdef
|
||||
INIT_EXTRA_FRAME_INFO with run-time test of
|
||||
INIT_EXTRA_FRAME_INFO_P.
|
||||
|
||||
2001-11-05 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
* gdbarch.sh (verify_gdbarch): Use a mem_file to accumulate all
|
||||
|
@ -227,9 +227,8 @@ create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
|
||||
find_pc_partial_function (pc, &name, (CORE_ADDR *) NULL, (CORE_ADDR *) NULL);
|
||||
fi->signal_handler_caller = IN_SIGTRAMP (fi->pc, name);
|
||||
|
||||
#ifdef INIT_EXTRA_FRAME_INFO
|
||||
INIT_EXTRA_FRAME_INFO (0, fi);
|
||||
#endif
|
||||
if (INIT_EXTRA_FRAME_INFO_P ())
|
||||
INIT_EXTRA_FRAME_INFO (0, fi);
|
||||
|
||||
return fi;
|
||||
}
|
||||
|
@ -694,9 +694,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
|
||||
if ((GDB_MULTI_ARCH >= 2)
|
||||
&& (gdbarch->frame_init_saved_regs == 0))
|
||||
fprintf_unfiltered (log, "\n\tframe_init_saved_regs");
|
||||
if ((GDB_MULTI_ARCH >= 2)
|
||||
&& (gdbarch->init_extra_frame_info == 0))
|
||||
fprintf_unfiltered (log, "\n\tinit_extra_frame_info");
|
||||
/* Skip verify of init_extra_frame_info, has predicate */
|
||||
if ((GDB_MULTI_ARCH >= 2)
|
||||
&& (gdbarch->skip_prologue == 0))
|
||||
fprintf_unfiltered (log, "\n\tskip_prologue");
|
||||
@ -3615,6 +3613,12 @@ set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
|
||||
gdbarch->frame_init_saved_regs = frame_init_saved_regs;
|
||||
}
|
||||
|
||||
int
|
||||
gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch)
|
||||
{
|
||||
return gdbarch->init_extra_frame_info != 0;
|
||||
}
|
||||
|
||||
void
|
||||
gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
|
||||
{
|
||||
|
@ -1441,6 +1441,31 @@ extern void set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, gdbarch_
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (INIT_EXTRA_FRAME_INFO)
|
||||
/* Legacy for systems yet to multi-arch INIT_EXTRA_FRAME_INFO */
|
||||
#if !defined (INIT_EXTRA_FRAME_INFO_P)
|
||||
#define INIT_EXTRA_FRAME_INFO_P() (1)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Default predicate for non- multi-arch targets. */
|
||||
#if (!GDB_MULTI_ARCH) && !defined (INIT_EXTRA_FRAME_INFO_P)
|
||||
#define INIT_EXTRA_FRAME_INFO_P() (0)
|
||||
#endif
|
||||
|
||||
extern int gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch);
|
||||
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (INIT_EXTRA_FRAME_INFO_P)
|
||||
#error "Non multi-arch definition of INIT_EXTRA_FRAME_INFO"
|
||||
#endif
|
||||
#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (INIT_EXTRA_FRAME_INFO_P)
|
||||
#define INIT_EXTRA_FRAME_INFO_P() (gdbarch_init_extra_frame_info_p (current_gdbarch))
|
||||
#endif
|
||||
|
||||
/* Default (function) for non- multi-arch platforms. */
|
||||
#if (!GDB_MULTI_ARCH) && !defined (INIT_EXTRA_FRAME_INFO)
|
||||
#define INIT_EXTRA_FRAME_INFO(fromleaf, frame) (internal_error (__FILE__, __LINE__, "INIT_EXTRA_FRAME_INFO"), 0)
|
||||
#endif
|
||||
|
||||
typedef void (gdbarch_init_extra_frame_info_ftype) (int fromleaf, struct frame_info *frame);
|
||||
extern void gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame);
|
||||
extern void set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, gdbarch_init_extra_frame_info_ftype *init_extra_frame_info);
|
||||
|
@ -487,7 +487,7 @@ F:2:EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:extract_struct_value_address:char *re
|
||||
f:2:USE_STRUCT_CONVENTION:int:use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type:::0
|
||||
#
|
||||
f:2:FRAME_INIT_SAVED_REGS:void:frame_init_saved_regs:struct frame_info *frame:frame::0:0
|
||||
f:2:INIT_EXTRA_FRAME_INFO:void:init_extra_frame_info:int fromleaf, struct frame_info *frame:fromleaf, frame:::0
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user