diff options
-rw-r--r-- | gdb/ChangeLog | 14 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 35 | ||||
-rw-r--r-- | gdb/avr-tdep.c | 2 | ||||
-rw-r--r-- | gdb/blockframe.c | 38 | ||||
-rw-r--r-- | gdb/frame.h | 2 | ||||
-rw-r--r-- | gdb/frv-tdep.c | 8 | ||||
-rw-r--r-- | gdb/gdbarch.c | 45 | ||||
-rw-r--r-- | gdb/gdbarch.h | 29 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 4 | ||||
-rw-r--r-- | gdb/h8300-tdep.c | 1 | ||||
-rw-r--r-- | gdb/m32r-tdep.c | 2 | ||||
-rw-r--r-- | gdb/sh-tdep.c | 1 | ||||
-rw-r--r-- | gdb/sh64-tdep.c | 1 |
13 files changed, 14 insertions, 168 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e2caf80..3a19835 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,19 @@ 2004-08-02 Andrew Cagney <cagney@gnu.org> + * gdbarch.sh (deprecated_frameless_function_invocation): Delete. + * gdbarch.h, gdbarch.c: Re-generate. + * arm-tdep.c (arm_frameless_function_invocation): Delete. + (arm_gdbarch_init) Do not set frameless function invocation. + * frame.h (legacy_frameless_look_for_prologue): Delete declaration. + * blockframe.c (legacy_frameless_look_for_prologue): Delete function. + * frv-tdep.c (frv_frameless_function_invocation): Delete. + (frv_gdbarch_init): Do not set frameless function invocation. + * sh64-tdep.c (sh64_gdbarch_init): Ditto. + * sh-tdep.c (sh_gdbarch_init): Ditto. + * m32r-tdep.c (m32r_gdbarch_init): Ditto. + * h8300-tdep.c (h8300_gdbarch_init): Ditto. + * avr-tdep.c (avr_gdbarch_init): Ditto. + * blockframe.c (legacy_frame_chain_valid): Delete function. * dummy-frame.c (struct dummy_frame): Delete call_lo, call_hi, top diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 9a758b3..952b18f 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -269,39 +269,6 @@ arm_saved_pc_after_call (struct frame_info *frame) return ADDR_BITS_REMOVE (read_register (ARM_LR_REGNUM)); } -/* Determine whether the function invocation represented by FI has a - frame on the stack associated with it. If it does return zero, - otherwise return 1. */ - -static int -arm_frameless_function_invocation (struct frame_info *fi) -{ - CORE_ADDR func_start, after_prologue; - int frameless; - - /* Sometimes we have functions that do a little setup (like saving the - vN registers with the stmdb instruction, but DO NOT set up a frame. - The symbol table will report this as a prologue. However, it is - important not to try to parse these partial frames as frames, or we - will get really confused. - - So I will demand 3 instructions between the start & end of the - prologue before I call it a real prologue, i.e. at least - mov ip, sp, - stmdb sp!, {} - sub sp, ip, #4. */ - - func_start = (get_frame_func (fi) + DEPRECATED_FUNCTION_START_OFFSET); - after_prologue = SKIP_PROLOGUE (func_start); - - /* There are some frameless functions whose first two instructions - follow the standard APCS form, in which case after_prologue will - be func_start + 8. */ - - frameless = (after_prologue < func_start + 12); - return frameless; -} - /* A typical Thumb prologue looks like this: push {r7, lr} add sp, sp, #-28 @@ -2719,8 +2686,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_unwind_pc (gdbarch, arm_unwind_pc); set_gdbarch_unwind_sp (gdbarch, arm_unwind_sp); - set_gdbarch_deprecated_frameless_function_invocation (gdbarch, arm_frameless_function_invocation); - frame_base_set_default (gdbarch, &arm_normal_base); /* Address manipulation. */ diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index d64596f..563ecf2 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -1297,8 +1297,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_breakpoint_from_pc (gdbarch, avr_breakpoint_from_pc); - set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue); - frame_unwind_append_sniffer (gdbarch, avr_frame_sniffer); frame_base_set_default (gdbarch, &avr_frame_base); diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 7b48194..7d9618f 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -135,44 +135,6 @@ inside_entry_func (struct frame_info *this_frame) return (get_frame_func (this_frame) == entry_point_address ()); } -/* Return nonzero if the function for this frame lacks a prologue. - Many machines can define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION - to just call this function. */ - -int -legacy_frameless_look_for_prologue (struct frame_info *frame) -{ - CORE_ADDR func_start; - - func_start = get_frame_func (frame); - if (func_start) - { - func_start += DEPRECATED_FUNCTION_START_OFFSET; - /* NOTE: cagney/2004-02-09: Eliminated per-architecture - PROLOGUE_FRAMELESS_P call as architectures with custom - implementations had all been deleted. Eventually even this - function can go - GDB no longer tries to differentiate - between framed, frameless and stackless functions. They are - all now considered equally evil :-^. */ - /* If skipping the prologue ends up skips nothing, there must be - no prologue and hence no code creating a frame. There for - the function is "frameless" :-/. */ - return func_start == SKIP_PROLOGUE (func_start); - } - else if (get_frame_pc (frame) == 0) - /* A frame with a zero PC is usually created by dereferencing a - NULL function pointer, normally causing an immediate core dump - of the inferior. Mark function as frameless, as the inferior - has no chance of setting up a stack frame. */ - return 1; - else - /* If we can't find the start of the function, we don't really - know whether the function is frameless, but we should be able - to get a reasonable (i.e. best we can do under the - circumstances) backtrace by saying that it isn't. */ - return 0; -} - /* Return the innermost lexical block in execution in a specified stack frame. The frame address is assumed valid. diff --git a/gdb/frame.h b/gdb/frame.h index 942f7b1..6dda5ff 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -556,8 +556,6 @@ extern struct symbol *get_frame_function (struct frame_info *); extern CORE_ADDR get_pc_function_start (CORE_ADDR); -extern int legacy_frameless_look_for_prologue (struct frame_info *); - extern struct frame_info *find_relative_frame (struct frame_info *, int *); extern void show_and_print_stack_frame (struct frame_info *fi, int print_level, diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index dc423f8..7bc09f0 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -1066,12 +1066,6 @@ frv_store_struct_return (CORE_ADDR addr, CORE_ADDR sp) write_register (struct_return_regnum, addr); } -static int -frv_frameless_function_invocation (struct frame_info *frame) -{ - return legacy_frameless_look_for_prologue (frame); -} - static CORE_ADDR frv_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp) { @@ -1496,8 +1490,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_breakpoint_from_pc (gdbarch, frv_breakpoint_from_pc); set_gdbarch_adjust_breakpoint_address (gdbarch, frv_gdbarch_adjust_breakpoint_address); - set_gdbarch_deprecated_frameless_function_invocation (gdbarch, frv_frameless_function_invocation); - set_gdbarch_deprecated_use_struct_convention (gdbarch, always_use_struct_convention); set_gdbarch_extract_return_value (gdbarch, frv_extract_return_value); diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index af6b0a3..0345070 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -200,7 +200,6 @@ struct gdbarch CORE_ADDR deprecated_function_start_offset; gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address; CORE_ADDR frame_args_skip; - gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation; gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain; gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid; gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc; @@ -346,7 +345,6 @@ struct gdbarch startup_gdbarch = 0, /* deprecated_function_start_offset */ generic_remote_translate_xfer_address, /* remote_translate_xfer_address */ 0, /* frame_args_skip */ - 0, /* deprecated_frameless_function_invocation */ 0, /* deprecated_frame_chain */ 0, /* deprecated_frame_chain_valid */ 0, /* deprecated_frame_saved_pc */ @@ -625,7 +623,6 @@ verify_gdbarch (struct gdbarch *current_gdbarch) /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */ /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */ /* Skip verify of frame_args_skip, invalid_p == 0 */ - /* Skip verify of deprecated_frameless_function_invocation, has predicate */ /* Skip verify of deprecated_frame_chain, has predicate */ /* Skip verify of deprecated_frame_chain_valid, has predicate */ /* Skip verify of deprecated_frame_saved_pc, has predicate */ @@ -1049,24 +1046,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) fprintf_unfiltered (file, "gdbarch_dump: deprecated_frame_saved_pc = <0x%lx>\n", (long) current_gdbarch->deprecated_frame_saved_pc); -#ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()", - XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ())); -#endif - fprintf_unfiltered (file, - "gdbarch_dump: gdbarch_deprecated_frameless_function_invocation_p() = %d\n", - gdbarch_deprecated_frameless_function_invocation_p (current_gdbarch)); -#ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)", - XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi))); -#endif - fprintf_unfiltered (file, - "gdbarch_dump: deprecated_frameless_function_invocation = <0x%lx>\n", - (long) current_gdbarch->deprecated_frameless_function_invocation); #ifdef DEPRECATED_FUNCTION_START_OFFSET fprintf_unfiltered (file, "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n", @@ -3743,30 +3722,6 @@ set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, } int -gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->deprecated_frameless_function_invocation != NULL; -} - -int -gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi) -{ - gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL); - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n"); - return gdbarch->deprecated_frameless_function_invocation (fi); -} - -void -set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, - gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation) -{ - gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation; -} - -int gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index c87886c..afddb7a 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1347,35 +1347,6 @@ extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR fram #define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch)) #endif -/* DEPRECATED_FRAMELESS_FUNCTION_INVOCATION is not needed. The new - frame code works regardless of the type of frame - frameless, - stackless, or normal. */ - -#if defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION) -/* Legacy for systems yet to multi-arch DEPRECATED_FRAMELESS_FUNCTION_INVOCATION */ -#if !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P) -#define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() (1) -#endif -#endif - -extern int gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P) -#error "Non multi-arch definition of DEPRECATED_FRAMELESS_FUNCTION_INVOCATION" -#endif -#if !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P) -#define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() (gdbarch_deprecated_frameless_function_invocation_p (current_gdbarch)) -#endif - -typedef int (gdbarch_deprecated_frameless_function_invocation_ftype) (struct frame_info *fi); -extern int gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi); -extern void set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION) -#error "Non multi-arch definition of DEPRECATED_FRAMELESS_FUNCTION_INVOCATION" -#endif -#if !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION) -#define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_deprecated_frameless_function_invocation (current_gdbarch, fi)) -#endif - #if defined (DEPRECATED_FRAME_CHAIN) /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN */ #if !defined (DEPRECATED_FRAME_CHAIN_P) diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index be18fb8..563781d 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -607,10 +607,6 @@ v:=:CORE_ADDR:deprecated_function_start_offset::::0:::0 m::void:remote_translate_xfer_address:struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len:regcache, gdb_addr, gdb_len, rem_addr, rem_len:::generic_remote_translate_xfer_address::0 # v:=:CORE_ADDR:frame_args_skip::::0:::0 -# DEPRECATED_FRAMELESS_FUNCTION_INVOCATION is not needed. The new -# frame code works regardless of the type of frame - frameless, -# stackless, or normal. -F:=:int:deprecated_frameless_function_invocation:struct frame_info *fi:fi F:=:CORE_ADDR:deprecated_frame_chain:struct frame_info *frame:frame F:=:int:deprecated_frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe # DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC. Please diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index 300b99b..0d6c3bc 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1317,7 +1317,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) */ /* Stack grows up. */ set_gdbarch_inner_than (gdbarch, core_addr_lessthan); - set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue); set_gdbarch_deprecated_extract_struct_value_address (gdbarch, h8300_extract_struct_value_address); set_gdbarch_deprecated_use_struct_convention (gdbarch, always_use_struct_convention); diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c index 7094c64..fd5e9dc 100644 --- a/gdb/m32r-tdep.c +++ b/gdb/m32r-tdep.c @@ -940,8 +940,6 @@ m32r_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_memory_remove_breakpoint (gdbarch, m32r_memory_remove_breakpoint); - set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue); - set_gdbarch_frame_align (gdbarch, m32r_frame_align); frame_unwind_append_sniffer (gdbarch, m32r_frame_sniffer); diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 90e25c6..9cce79b 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -2233,7 +2233,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_nofpu); - set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue); set_gdbarch_believe_pcc_promotion (gdbarch, 1); set_gdbarch_frame_align (gdbarch, sh_frame_align); diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c index 5809a01..a753213 100644 --- a/gdb/sh64-tdep.c +++ b/gdb/sh64-tdep.c @@ -2837,7 +2837,6 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_skip_prologue (gdbarch, sh_skip_prologue); set_gdbarch_inner_than (gdbarch, core_addr_lessthan); - set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue); set_gdbarch_believe_pcc_promotion (gdbarch, 1); set_gdbarch_deprecated_frame_saved_pc (gdbarch, sh_frame_saved_pc); |