From 983a287a6f078fd4b5eeff0083fd557db71883b7 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Mon, 9 Jun 2003 17:35:59 +0000 Subject: 2003-06-09 Andrew Cagney * gdbarch.sh (FRAME_NUM_ARGS): Change to function with predicate. * gdbarch.h, gdbarch.c: Re-generate. * arch-utils.h (frame_num_args_unknown): Delete both declarations. * arch-utils.c (frame_num_args_unknown): Delete function. * stack.c (print_args_stub): Use FRAME_NUM_ARGS_P. (frame_info): Use FRAME_NUM_ARGS_P. * arm-tdep.c (arm_frame_num_args): Delete function. (arm_gdbarch_init): Do not set frame_num_args. * config/pa/tm-hppa64.h (FRAME_NUM_ARGS): Delete. * hppa-tdep.c (hppa_frame_num_args): Delete function. (hppa_gdbarch_init): Do not set frame_num_args. * config/sparc/tm-sparc.h (FRAME_NUM_ARGS): Delete. * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set frame_num_args to default frame_num_args_unknown. * v850-tdep.c (v850_gdbarch_init): Ditto. * sparc-tdep.c (sparc_gdbarch_init): Ditto. * sh-tdep.c (sh_gdbarch_init): Ditto. * s390-tdep.c (s390_gdbarch_init): Ditto. * rs6000-tdep.c (rs6000_gdbarch_init): Ditto. * mn10300-tdep.c (mn10300_gdbarch_init): Ditto. * mips-tdep.c (mips_gdbarch_init): Ditto. * mcore-tdep.c (mcore_gdbarch_init): Ditto. * m68k-tdep.c (m68k_gdbarch_init): Ditto. * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto. * ia64-tdep.c (ia64_gdbarch_init): Ditto. * i386-tdep.c (i386_gdbarch_init): Ditto. * h8300-tdep.c (h8300_gdbarch_init): Ditto. * frv-tdep.c (frv_gdbarch_init): Ditto. * d10v-tdep.c (d10v_gdbarch_init): Ditto. * cris-tdep.c (cris_gdbarch_init): Ditto. * avr-tdep.c (avr_gdbarch_init): Ditto. * alpha-tdep.c (alpha_gdbarch_init): Ditto. --- gdb/gdbarch.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gdb/gdbarch.h') diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index e9895cf..778d7a3 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -2331,6 +2331,31 @@ extern void set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, #define DEPRECATED_SAVED_PC_AFTER_CALL(frame) (gdbarch_deprecated_saved_pc_after_call (current_gdbarch, frame)) #endif +#if defined (FRAME_NUM_ARGS) +/* Legacy for systems yet to multi-arch FRAME_NUM_ARGS */ +#if !defined (FRAME_NUM_ARGS_P) +#define FRAME_NUM_ARGS_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS_P) +#define FRAME_NUM_ARGS_P() (0) +#endif + +extern int gdbarch_frame_num_args_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_NUM_ARGS_P) +#error "Non multi-arch definition of FRAME_NUM_ARGS" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_NUM_ARGS_P) +#define FRAME_NUM_ARGS_P() (gdbarch_frame_num_args_p (current_gdbarch)) +#endif + +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (FRAME_NUM_ARGS) +#define FRAME_NUM_ARGS(frame) (internal_error (__FILE__, __LINE__, "FRAME_NUM_ARGS"), 0) +#endif + typedef int (gdbarch_frame_num_args_ftype) (struct frame_info *frame); extern int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame); extern void set_gdbarch_frame_num_args (struct gdbarch *gdbarch, gdbarch_frame_num_args_ftype *frame_num_args); -- cgit v1.1