public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v4 00/18] All-stop on top of non-stop
@ 2015-05-21 23:19 Pedro Alves
  2015-05-21 23:19 ` [PATCH 14/18] Fix step-over-{trips-on-watchpoint|lands-on-breakpoint}.exp race Pedro Alves
                   ` (18 more replies)
  0 siblings, 19 replies; 40+ messages in thread
From: Pedro Alves @ 2015-05-21 23:19 UTC (permalink / raw)
  To: gdb-patches

v3: https://sourceware.org/ml/gdb-patches/2015-04/msg00662.html
v2: https://sourceware.org/ml/gdb-patches/2015-04/msg00198.html
v1: https://sourceware.org/ml/gdb-patches/2015-04/msg00073.html

Compared to v3, a set of minor changes accumulated, to address review
comments and discussions (i.e., no major functional/design changes),
plus fixes to a patch that touched all targets (that I noticed
converted a couple wrong).

I believe I addressed all review comments thus far.  Barring comments,
I'd like to push this in, and expose it to the build bots.

I tried to mention the differences to v3 in each patch that had
changes, if any (scroll past ChangeLog).

Documentation changes have not changed, and have already been
approved.

Note most of these patches could go in without the final bits that
actually do all-stop-on-top-of-non-stop, as they fix problems that
exist e.g., with "set non-stop on" or "set displaced-stepping on" too.

I've again (force) pushed this to users/palves/all-stop-non-stop for
review and testing convenience.

As nothing major changed, I retested the whole series on x86-64 only.

v3 was tested on:

     x86-64 GNU/Linux
     x86-64 GNU/Linux on top of software single-step branch
     PPC64 GNU/Linux
     S/390 GNU/Linux

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Series-intro proper follows:

This series implements user-visible all-stop mode running with the
target_ops backend always in non-stop mode.  This is a stepping stone
towards finer-grained control of threads, being able to do interesting
things like inferior and thread groups/sets (itsets), associating
groups with breakpoints (which threads cause a stop, which threads are
implicitly paused when a breakpoint triggers), etc.  From the user's
perspective, all-stop mode is really just a special case of being able
to stop and resume specific sets of threads, so it makes sense to do
this step first.

After this series, even in all-stop mode ("set non-stop off", the
default) the target is no longer in charge of stopping all threads
before reporting an event to the core -- the core takes care of it
when it sees fit.  For example, when "next"- or "step"-ing, we can
avoid stopping and resuming all threads at each internal single-step,
and instead only stop all threads when we're about to present the stop
to the user.

In order to get there, the series teaches GDB to do non-stop mode even
without displaced stepping (stop all threads, step over breakpoint,
restart threads), as displaced stepping isn't implemented everywhere,
and doesn't work in some scenarios (as in, we can't use it, not that
it's buggy).

