aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-02-26 18:48:46 +0000
committerPedro Alves <palves@redhat.com>2015-02-26 18:48:46 +0000
commit9beb7c4e1d403e1374096df3a16607132a8cfe84 (patch)
tree70a048f33b56a9f70b06446072811b24e3930523 /gdb/gdbserver
parent77b64a49e24dd4b5f4c7edb5d4030fe8aa1eec44 (diff)
downloadgdb-9beb7c4e1d403e1374096df3a16607132a8cfe84.zip
gdb-9beb7c4e1d403e1374096df3a16607132a8cfe84.tar.gz
gdb-9beb7c4e1d403e1374096df3a16607132a8cfe84.tar.bz2
gdbserver/Linux: Simplify stepping past program breakpoint a little
.decr_pc_after_break is never higher than .breakpoint_len, so use .breakpoint_len directly. Based on idea from Yao here: https://sourceware.org/ml/gdb-patches/2015-02/msg00689.html gdb/gdbserver/ChangeLog: 2015-02-26 Pedro Alves <palves@redhat.com> * linux-low.c (linux_wait_1): When incrementing the PC past a program breakpoint always use the_low_target.breakpoint_len as increment, rather than the maximum between that and the_low_target.decr_pc_after_break.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog7
-rw-r--r--gdb/gdbserver/linux-low.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index a130aab..6bb8950 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,10 @@
+2015-02-26 Pedro Alves <palves@redhat.com>
+
+ * linux-low.c (linux_wait_1): When incrementing the PC past a
+ program breakpoint always use the_low_target.breakpoint_len as
+ increment, rather than the maximum between that and
+ the_low_target.decr_pc_after_break.
+
2015-02-23 Pedro Alves <palves@redhat.com>
* linux-low.c (check_stopped_by_breakpoint): Don't check if the
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 1c66985..c0d3b0d 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -2555,12 +2555,7 @@ linux_wait_1 (ptid_t ptid,
if (!ptid_equal (step_over_bkpt, null_ptid)
&& event_child->stop_reason == LWP_STOPPED_BY_SW_BREAKPOINT)
{
- unsigned int increment_pc;
-
- if (the_low_target.breakpoint_len > the_low_target.decr_pc_after_break)
- increment_pc = the_low_target.breakpoint_len;
- else
- increment_pc = the_low_target.decr_pc_after_break;
+ unsigned int increment_pc = the_low_target.breakpoint_len;
if (debug_threads)
{