From 771da62d67a9f27c1e706610efe51b13c3f9fd60 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Tue, 8 Nov 2016 12:47:16 +0000 Subject: [PATCH] Remove arm_insert_single_step_breakpoint This patch is to remove arm_insert_single_step_breakpoint. gdb: 2016-11-08 Yao Qi * arm-linux-tdep.c (arm_linux_software_single_step): Don't call arm_insert_single_step_breakpoint, call insert_single_step_breakpoint instead. * arm-tdep.c (arm_insert_single_step_breakpoint): Remove. (arm_software_single_step): Don't call arm_insert_single_step_breakpoint, call insert_single_step_breakpoint instead. * arm-tdep.h (arm_insert_single_step_breakpoint): Remove declaration. --- gdb/ChangeLog | 12 ++++++++++++ gdb/arm-linux-tdep.c | 5 ++++- gdb/arm-tdep.c | 19 ++++--------------- gdb/arm-tdep.h | 2 -- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 099c63e6b06..163e1a93019 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +2016-11-08 Yao Qi + + * arm-linux-tdep.c (arm_linux_software_single_step): Don't + call arm_insert_single_step_breakpoint, call + insert_single_step_breakpoint instead. + * arm-tdep.c (arm_insert_single_step_breakpoint): Remove. + (arm_software_single_step): Don't call + arm_insert_single_step_breakpoint, call + insert_single_step_breakpoint instead. + * arm-tdep.h (arm_insert_single_step_breakpoint): Remove + declaration. + 2016-11-08 Cordian A. Daniluk PR breakpoints/20739 diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 55bbae703e1..bc921771ac6 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -950,7 +950,10 @@ arm_linux_software_single_step (struct frame_info *frame) next_pcs = arm_get_next_pcs (&next_pcs_ctx); for (i = 0; VEC_iterate (CORE_ADDR, next_pcs, i, pc); i++) - arm_insert_single_step_breakpoint (gdbarch, aspace, pc); + { + pc = gdbarch_addr_bits_remove (gdbarch, pc); + insert_single_step_breakpoint (gdbarch, aspace, pc); + } do_cleanups (old_chain); diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index f41ad6daf76..a3bea97b34e 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -4235,20 +4235,6 @@ convert_to_extended (const struct floatformat *fmt, void *dbl, const void *ptr, &d, dbl); } -/* Like insert_single_step_breakpoint, but make sure we use a breakpoint - of the appropriate mode (as encoded in the PC value), even if this - differs from what would be expected according to the symbol tables. */ - -void -arm_insert_single_step_breakpoint (struct gdbarch *gdbarch, - struct address_space *aspace, - CORE_ADDR pc) -{ - pc = gdbarch_addr_bits_remove (gdbarch, pc); - - insert_single_step_breakpoint (gdbarch, aspace, pc); -} - /* Given BUF, which is OLD_LEN bytes ending at ENDADDR, expand the buffer to be NEW_LEN bytes ending at ENDADDR. Return NULL if an error occurs. BUF is freed. */ @@ -6322,7 +6308,10 @@ arm_software_single_step (struct frame_info *frame) next_pcs = arm_get_next_pcs (&next_pcs_ctx); for (i = 0; VEC_iterate (CORE_ADDR, next_pcs, i, pc); i++) - arm_insert_single_step_breakpoint (gdbarch, aspace, pc); + { + pc = gdbarch_addr_bits_remove (gdbarch, pc); + insert_single_step_breakpoint (gdbarch, aspace, pc); + } do_cleanups (old_chain); diff --git a/gdb/arm-tdep.h b/gdb/arm-tdep.h index e5d13bbee22..2eecfed2485 100644 --- a/gdb/arm-tdep.h +++ b/gdb/arm-tdep.h @@ -259,8 +259,6 @@ CORE_ADDR arm_get_next_pcs_addr_bits_remove (struct arm_get_next_pcs *self, int arm_get_next_pcs_is_thumb (struct arm_get_next_pcs *self); -void arm_insert_single_step_breakpoint (struct gdbarch *, - struct address_space *, CORE_ADDR); int arm_software_single_step (struct frame_info *); int arm_is_thumb (struct regcache *regcache); int arm_frame_is_thumb (struct frame_info *frame); -- 2.30.2