aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-linux-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/arm-linux-tdep.c')
-rw-r--r--gdb/arm-linux-tdep.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 4a734b0..c621cd6 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -921,12 +921,11 @@ arm_linux_get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self)
/* Insert a single step breakpoint at the next executed instruction. */
-static int
+static VEC (CORE_ADDR) *
arm_linux_software_single_step (struct frame_info *frame)
{
struct regcache *regcache = get_current_regcache ();
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- struct address_space *aspace = get_regcache_aspace (regcache);
struct arm_get_next_pcs next_pcs_ctx;
CORE_ADDR pc;
int i;
@@ -936,7 +935,7 @@ arm_linux_software_single_step (struct frame_info *frame)
/* If the target does have hardware single step, GDB doesn't have
to bother software single step. */
if (target_can_do_single_step () == 1)
- return 0;
+ return NULL;
old_chain = make_cleanup (VEC_cleanup (CORE_ADDR), &next_pcs);
@@ -955,12 +954,9 @@ arm_linux_software_single_step (struct frame_info *frame)
VEC_replace (CORE_ADDR, next_pcs, i, pc);
}
- for (i = 0; VEC_iterate (CORE_ADDR, next_pcs, i, pc); i++)
- insert_single_step_breakpoint (gdbarch, aspace, pc);
-
- do_cleanups (old_chain);
+ discard_cleanups (old_chain);
- return 1;
+ return next_pcs;
}
/* Support for displaced stepping of Linux SVC instructions. */