Rename in_function_epilogue_p to stack_frame_destroyed_p

We concluded that gdbarch_in_function_epilogue_p is misnamed, since it
returns true if the given PC is one instruction after the one that
destroyed the stack (which isn't necessarily inside an epilogue),
therefore it should be renamed to stack_frame_destroyed_p.

I also took the liberty of renaming the arch-specific implementations to
*_stack_frame_destroyed_p as well for consistency.

gdb:

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.
This commit is contained in:
Martin Galvan 2015-05-26 11:59:17 +01:00 committed by Yao Qi
parent 4de0562a4c
commit c9cf6e20c6
24 changed files with 146 additions and 102 deletions

View file

@ -1487,10 +1487,9 @@ s390_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
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;
@ -1838,9 +1837,9 @@ s390_prologue_frame_unwind_cache (struct frame_info *this_frame,
&& (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;
@ -3220,7 +3219,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
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);