diff options
author | Yao Qi <yao.qi@linaro.org> | 2016-11-08 12:58:33 +0000 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-11-08 12:58:33 +0000 |
commit | 0bc5d801ec836cd4b7d1ab7d05658e7a1d05df22 (patch) | |
tree | b34eb60118afa6194e6f810b9242f5b663b1b4e0 /gdb/arm-linux-tdep.c | |
parent | 771da62d67a9f27c1e706610efe51b13c3f9fd60 (diff) | |
download | gdb-0bc5d801ec836cd4b7d1ab7d05658e7a1d05df22.zip gdb-0bc5d801ec836cd4b7d1ab7d05658e7a1d05df22.tar.gz gdb-0bc5d801ec836cd4b7d1ab7d05658e7a1d05df22.tar.bz2 |
Clear addr bit in next_pcs vector
This patch is to split the loop of calling gdbarch_addr_bits_remove
and insert_single_step_breakpoint into two loops.
gdb:
2016-11-08 Yao Qi <yao.qi@linaro.org>
* arm-linux-tdep.c (arm_linux_software_single_step): Write
adjusted address back to vector. Call insert_single_step_breakpoint
in a new loop.
* arm-tdep.c (arm_software_single_step): Likewise.
Diffstat (limited to 'gdb/arm-linux-tdep.c')
-rw-r--r-- | gdb/arm-linux-tdep.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index bc92177..4a734b0 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -952,9 +952,12 @@ arm_linux_software_single_step (struct frame_info *frame) for (i = 0; VEC_iterate (CORE_ADDR, next_pcs, i, pc); i++) { pc = gdbarch_addr_bits_remove (gdbarch, pc); - insert_single_step_breakpoint (gdbarch, aspace, pc); + 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); return 1; |