+2015-05-26 Martin Galvan <martin.galvan@tallertechnologies.com>
+
+ * amd64-tdep.c: Replace in_function_epilogue_p with
+ stack_frame_destroyed_p throughout.
+ * arch-utils.c: Ditto.
+ * arch-utils.h: Ditto.
+ * arm-tdep.c: Ditto.
+ * breakpoint.c: Ditto.
+ * gdbarch.sh: Ditto.
+ * hppa-tdep.c: Ditto.
+ * i386-tdep.c: Ditto.
+ * mips-tdep.c: Ditto.
+ * nios2-tdep.c: Ditto.
+ * rs6000-tdep.c: Ditto.
+ * s390-linux-tdep.c: Ditto.
+ * score-tdep.c: Ditto.
+ * sh-tdep.c: Ditto.
+ * sparc-tdep.c: Ditto.
+ * sparc-tdep.h: Ditto.
+ * sparc64-tdep.c: Ditto.
+ * spu-tdep.c: Ditto.
+ * tic6x-tdep.c: Ditto.
+ * tilegx-tdep.c: Ditto.
+ * xstormy16-tdep.c: Ditto.
+ * gdbarch.c, gdbarch.h: Re-generated.
+
2015-05-22 Andrew Burgess <andrew.burgess@embecosm.com>
* NEWS: Mention 'tui enable' and 'tui disable'.
/* Normal frames, but in a function epilogue. */
-/* The epilogue is defined here as the 'ret' instruction, which will
+/* Implement the stack_frame_destroyed_p gdbarch method.
+
+ The epilogue is defined here as the 'ret' instruction, which will
follow any instruction such as 'leave' or 'pop %ebp' that destroys
the function's stack frame. */
static int
-amd64_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+amd64_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
gdb_byte insn;
struct compunit_symtab *cust;
void **this_prologue_cache)
{
if (frame_relative_level (this_frame) == 0)
- return amd64_in_function_epilogue_p (get_frame_arch (this_frame),
- get_frame_pc (this_frame));
+ return amd64_stack_frame_destroyed_p (get_frame_arch (this_frame),
+ get_frame_pc (this_frame));
else
return 0;
}
}
int
-generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+generic_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
return 0;
}
extern int generic_in_solib_return_trampoline (struct gdbarch *gdbarch,
CORE_ADDR pc, const char *name);
-extern int generic_in_function_epilogue_p (struct gdbarch *gdbarch,
- CORE_ADDR pc);
+extern int generic_stack_frame_destroyed_p (struct gdbarch *gdbarch,
+ CORE_ADDR pc);
/* By default, registers are not convertible. */
extern int generic_convert_register_p (struct gdbarch *gdbarch, int regnum,
}
}
-/* Return true if we are in the function's epilogue, i.e. after the
- instruction that destroyed the function's stack frame. */
+/* Implement the stack_frame_destroyed_p gdbarch method. */
static int
-thumb_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+thumb_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
unsigned int insn, insn2;
return found_stack_adjust;
}
-/* Return true if we are in the function's epilogue, i.e. after the
- instruction that destroyed the function's stack frame. */
+/* Implement the stack_frame_destroyed_p gdbarch method. */
static int
-arm_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+arm_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
unsigned int insn;
CORE_ADDR func_start, func_end;
if (arm_pc_is_thumb (gdbarch, pc))
- return thumb_in_function_epilogue_p (gdbarch, pc);
+ return thumb_stack_frame_destroyed_p (gdbarch, pc);
if (!find_pc_partial_function (pc, NULL, &func_start, &func_end))
return 0;
/* Advance PC across function entry code. */
set_gdbarch_skip_prologue (gdbarch, arm_skip_prologue);
- /* Detect whether PC is in function epilogue. */
- set_gdbarch_in_function_epilogue_p (gdbarch, arm_in_function_epilogue_p);
+ /* Detect whether PC is at a point where the stack has been destroyed. */
+ set_gdbarch_stack_frame_destroyed_p (gdbarch, arm_stack_frame_destroyed_p);
/* Skip trampolines. */
set_gdbarch_skip_trampoline_code (gdbarch, arm_skip_stub);
struct gdbarch *frame_arch = get_frame_arch (fi);
CORE_ADDR frame_pc = get_frame_pc (fi);
- /* If we're in a function epilogue, unwinding may not work
- properly, so do not attempt to recreate locations at this
+ /* If we're at a point where the stack has been destroyed
+ (e.g. in a function epilogue), unwinding may not work
+ properly. Do not attempt to recreate locations at this
point. See similar comments in watchpoint_check. */
- if (gdbarch_in_function_epilogue_p (frame_arch, frame_pc))
+ if (gdbarch_stack_frame_destroyed_p (frame_arch, frame_pc))
return;
/* Save the current frame's ID so we can restore it after
struct gdbarch *frame_arch = get_frame_arch (frame);
CORE_ADDR frame_pc = get_frame_pc (frame);
- /* in_function_epilogue_p() returns a non-zero value if we're
+ /* stack_frame_destroyed_p() returns a non-zero value if we're
still in the function but the stack frame has already been
invalidated. Since we can't rely on the values of local
variables after the stack has been destroyed, we are treating
frame is in an epilogue - even if they are in some other
frame, our view of the stack is likely to be wrong and
frame_find_by_id could error out. */
- if (gdbarch_in_function_epilogue_p (frame_arch, frame_pc))
+ if (gdbarch_stack_frame_destroyed_p (frame_arch, frame_pc))
return WP_IGNORE;
fr = frame_find_by_id (b->watchpoint_frame);
gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
gdbarch_skip_solib_resolver_ftype *skip_solib_resolver;
gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
- gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
+ gdbarch_stack_frame_destroyed_p_ftype *stack_frame_destroyed_p;
gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
gdbarch_make_symbol_special_ftype *make_symbol_special;
gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
gdbarch->skip_solib_resolver = generic_skip_solib_resolver;
gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
- gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
+ gdbarch->stack_frame_destroyed_p = generic_stack_frame_destroyed_p;
gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
gdbarch->make_symbol_special = default_make_symbol_special;
gdbarch->adjust_dwarf2_addr = default_adjust_dwarf2_addr;
/* Skip verify of skip_trampoline_code, invalid_p == 0 */
/* Skip verify of skip_solib_resolver, invalid_p == 0 */
/* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
- /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
+ /* Skip verify of stack_frame_destroyed_p, invalid_p == 0 */
/* Skip verify of elf_make_msymbol_special, has predicate. */
/* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
/* Skip verify of make_symbol_special, invalid_p == 0 */
"gdbarch_dump: have_nonsteppable_watchpoint = %s\n",
plongest (gdbarch->have_nonsteppable_watchpoint));
fprintf_unfiltered (file,
- "gdbarch_dump: in_function_epilogue_p = <%s>\n",
- host_address_to_string (gdbarch->in_function_epilogue_p));
+ "gdbarch_dump: stack_frame_destroyed_p = <%s>\n",
+ host_address_to_string (gdbarch->stack_frame_destroyed_p));
fprintf_unfiltered (file,
"gdbarch_dump: in_solib_return_trampoline = <%s>\n",
host_address_to_string (gdbarch->in_solib_return_trampoline));
}
int
-gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
+gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr)
{
gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->in_function_epilogue_p != NULL);
+ gdb_assert (gdbarch->stack_frame_destroyed_p != NULL);
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
- return gdbarch->in_function_epilogue_p (gdbarch, addr);
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_frame_destroyed_p called\n");
+ return gdbarch->stack_frame_destroyed_p (gdbarch, addr);
}
void
-set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
- gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
+set_gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch,
+ gdbarch_stack_frame_destroyed_p_ftype stack_frame_destroyed_p)
{
- gdbarch->in_function_epilogue_p = in_function_epilogue_p;
+ gdbarch->stack_frame_destroyed_p = stack_frame_destroyed_p;
}
int
/* A target might have problems with watchpoints as soon as the stack
frame of the current function has been destroyed. This mostly happens
- as the first action in a funtion's epilogue. in_function_epilogue_p()
+ as the first action in a function's epilogue. stack_frame_destroyed_p()
is defined to return a non-zero value if either the given addr is one
instruction after the stack destroying instruction up to the trailing
return instruction or if we can figure out that the stack frame has
which don't suffer from that problem could just let this functionality
untouched. */
-typedef int (gdbarch_in_function_epilogue_p_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr);
-extern int gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr);
-extern void set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p);
+typedef int (gdbarch_stack_frame_destroyed_p_ftype) (struct gdbarch *gdbarch, CORE_ADDR addr);
+extern int gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR addr);
+extern void set_gdbarch_stack_frame_destroyed_p (struct gdbarch *gdbarch, gdbarch_stack_frame_destroyed_p_ftype *stack_frame_destroyed_p);
/* Process an ELF symbol in the minimal symbol table in a backend-specific
way. Normally this hook is supposed to do nothing, however if required,
# A target might have problems with watchpoints as soon as the stack
# frame of the current function has been destroyed. This mostly happens
-# as the first action in a funtion's epilogue. in_function_epilogue_p()
+# as the first action in a function's epilogue. stack_frame_destroyed_p()
# is defined to return a non-zero value if either the given addr is one
# instruction after the stack destroying instruction up to the trailing
# return instruction or if we can figure out that the stack frame has
# already been invalidated regardless of the value of addr. Targets
# which don't suffer from that problem could just let this functionality
# untouched.
-m:int:in_function_epilogue_p:CORE_ADDR addr:addr:0:generic_in_function_epilogue_p::0
+m:int:stack_frame_destroyed_p:CORE_ADDR addr:addr:0:generic_stack_frame_destroyed_p::0
# Process an ELF symbol in the minimal symbol table in a backend-specific
# way. Normally this hook is supposed to do nothing, however if required,
# then this hook can be used to apply tranformations to symbols that are
return NULL;
}
-/* The epilogue is defined here as the area either on the `bv' instruction
+/* Implement the stack_frame_destroyed_p gdbarch method.
+
+ The epilogue is defined here as the area either on the `bv' instruction
itself or an instruction which destroys the function's stack frame.
We do not assume that the epilogue is at the end of a function as we can
also have return sequences in the middle of a function. */
+
static int
-hppa_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+hppa_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
unsigned long status;
/* The following gdbarch vector elements do not depend on the address
size, or in any other gdbarch element previously set. */
set_gdbarch_skip_prologue (gdbarch, hppa_skip_prologue);
- set_gdbarch_in_function_epilogue_p (gdbarch,
- hppa_in_function_epilogue_p);
+ set_gdbarch_stack_frame_destroyed_p (gdbarch,
+ hppa_stack_frame_destroyed_p);
set_gdbarch_inner_than (gdbarch, core_addr_greaterthan);
set_gdbarch_sp_regnum (gdbarch, HPPA_SP_REGNUM);
set_gdbarch_fp0_regnum (gdbarch, HPPA_FP0_REGNUM);
/* Normal frames, but in a function epilogue. */
-/* The epilogue is defined here as the 'ret' instruction, which will
+/* Implement the stack_frame_destroyed_p gdbarch method.
+
+ The epilogue is defined here as the 'ret' instruction, which will
follow any instruction such as 'leave' or 'pop %ebp' that destroys
the function's stack frame. */
static int
-i386_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+i386_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
gdb_byte insn;
struct compunit_symtab *cust;
void **this_prologue_cache)
{
if (frame_relative_level (this_frame) == 0)
- return i386_in_function_epilogue_p (get_frame_arch (this_frame),
- get_frame_pc (this_frame));
+ return i386_stack_frame_destroyed_p (get_frame_arch (this_frame),
+ get_frame_pc (this_frame));
else
return 0;
}
return mips32_scan_prologue (gdbarch, pc, limit_pc, NULL, NULL);
}
-/* Check whether the PC is in a function epilogue (32-bit version).
- This is a helper function for mips_in_function_epilogue_p. */
+/* Implement the stack_frame_destroyed_p gdbarch method (32-bit version).
+ This is a helper function for mips_stack_frame_destroyed_p. */
+
static int
-mips32_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+mips32_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr = 0, func_end = 0;
return 0;
}
-/* Check whether the PC is in a function epilogue (microMIPS version).
- This is a helper function for mips_in_function_epilogue_p. */
+/* Implement the stack_frame_destroyed_p gdbarch method (microMIPS version).
+ This is a helper function for mips_stack_frame_destroyed_p. */
static int
-micromips_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+micromips_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr = 0;
CORE_ADDR func_end = 0;
return 1;
}
-/* Check whether the PC is in a function epilogue (16-bit version).
- This is a helper function for mips_in_function_epilogue_p. */
+/* Implement the stack_frame_destroyed_p gdbarch method (16-bit version).
+ This is a helper function for mips_stack_frame_destroyed_p. */
+
static int
-mips16_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+mips16_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr = 0, func_end = 0;
return 0;
}
-/* The epilogue is defined here as the area at the end of a function,
+/* Implement the stack_frame_destroyed_p gdbarch method.
+
+ The epilogue is defined here as the area at the end of a function,
after an instruction which destroys the function's stack frame. */
+
static int
-mips_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+mips_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
if (mips_pc_is_mips16 (gdbarch, pc))
- return mips16_in_function_epilogue_p (gdbarch, pc);
+ return mips16_stack_frame_destroyed_p (gdbarch, pc);
else if (mips_pc_is_micromips (gdbarch, pc))
- return micromips_in_function_epilogue_p (gdbarch, pc);
+ return micromips_stack_frame_destroyed_p (gdbarch, pc);
else
- return mips32_in_function_epilogue_p (gdbarch, pc);
+ return mips32_stack_frame_destroyed_p (gdbarch, pc);
}
/* Root of all "set mips "/"show mips " commands. This will eventually be
set_gdbarch_skip_prologue (gdbarch, mips_skip_prologue);
- set_gdbarch_in_function_epilogue_p (gdbarch, mips_in_function_epilogue_p);
+ set_gdbarch_stack_frame_destroyed_p (gdbarch, mips_stack_frame_destroyed_p);
set_gdbarch_pointer_to_address (gdbarch, signed_pointer_to_address);
set_gdbarch_address_to_pointer (gdbarch, address_to_signed_pointer);
return 0;
}
-/* Implement the in_function_epilogue_p gdbarch method. */
+/* Implement the stack_frame_destroyed_p gdbarch method. */
static int
-nios2_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+nios2_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr;
set_gdbarch_return_value (gdbarch, nios2_return_value);
set_gdbarch_skip_prologue (gdbarch, nios2_skip_prologue);
- set_gdbarch_in_function_epilogue_p (gdbarch, nios2_in_function_epilogue_p);
+ set_gdbarch_stack_frame_destroyed_p (gdbarch, nios2_stack_frame_destroyed_p);
set_gdbarch_breakpoint_from_pc (gdbarch, nios2_breakpoint_from_pc);
set_gdbarch_dummy_id (gdbarch, nios2_dummy_id);
return 0;
}
-/* Implementation of gdbarch_in_function_epilogue_p. */
+/* Implement the stack_frame_destroyed_p gdbarch method. */
static int
-rs6000_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+rs6000_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
return rs6000_in_function_epilogue_frame_p (get_current_frame (),
gdbarch, pc);
set_gdbarch_push_dummy_call (gdbarch, ppc64_sysv_abi_push_dummy_call);
set_gdbarch_skip_prologue (gdbarch, rs6000_skip_prologue);
- set_gdbarch_in_function_epilogue_p (gdbarch, rs6000_in_function_epilogue_p);
+ set_gdbarch_stack_frame_destroyed_p (gdbarch, rs6000_stack_frame_destroyed_p);
set_gdbarch_skip_main_prologue (gdbarch, rs6000_skip_main_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
return skip_pc ? skip_pc : pc;
}
-/* Return true if we are in the functin's epilogue, i.e. after the
- instruction that destroyed the function's stack frame. */
+/* Implmement the stack_frame_destroyed_p gdbarch method. */
static int
-s390_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+s390_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
int word_size = gdbarch_ptr_bit (gdbarch) / 8;
&& (next_frame == NULL
|| get_frame_type (get_next_frame (this_frame)) != NORMAL_FRAME))
{
- /* See the comment in s390_in_function_epilogue_p on why this is
+ /* See the comment in s390_stack_frame_destroyed_p on why this is
not completely reliable ... */
- if (s390_in_function_epilogue_p (gdbarch, get_frame_pc (this_frame)))
+ if (s390_stack_frame_destroyed_p (gdbarch, get_frame_pc (this_frame)))
{
memset (&data, 0, sizeof (data));
size = 0;
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_breakpoint_from_pc (gdbarch, s390_breakpoint_from_pc);
set_gdbarch_skip_prologue (gdbarch, s390_skip_prologue);
- set_gdbarch_in_function_epilogue_p (gdbarch, s390_in_function_epilogue_p);
+ set_gdbarch_stack_frame_destroyed_p (gdbarch, s390_stack_frame_destroyed_p);
set_gdbarch_num_regs (gdbarch, S390_NUM_REGS);
set_gdbarch_sp_regnum (gdbarch, S390_SP_REGNUM);
return pc;
}
+/* Implement the stack_frame_destroyed_p gdbarch method. */
+
static int
-score7_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR cur_pc)
+score7_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR cur_pc)
{
inst_t *inst = score7_fetch_inst (gdbarch, cur_pc, NULL);
return 0;
}
+/* Implement the stack_frame_destroyed_p gdbarch method. */
+
static int
-score3_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR cur_pc)
+score3_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR cur_pc)
{
CORE_ADDR pc = cur_pc;
inst_t *inst
case bfd_mach_score7:
set_gdbarch_breakpoint_from_pc (gdbarch, score7_breakpoint_from_pc);
set_gdbarch_skip_prologue (gdbarch, score7_skip_prologue);
- set_gdbarch_in_function_epilogue_p (gdbarch,
- score7_in_function_epilogue_p);
+ set_gdbarch_stack_frame_destroyed_p (gdbarch,
+ score7_stack_frame_destroyed_p);
set_gdbarch_register_name (gdbarch, score7_register_name);
set_gdbarch_num_regs (gdbarch, SCORE7_NUM_REGS);
/* Core file support. */
case bfd_mach_score3:
set_gdbarch_breakpoint_from_pc (gdbarch, score3_breakpoint_from_pc);
set_gdbarch_skip_prologue (gdbarch, score3_skip_prologue);
- set_gdbarch_in_function_epilogue_p (gdbarch,
- score3_in_function_epilogue_p);
+ set_gdbarch_stack_frame_destroyed_p (gdbarch,
+ score3_stack_frame_destroyed_p);
set_gdbarch_register_name (gdbarch, score3_register_name);
set_gdbarch_num_regs (gdbarch, SCORE3_NUM_REGS);
break;
sh_stub_unwind_sniffer
};
-/* The epilogue is defined here as the area at the end of a function,
+/* Implement the stack_frame_destroyed_p gdbarch method.
+
+ The epilogue is defined here as the area at the end of a function,
either on the `ret' instruction itself or after an instruction which
destroys the function's stack frame. */
+
static int
-sh_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+sh_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR func_addr = 0, func_end = 0;
set_gdbarch_dummy_id (gdbarch, sh_dummy_id);
frame_base_set_default (gdbarch, &sh_frame_base);
- set_gdbarch_in_function_epilogue_p (gdbarch, sh_in_function_epilogue_p);
+ set_gdbarch_stack_frame_destroyed_p (gdbarch, sh_stack_frame_destroyed_p);
dwarf2_frame_set_init_reg (gdbarch, sh_dwarf2_frame_init_reg);
regcache_raw_write (regcache, regnum + 1, buf + 4);
}
\f
-/* Implement "in_function_epilogue_p". */
+/* Implement the stack_frame_destroyed_p gdbarch method. */
int
-sparc_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+sparc_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
/* This function must return true if we are one instruction after an
instruction that destroyed the stack frame of the current
sparc32_frame_cache (struct frame_info *this_frame, void **this_cache);
extern int
- sparc_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc);
+ sparc_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc);
\f
(gdbarch, default_stabs_argument_has_addr);
set_gdbarch_skip_prologue (gdbarch, sparc64_skip_prologue);
- set_gdbarch_in_function_epilogue_p (gdbarch, sparc_in_function_epilogue_p);
+ set_gdbarch_stack_frame_destroyed_p (gdbarch, sparc_stack_frame_destroyed_p);
/* Hook in the DWARF CFI frame unwinder. */
dwarf2_frame_set_init_reg (gdbarch, sparc64_dwarf2_frame_init_reg);
}
}
-/* Return true if we are in the function's epilogue, i.e. after the
- instruction that destroyed the function's stack frame.
+/* Implement the stack_frame_destroyed_p gdbarch method.
1) scan forward from the point of execution:
a) If you find an instruction that modifies the stack pointer
limit for the size of an epilogue. */
static int
-spu_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+spu_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR scan_pc, func_start, func_end, epilogue_start, epilogue_end;
set_gdbarch_virtual_frame_pointer (gdbarch, spu_virtual_frame_pointer);
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_skip_prologue (gdbarch, spu_skip_prologue);
- set_gdbarch_in_function_epilogue_p (gdbarch, spu_in_function_epilogue_p);
+ set_gdbarch_stack_frame_destroyed_p (gdbarch, spu_stack_frame_destroyed_p);
/* Cell/B.E. cross-architecture unwinder support. */
frame_unwind_prepend_unwinder (gdbarch, &spu2ppu_unwind);
return sp;
}
-/* This is the implementation of gdbarch method in_function_epilogue_p. */
+/* This is the implementation of gdbarch method stack_frame_destroyed_p. */
static int
-tic6x_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+tic6x_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
unsigned long inst = tic6x_fetch_instruction (gdbarch, pc);
/* Normally, the epilogue is composed by instruction `b .S2 b3'. */
set_gdbarch_get_longjmp_target (gdbarch, tic6x_get_longjmp_target);
- set_gdbarch_in_function_epilogue_p (gdbarch, tic6x_in_function_epilogue_p);
+ set_gdbarch_stack_frame_destroyed_p (gdbarch, tic6x_stack_frame_destroyed_p);
set_gdbarch_return_in_first_hidden_param_p (gdbarch,
tic6x_return_in_first_hidden_param_p);
NULL, NULL);
}
-/* This is the implementation of gdbarch method in_function_epilogue_p. */
+/* This is the implementation of gdbarch method stack_frame_destroyed_p. */
static int
-tilegx_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+tilegx_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
CORE_ADDR func_addr = 0, func_end = 0;
set_gdbarch_skip_prologue (gdbarch, tilegx_skip_prologue);
- set_gdbarch_in_function_epilogue_p (gdbarch,
- tilegx_in_function_epilogue_p);
+ set_gdbarch_stack_frame_destroyed_p (gdbarch, tilegx_stack_frame_destroyed_p);
/* Map debug registers into internal register numbers. */
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, tilegx_dwarf2_reg_to_regnum);
return (CORE_ADDR) pc;
}
-/* The epilogue is defined here as the area at the end of a function,
+/* Implement the stack_frame_destroyed_p gdbarch method.
+
+ The epilogue is defined here as the area at the end of a function,
either on the `ret' instruction itself or after an instruction which
destroys the function's stack frame. */
+
static int
-xstormy16_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+xstormy16_stack_frame_destroyed_p (struct gdbarch *gdbarch, CORE_ADDR pc)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
CORE_ADDR func_addr = 0, func_end = 0;
frame_base_set_default (gdbarch, &xstormy16_frame_base);
set_gdbarch_skip_prologue (gdbarch, xstormy16_skip_prologue);
- set_gdbarch_in_function_epilogue_p (gdbarch,
- xstormy16_in_function_epilogue_p);
+ set_gdbarch_stack_frame_destroyed_p (gdbarch,
+ xstormy16_stack_frame_destroyed_p);
/* These values and methods are used when gdb calls a target function. */
set_gdbarch_push_dummy_call (gdbarch, xstormy16_push_dummy_call);