diff options
author | Martin Galvan <martin.galvan@tallertechnologies.com> | 2015-05-26 11:59:17 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2015-05-26 12:07:59 +0100 |
commit | c9cf6e20c6988a7e510cfe788b1b2cfe4d0d04a7 (patch) | |
tree | e85959002942a5ae2bf83aaf38e833538cf96776 /gdb/arm-tdep.c | |
parent | 4de0562a4c69fef4952aa7e19d7bda359f02e8b4 (diff) | |
download | gdb-c9cf6e20c6988a7e510cfe788b1b2cfe4d0d04a7.zip gdb-c9cf6e20c6988a7e510cfe788b1b2cfe4d0d04a7.tar.gz gdb-c9cf6e20c6988a7e510cfe788b1b2cfe4d0d04a7.tar.bz2 |
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/arm-tdep.c')
-rw-r--r-- | gdb/arm-tdep.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 8181f25..638855b 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -3223,11 +3223,10 @@ arm_dwarf2_frame_init_reg (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; @@ -3334,11 +3333,10 @@ thumb_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc) 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; @@ -3346,7 +3344,7 @@ arm_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc) 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; @@ -10356,8 +10354,8 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* 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); |