This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v2 0/5] Fix lost events, and handle multiple step-overs.


This is v2 of the "Fix a bunch of run control bugs." series, found at 
https://sourceware.org/ml/gdb-patches/2014-02/msg00761.html.

The patch for "PR gdb/16575: stale breakpoint instructions in the code
cache" has meanwhile gone in already.

What remains now is related to GDB losing events - breakpoints and
watchpoints - in some situations, and, about teaching GDB that it
might need to step over breakpoints in multiple threads.

Further changes in v2:

- Order of some patches changed.

- Bugs that exposed were fixed.

- One test moved to a different patch and got extended to cover
another scenario gdb was mishandling and this series fixes.

- Yao's review comments to v1's tests (to date) are addressed.

- Software single-step breakpoints are not longer converted to real
breakpoints.

One nice side effect of patch #2 is that GDB no longer removes/inserts
_all_ breakpoints when stepping over one.  GDB after that only removes
the breakpoint being stepped over.  This eliminates a lot of z0/Z0 RSP
traffic if you have a lot of breakpoints, and have a conditional or
thread-specific breakpoint constantly triggering and not causing a
user-visible stop.

This changes heavily core run control code, which affects software
single-step targets too.  For more comfortable development and
testing, I actually hacked on this against my software single-step on
x86 branch first.

Tested on x86_64 Fedora 17, against pristine mainline, and against a
series that implements software single-step on x86-64.

In absence of barring comments, I plan to push this in soon.

Pedro Alves (5):
  Fix missing breakpoint/watchpoint hits, eliminate deferred_step_ptid.
  PR breakpoints/7143 - Watchpoint does not trigger when first set
  Fix for even more missed events; eliminate thread-hop code.
  Handle multiple step-overs.
  Make signal-while-stepping-over-bp-other-thread.exp run against
    remote targets too.

 gdb/breakpoint.c                                   |  24 +-
 gdb/breakpoint.h                                   |  12 +
 gdb/inferior.h                                     |   6 +
 gdb/infrun.c                                       | 732 ++++++++++-----------
 gdb/testsuite/gdb.base/watchpoint.exp              |  13 +-
 gdb/testsuite/gdb.cp/annota2.exp                   |   3 -
 gdb/testsuite/gdb.cp/annota3.exp                   |   3 -
 gdb/testsuite/gdb.threads/multiple-step-overs.c    | 105 +++
 gdb/testsuite/gdb.threads/multiple-step-overs.exp  |  80 +++
 .../signal-while-stepping-over-bp-other-thread.c   |   2 +
 .../signal-while-stepping-over-bp-other-thread.exp |  16 +-
 .../gdb.threads/step-over-lands-on-breakpoint.c    |  65 ++
 .../gdb.threads/step-over-lands-on-breakpoint.exp  |  62 ++
 .../gdb.threads/step-over-trips-on-watchpoint.c    |  67 ++
 .../gdb.threads/step-over-trips-on-watchpoint.exp  |  90 +++
 15 files changed, 843 insertions(+), 437 deletions(-)
 create mode 100644 gdb/testsuite/gdb.threads/multiple-step-overs.c
 create mode 100644 gdb/testsuite/gdb.threads/multiple-step-overs.exp
 create mode 100644 gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.c
 create mode 100644 gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp
 create mode 100644 gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.c
 create mode 100644 gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp

-- 
1.7.11.7


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]