diff options
-rw-r--r-- | gdb/ChangeLog | 35 | ||||
-rw-r--r-- | gdb/alpha-tdep.c | 1 | ||||
-rw-r--r-- | gdb/arch-utils.c | 7 | ||||
-rw-r--r-- | gdb/arch-utils.h | 9 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 9 | ||||
-rw-r--r-- | gdb/avr-tdep.c | 1 | ||||
-rw-r--r-- | gdb/config/pa/tm-hppa64.h | 5 | ||||
-rw-r--r-- | gdb/config/sparc/tm-sparc.h | 4 | ||||
-rw-r--r-- | gdb/cris-tdep.c | 2 | ||||
-rw-r--r-- | gdb/d10v-tdep.c | 1 | ||||
-rw-r--r-- | gdb/frv-tdep.c | 1 | ||||
-rw-r--r-- | gdb/gdbarch.c | 20 | ||||
-rw-r--r-- | gdb/gdbarch.h | 25 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 2 | ||||
-rw-r--r-- | gdb/h8300-tdep.c | 2 | ||||
-rw-r--r-- | gdb/hppa-tdep.c | 9 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 1 | ||||
-rw-r--r-- | gdb/ia64-tdep.c | 1 | ||||
-rw-r--r-- | gdb/m68hc11-tdep.c | 1 | ||||
-rw-r--r-- | gdb/m68k-tdep.c | 2 | ||||
-rw-r--r-- | gdb/mcore-tdep.c | 1 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 1 | ||||
-rw-r--r-- | gdb/mn10300-tdep.c | 1 | ||||
-rw-r--r-- | gdb/rs6000-tdep.c | 4 | ||||
-rw-r--r-- | gdb/s390-tdep.c | 2 | ||||
-rw-r--r-- | gdb/sh-tdep.c | 1 | ||||
-rw-r--r-- | gdb/sparc-tdep.c | 1 | ||||
-rw-r--r-- | gdb/stack.c | 31 | ||||
-rw-r--r-- | gdb/v850-tdep.c | 2 | ||||
-rw-r--r-- | gdb/xstormy16-tdep.c | 2 |
30 files changed, 100 insertions, 84 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index beb2cc9..cf89b90 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,40 @@ 2003-06-09 Andrew Cagney <cagney@redhat.com> + * 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. + +2003-06-09 Andrew Cagney <cagney@redhat.com> + * printcmd.c (print_frame_nameless_args): Moved to "stack.c". (print_frame_args): Moved to "stack.c". * stack.c: Include "gdb_assert.h". diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index f88725c..b1de40c 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -1537,7 +1537,6 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_print_insn (gdbarch, print_insn_alpha); /* Call info. */ - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_frameless_function_invocation (gdbarch, generic_frameless_function_invocation_not); diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 48f7f7e..f4a327e 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -232,13 +232,6 @@ default_double_format (struct gdbarch *gdbarch) /* Misc helper functions for targets. */ int -frame_num_args_unknown (struct frame_info *fi) -{ - return -1; -} - - -int generic_register_convertible_not (int num) { return 0; diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index 27f219b..a4c59e0 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -36,10 +36,6 @@ extern gdbarch_register_convertible_ftype generic_register_convertible_not; extern CORE_ADDR generic_cannot_extract_struct_value_address (char *dummy); -/* Helper function for targets that don't know how my arguments are - being passed */ -extern gdbarch_frame_num_args_ftype frame_num_args_unknown; - /* Implementation of extract return value that grubs around in the register cache. */ extern gdbarch_extract_return_value_ftype legacy_extract_return_value; @@ -81,11 +77,6 @@ extern int core_addr_greaterthan (CORE_ADDR lhs, CORE_ADDR rhs); extern const struct floatformat *default_float_format (struct gdbarch *gdbarch); extern const struct floatformat *default_double_format (struct gdbarch *gdbarch); -/* Helper function for targets that don't know how my arguments are - being passed */ -extern int frame_num_args_unknown (struct frame_info *fi); - - /* The following DEPRECATED interfaces are for pre- multi-arch legacy targets. */ diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 4aaf151..045496c 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -320,14 +320,6 @@ arm_frame_locals_address (struct frame_info *fi) return get_frame_base (fi); } -/* The number of arguments being passed in the frame. */ -static int -arm_frame_num_args (struct frame_info *fi) -{ - /* We have no way of knowing. */ - return -1; -} - /* A typical Thumb prologue looks like this: push {r7, lr} add sp, sp, #-28 @@ -2946,7 +2938,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_frame_saved_pc (gdbarch, arm_frame_saved_pc); set_gdbarch_frame_args_address (gdbarch, arm_frame_args_address); set_gdbarch_frame_locals_address (gdbarch, arm_frame_locals_address); - set_gdbarch_frame_num_args (gdbarch, arm_frame_num_args); set_gdbarch_frame_args_skip (gdbarch, 0); set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, arm_frame_init_saved_regs); set_gdbarch_deprecated_pop_frame (gdbarch, arm_pop_frame); diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 792f3fa..382db87 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -1213,7 +1213,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_frame_args_address (gdbarch, avr_frame_address); set_gdbarch_frame_locals_address (gdbarch, avr_frame_address); set_gdbarch_deprecated_saved_pc_after_call (gdbarch, avr_saved_pc_after_call); - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_convert_from_func_ptr_addr (gdbarch, avr_convert_from_func_ptr_addr); diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h index a3cc4be..a8d414e 100644 --- a/gdb/config/pa/tm-hppa64.h +++ b/gdb/config/pa/tm-hppa64.h @@ -292,11 +292,6 @@ extern CORE_ADDR hppa_frame_locals_address (struct frame_info *fi); #endif #if !GDB_MULTI_ARCH -extern int hppa_frame_num_args (struct frame_info *frame); -#define FRAME_NUM_ARGS(fi) hppa_frame_num_args (fi) -#endif - -#if !GDB_MULTI_ARCH #define FRAME_ARGS_SKIP 0 #endif diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h index 16f94db..4f8acaf 100644 --- a/gdb/config/sparc/tm-sparc.h +++ b/gdb/config/sparc/tm-sparc.h @@ -448,10 +448,6 @@ extern CORE_ADDR sparc_frame_saved_pc (struct frame_info *); /* Set VAL to the number of args passed to frame described by FI. Can set VAL to -1, meaning no way to tell. */ -/* We can't tell how many args there are - now that the C compiler delays popping them. */ -#define FRAME_NUM_ARGS(FI) (-1) - /* Return number of bytes at start of arglist that are not really args. */ #define FRAME_ARGS_SKIP 68 diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 7bf7e9a..441d93e 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -4302,8 +4302,6 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_frame_saved_pc (gdbarch, cris_frame_saved_pc); set_gdbarch_deprecated_saved_pc_after_call (gdbarch, cris_saved_pc_after_call); - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); - /* Helpful for backtracing and returning in a call dummy. */ set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index 84d0a85..62a8c30 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -1584,7 +1584,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_frame_args_skip (gdbarch, 0); set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue); - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_frame_align (gdbarch, d10v_frame_align); set_gdbarch_register_sim_regno (gdbarch, d10v_register_sim_regno); diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index c978ec4..cf96d3d 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -1069,7 +1069,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_skip_prologue (gdbarch, frv_skip_prologue); set_gdbarch_breakpoint_from_pc (gdbarch, frv_breakpoint_from_pc); - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_frame_args_skip (gdbarch, 0); set_gdbarch_frameless_function_invocation (gdbarch, frv_frameless_function_invocation); diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 648b8f5..20b3509 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -727,9 +727,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of frame_args_address, invalid_p == 0 */ /* Skip verify of frame_locals_address, invalid_p == 0 */ /* Skip verify of deprecated_saved_pc_after_call, has predicate */ - if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) - && (gdbarch->frame_num_args == 0)) - fprintf_unfiltered (log, "\n\tframe_num_args"); + /* Skip verify of frame_num_args, has predicate */ /* Skip verify of stack_align, has predicate */ /* Skip verify of frame_align, has predicate */ /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */ @@ -1766,6 +1764,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->frame_locals_address /*FRAME_LOCALS_ADDRESS ()*/); #endif +#ifdef FRAME_NUM_ARGS_P + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "FRAME_NUM_ARGS_P()", + XSTRING (FRAME_NUM_ARGS_P ())); + fprintf_unfiltered (file, + "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n", + FRAME_NUM_ARGS_P ()); +#endif #ifdef FRAME_NUM_ARGS fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -5072,6 +5079,13 @@ set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, } int +gdbarch_frame_num_args_p (struct gdbarch *gdbarch) +{ + gdb_assert (gdbarch != NULL); + return gdbarch->frame_num_args != 0; +} + +int gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame) { gdb_assert (gdbarch != NULL); 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); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index c1f83a9..bfeb2c5 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -615,7 +615,7 @@ M::UNWIND_SP:CORE_ADDR:unwind_sp:struct frame_info *next_frame:next_frame: f:2:FRAME_ARGS_ADDRESS:CORE_ADDR:frame_args_address:struct frame_info *fi:fi::0:get_frame_base::0 f:2:FRAME_LOCALS_ADDRESS:CORE_ADDR:frame_locals_address:struct frame_info *fi:fi::0:get_frame_base::0 F::DEPRECATED_SAVED_PC_AFTER_CALL:CORE_ADDR:deprecated_saved_pc_after_call:struct frame_info *frame:frame -f:2:FRAME_NUM_ARGS:int:frame_num_args:struct frame_info *frame:frame::0:0 +F:2:FRAME_NUM_ARGS:int:frame_num_args:struct frame_info *frame:frame # F:2:STACK_ALIGN:CORE_ADDR:stack_align:CORE_ADDR sp:sp::0:0 M:::CORE_ADDR:frame_align:CORE_ADDR address:address diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index 43ecf50..de2db4e 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1161,8 +1161,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_function_start_offset (gdbarch, 0); /* This value is almost never non-zero... */ set_gdbarch_frame_args_skip (gdbarch, 0); - /* OK to default this value to 'unknown'. */ - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue); diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 24305ff..2529547 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -4886,14 +4886,6 @@ hppa_frame_locals_address (struct frame_info *fi) return get_frame_base (fi); } -int -hppa_frame_num_args (struct frame_info *frame) -{ - /* We can't tell how many args there are now that the C compiler delays - popping them. */ - return -1; -} - CORE_ADDR hppa_smash_text_address (CORE_ADDR addr) { @@ -4982,7 +4974,6 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_frame_saved_pc (gdbarch, hppa_frame_saved_pc); set_gdbarch_frame_args_address (gdbarch, hppa_frame_args_address); set_gdbarch_frame_locals_address (gdbarch, hppa_frame_locals_address); - set_gdbarch_frame_num_args (gdbarch, hppa_frame_num_args); set_gdbarch_frame_args_skip (gdbarch, 0); set_gdbarch_deprecated_push_dummy_frame (gdbarch, hppa_push_dummy_frame); set_gdbarch_deprecated_pop_frame (gdbarch, hppa_pop_frame); diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index b8fd0e5..6194e68 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -1707,7 +1707,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_function_start_offset (gdbarch, 0); set_gdbarch_frame_args_skip (gdbarch, 8); - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_pc_in_sigtramp (gdbarch, i386_pc_in_sigtramp); /* Wire in the MMX registers. */ diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index e803ee8..8b9d6d1 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -2264,7 +2264,6 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_skip_prologue (gdbarch, ia64_skip_prologue); - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_frameless_function_invocation (gdbarch, ia64_frameless_function_invocation); set_gdbarch_deprecated_saved_pc_after_call (gdbarch, ia64_saved_pc_after_call); diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 139689d..ce7498e 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1395,7 +1395,6 @@ m68hc11_gdbarch_init (struct gdbarch_info info, set_gdbarch_frame_args_address (gdbarch, m68hc11_frame_args_address); set_gdbarch_frame_locals_address (gdbarch, m68hc11_frame_locals_address); set_gdbarch_deprecated_saved_pc_after_call (gdbarch, m68hc11_saved_pc_after_call); - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register); diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 5f21fb1..ca9082f 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -929,8 +929,6 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, m68k_frame_init_saved_regs); set_gdbarch_frameless_function_invocation (gdbarch, m68k_frameless_function_invocation); - /* OK to default this value to 'unknown'. */ - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_frame_args_skip (gdbarch, 8); set_gdbarch_register_raw_size (gdbarch, m68k_register_raw_size); diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c index b24a735..d99e368 100644 --- a/gdb/mcore-tdep.c +++ b/gdb/mcore-tdep.c @@ -1144,7 +1144,6 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_frame_args_skip (gdbarch, 0); set_gdbarch_frame_args_address (gdbarch, mcore_frame_args_address); set_gdbarch_frame_locals_address (gdbarch, mcore_frame_locals_address); - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_deprecated_pop_frame (gdbarch, mcore_pop_frame); set_gdbarch_virtual_frame_pointer (gdbarch, mcore_virtual_frame_pointer); diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 7bc4aeb..b7c756a 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -5971,7 +5971,6 @@ mips_gdbarch_init (struct gdbarch_info info, set_gdbarch_frameless_function_invocation (gdbarch, generic_frameless_function_invocation_not); set_gdbarch_deprecated_frame_saved_pc (gdbarch, mips_frame_saved_pc); - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_frame_args_skip (gdbarch, 0); set_gdbarch_deprecated_get_saved_register (gdbarch, mips_get_saved_register); diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index d6d39b9..c40d243 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -1191,7 +1191,6 @@ mn10300_gdbarch_init (struct gdbarch_info info, set_gdbarch_deprecated_pop_frame (gdbarch, mn10300_pop_frame); set_gdbarch_skip_prologue (gdbarch, mn10300_skip_prologue); set_gdbarch_frame_args_skip (gdbarch, 0); - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); /* That's right, we're using the stack pointer as our frame pointer. */ set_gdbarch_deprecated_target_read_fp (gdbarch, mn10300_read_fp); diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index bcd7316..df595e5 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -3002,10 +3002,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Helpers for function argument information. */ set_gdbarch_fetch_pointer_argument (gdbarch, rs6000_fetch_pointer_argument); - /* We can't tell how many args there are - now that the C compiler delays popping them. */ - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); - /* Hook in ABI-specific overrides, if they have been registered. */ gdbarch_init_osabi (info, gdbarch); diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index f3810a8..d53da9a 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -1820,8 +1820,6 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_frame_chain (gdbarch, s390_frame_chain); set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, s390_frame_init_saved_regs); set_gdbarch_frame_locals_address (gdbarch, s390_frame_args_address); - /* We can't do this */ - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_deprecated_store_struct_return (gdbarch, s390_store_struct_return); set_gdbarch_deprecated_extract_return_value (gdbarch, s390_extract_return_value); set_gdbarch_deprecated_store_return_value (gdbarch, s390_store_return_value); diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index c0875d5..0152702 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -4665,7 +4665,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue); set_gdbarch_deprecated_frame_saved_pc (gdbarch, sh_frame_saved_pc); set_gdbarch_deprecated_saved_pc_after_call (gdbarch, sh_saved_pc_after_call); - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_believe_pcc_promotion (gdbarch, 1); /* Hook in ABI-specific overrides, if they have been registered. */ diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index e14db14..d22e1ca 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -3306,7 +3306,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_fp0_regnum (gdbarch, SPARC_FP0_REGNUM); set_gdbarch_deprecated_frame_chain (gdbarch, sparc_frame_chain); set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sparc_frame_init_saved_regs); - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); set_gdbarch_deprecated_frame_saved_pc (gdbarch, sparc_frame_saved_pc); set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue); diff --git a/gdb/stack.c b/gdb/stack.c index 1f874e6..a1a786b 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -398,7 +398,13 @@ print_args_stub (void *args) int numargs; struct print_args_args *p = (struct print_args_args *) args; - numargs = FRAME_NUM_ARGS (p->fi); + if (FRAME_NUM_ARGS_P ()) + { + numargs = FRAME_NUM_ARGS (p->fi); + gdb_assert (numargs >= 0); + } + else + numargs = -1; print_frame_args (p->func, p->fi, numargs, p->stream); return 0; } @@ -982,15 +988,22 @@ frame_info (char *addr_exp, int from_tty) print_address_numeric (arg_list, 1, gdb_stdout); printf_filtered (","); - numargs = FRAME_NUM_ARGS (fi); - if (numargs < 0) - puts_filtered (" args: "); - else if (numargs == 0) - puts_filtered (" no args."); - else if (numargs == 1) - puts_filtered (" 1 arg: "); + if (!FRAME_NUM_ARGS_P ()) + { + numargs = -1; + puts_filtered (" args: "); + } else - printf_filtered (" %d args: ", numargs); + { + numargs = FRAME_NUM_ARGS (fi); + gdb_assert (numargs >= 0); + if (numargs == 0) + puts_filtered (" no args."); + else if (numargs == 1) + puts_filtered (" 1 arg: "); + else + printf_filtered (" %d args: ", numargs); + } print_frame_args (func, fi, numargs, gdb_stdout); puts_filtered ("\n"); } diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index 2610e63..618f62d 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -1262,8 +1262,6 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_function_start_offset (gdbarch, 0); /* This value is almost never non-zero... */ set_gdbarch_frame_args_skip (gdbarch, 0); - /* OK to default this value to 'unknown'. */ - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); /* * Call Dummies diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 19f1abf..3171858 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -1075,8 +1075,6 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_function_start_offset (gdbarch, 0); /* This value is almost never non-zero... */ set_gdbarch_frame_args_skip (gdbarch, 0); - /* OK to default this value to 'unknown'. */ - set_gdbarch_frame_num_args (gdbarch, frame_num_args_unknown); /* * Call Dummies |