* 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.
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
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
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. */
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);
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.
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,
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)
{
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);
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;
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 */
/* 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 */
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",
gdbarch->frame_args_skip = frame_args_skip;
}
-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)
{
#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)
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
*/
/* 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);
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);
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);
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);