And then it fixes all testsuite regressions (on native x86-64, ppc64
and s390 GNU/Linux) this new mode causes, compared to all-stop ("set
non-stop off") with the target backend in all-stop mode too (i.e., the
current default).  Making "target remote" work in always non-stop mode
is deferred for later (this will be even more useful for remote as the
all-stop mode RSP variant can't really do asynchronous debugging).

Tested on x86_64 Fedora 20, native, with and without "set displaced
off", and with and without "maint set target-non-stop on"; and also
against gdbserver.  Tested on x86-64 GNU/Linux native on top of x86
software single-step branch.  Tested on PPC64 Fedora 18.  Tested on
S/390 RHEL 7.1.

Pedro Alves (18):
  Fix and test "checkpoint" in non-stop mode
  Change adjust_pc_after_break's prototype
  remote.c/all-stop: Implement TARGET_WAITKIND_NO_RESUMED and
    TARGET_WNOHANG
  Make thread_still_needs_step_over consider stepping_over_watchpoint
    too
  Embed the pending step-over chain in thread_info objects
  Use keep_going in proceed and start_step_over too
  Misc switch_back_to_stepped_thread cleanups
  Add comments to currently_stepping and target_resume
  Factor out code to re-resume stepped thread
  Teach non-stop to do in-line step-overs (stop all, step, restart)
  Implement all-stop on top of a target running non-stop mode
  Fix signal-while-stepping-over-bp-other-thread.exp on targets always
    in non-stop
  Fix interrupt-noterm.exp on targets always in non-stop
  Fix step-over-{trips-on-watchpoint|lands-on-breakpoint}.exp race
  Disable displaced stepping if trying it fails
  PPC64: Fix gdb.arch/ppc64-atomic-inst.exp with displaced stepping
  S/390: displaced stepping and PC-relative RIL-b/RIL-c instructions
  native Linux: enable always non-stop by default

 gdb/ChangeLog                                      |   18 +
 gdb/testsuite/ChangeLog                            |    6 +
 gdb/NEWS                                           |    6 +
 gdb/breakpoint.c                                   |   11 +-
 gdb/darwin-nat.c                                   |    6 +-
 gdb/doc/gdb.texinfo                                |   24 +
 gdb/gdbarch.h                                      |    6 +-
 gdb/gdbarch.sh                                     |    4 +
 gdb/gdbthread.h                                    |   61 +-
 gdb/inf-ptrace.c                                   |    6 +-
 gdb/infcmd.c                                       |    6 +-
 gdb/infrun.c                                       | 2330 +++++++++++++++-----
 gdb/infrun.h                                       |    7 +
 gdb/linux-nat.c                                    |   33 +-
 gdb/nto-procfs.c                                   |   16 +-
 gdb/procfs.c                                       |    6 +-
 gdb/remote-m32r-sdi.c                              |    6 +-
 gdb/remote-sim.c                                   |   20 +-
 gdb/remote.c                                       |   57 +-
 gdb/rs6000-tdep.c                                  |   68 +-
 gdb/s390-linux-tdep.c                              |  115 +-
 gdb/target-delegates.c                             |   59 +
 gdb/target.c                                       |   92 +
 gdb/target.h                                       |   28 +-
 gdb/target/waitstatus.h                            |    5 +-
 gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp       |   50 +-
 gdb/testsuite/gdb.base/checkpoint-ns.exp           |   26 +
 gdb/testsuite/gdb.base/checkpoint.exp              |    6 +-
 gdb/testsuite/gdb.base/valgrind-disp-step.c        |   32 +
 gdb/testsuite/gdb.base/valgrind-disp-step.exp      |  131 ++
 .../signal-while-stepping-over-bp-other-thread.exp |    2 +-
 .../gdb.threads/step-over-lands-on-breakpoint.c    |   17 +-
 .../gdb.threads/step-over-lands-on-breakpoint.exp  |    6 +-
 .../gdb.threads/step-over-trips-on-watchpoint.c    |   17 +-
 .../gdb.threads/step-over-trips-on-watchpoint.exp  |    9 +-
 gdb/thread.c                                       |  197 +-
 gdb/windows-nat.c                                  |    6 +-
 37 files changed, 2793 insertions(+), 702 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/checkpoint-ns.exp
 create mode 100644 gdb/testsuite/gdb.base/valgrind-disp-step.c
 create mode 100644 gdb/testsuite/gdb.base/valgrind-disp-step.exp

-- 
1.9.3

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2015-09-14 14:24 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-21 23:19 [PATCH v4 00/18] All-stop on top of non-stop Pedro Alves
2015-05-21 23:19 ` [PATCH 14/18] Fix step-over-{trips-on-watchpoint|lands-on-breakpoint}.exp race Pedro Alves
2015-05-21 23:19 ` [PATCH 18/18] native Linux: enable always non-stop by default Pedro Alves
2015-05-21 23:19 ` [PATCH 01/18] Fix and test "checkpoint" in non-stop mode Pedro Alves
2015-05-21 23:19 ` [PATCH 05/18] Embed the pending step-over chain in thread_info objects Pedro Alves
2015-05-21 23:19 ` [PATCH 09/18] Factor out code to re-resume stepped thread Pedro Alves
2015-05-21 23:19 ` [PATCH 06/18] Use keep_going in proceed and start_step_over too Pedro Alves
2015-05-21 23:19 ` [PATCH 02/18] Change adjust_pc_after_break's prototype Pedro Alves
2015-05-21 23:19 ` [PATCH 16/18] PPC64: Fix gdb.arch/ppc64-atomic-inst.exp with displaced stepping Pedro Alves
2015-05-21 23:19 ` [PATCH 11/18] Implement all-stop on top of a target running non-stop mode Pedro Alves
2015-09-11 20:53   ` Jan Kratochvil
2015-09-14 14:24     ` Pedro Alves
2015-05-21 23:19 ` [PATCH 03/18] remote.c/all-stop: Implement TARGET_WAITKIND_NO_RESUMED and TARGET_WNOHANG Pedro Alves
2015-05-21 23:19 ` [PATCH 04/18] Make thread_still_needs_step_over consider stepping_over_watchpoint too Pedro Alves
2015-05-21 23:19 ` [PATCH 08/18] Add comments to currently_stepping and target_resume Pedro Alves
2015-05-21 23:19 ` [PATCH 12/18] Fix signal-while-stepping-over-bp-other-thread.exp on targets always in non-stop Pedro Alves
2015-05-21 23:25 ` [PATCH 07/18] Misc switch_back_to_stepped_thread cleanups Pedro Alves
2015-05-21 23:28 ` [PATCH 13/18] Fix interrupt-noterm.exp on targets always in non-stop Pedro Alves
2015-05-21 23:50 ` [PATCH 17/18] S/390: displaced stepping and PC-relative RIL-b/RIL-c instructions Pedro Alves
2015-05-21 23:56 ` [PATCH 10/18] Teach non-stop to do in-line step-overs (stop all, step, restart) Pedro Alves
2015-05-21 23:59 ` [PATCH 15/18] Disable displaced stepping if trying it fails Pedro Alves
2015-08-07 16:58 ` [PATCH v4 00/18] All-stop on top of non-stop Pedro Alves
2015-08-12 18:32   ` Joel Brobecker
2015-08-12 19:05     ` Pedro Alves
2015-08-12 20:26       ` Joel Brobecker
2015-08-12 20:31         ` Luis Machado
2015-08-12 20:50           ` Joel Brobecker
2015-08-12 21:07             ` Luis Machado
2015-08-13 16:04             ` Pedro Alves
2015-08-13 18:17               ` Joel Brobecker
2015-08-13  1:46         ` [pushed] gdb.base/dso2dso.exp sometimes broken Joel Brobecker
2015-08-13 17:27         ` [PATCH v4 00/18] All-stop on top of non-stop Pedro Alves
2015-08-13 18:29           ` Joel Brobecker
2015-08-12 19:39     ` Luis Machado
2015-08-12 19:51       ` Sergio Durigan Junior
2015-08-12 19:59       ` Joel Brobecker
2015-08-12 20:18         ` Luis Machado
2015-08-12 20:33           ` Joel Brobecker
2015-08-12 20:40             ` Luis Machado
2015-08-12 20:56               ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).