summaryrefslogtreecommitdiff
path: root/gdb/hppa-tdep.c
diff options
context:
space:
mode:
authorMartin Galvan <martin.galvan@tallertechnologies.com>2015-05-26 11:59:17 +0100
committerYao Qi <yao.qi@linaro.org>2015-05-26 12:07:59 +0100
commitc9cf6e20c6988a7e510cfe788b1b2cfe4d0d04a7 (patch)
treee85959002942a5ae2bf83aaf38e833538cf96776 /gdb/hppa-tdep.c
parent4de0562a4c69fef4952aa7e19d7bda359f02e8b4 (diff)
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.
Diffstat (limited to 'gdb/hppa-tdep.c')
-rw-r--r--gdb/hppa-tdep.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index 8964ec07ee..01a7c8098c 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -560,13 +560,16 @@ find_unwind_entry (CORE_ADDR pc)
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;
@@ -3135,8 +3138,8 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* 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);