From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 00/17] All-stop on top of non-stop
Date: Wed, 01 Apr 2015 22:14:00 -0000 [thread overview]
Message-ID: <1427926454-16431-1-git-send-email-palves@redhat.com> (raw)
(Eli, documentation changes in patch #12.)
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
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.
I've pushed this to users/palves/all-stop-non-stop for convenience.
Pedro Alves (17):
Fix and test "checkpoint" in non-stop mode
PR13858 - Can't do displaced stepping with no symbols
Displaced stepping debug: fetch the right regcache
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
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.exp/step-over-lands-on-breakpoint.exp
race
Disable displaced stepping if trying it fails
native Linux: enable always non-stop by default
gdb/breakpoint.c | 11 +-
gdb/darwin-nat.c | 6 +-
gdb/doc/gdb.texinfo | 23 +
gdb/gdbthread.h | 57 +-
gdb/gnu-nat.c | 7 -
gdb/inf-ptrace.c | 6 +-
gdb/infcmd.c | 6 +-
gdb/inferior.h | 8 +
gdb/infrun.c | 2122 +++++++++++++++-----
gdb/infrun.h | 3 +
gdb/linux-nat.c | 33 +-
gdb/monitor.c | 4 +-
gdb/nto-procfs.c | 14 +-
gdb/procfs.c | 4 +-
gdb/remote-m32r-sdi.c | 6 +-
gdb/remote-sim.c | 20 +-
gdb/remote.c | 57 +-
gdb/target-delegates.c | 59 +
gdb/target.c | 83 +
gdb/target.h | 24 +-
gdb/target/waitstatus.h | 5 +-
gdb/testsuite/gdb.base/checkpoint-ns.exp | 27 +
gdb/testsuite/gdb.base/checkpoint.exp | 31 +-
gdb/testsuite/gdb.base/step-over-no-symbols.exp | 88 +
gdb/testsuite/gdb.base/valgrind-disp-step.c | 32 +
gdb/testsuite/gdb.base/valgrind-disp-step.exp | 116 ++
.../signal-while-stepping-over-bp-other-thread.exp | 20 +-
.../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 | 8 +-
gdb/thread.c | 206 +-
gdb/windows-nat.c | 6 +-
33 files changed, 2451 insertions(+), 681 deletions(-)
create mode 100644 gdb/testsuite/gdb.base/checkpoint-ns.exp
create mode 100644 gdb/testsuite/gdb.base/step-over-no-symbols.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
next reply other threads:[~2015-04-01 22:14 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-01 22:14 Pedro Alves [this message]
2015-04-01 22:14 ` [PATCH 08/17] Use keep_going in proceed and start_step_over too Pedro Alves
2015-04-01 22:14 ` [PATCH 17/17] native Linux: enable always non-stop by default Pedro Alves
2015-04-01 22:14 ` [PATCH 13/17] Fix signal-while-stepping-over-bp-other-thread.exp on targets always in non-stop Pedro Alves
2015-04-01 22:14 ` [PATCH 04/17] Change adjust_pc_after_break's prototype Pedro Alves
2015-04-01 22:14 ` [PATCH 10/17] Factor out code to re-resume stepped thread Pedro Alves
2015-04-01 22:14 ` [PATCH 01/17] Fix and test "checkpoint" in non-stop mode Pedro Alves
2015-04-01 22:14 ` [PATCH 02/17] PR13858 - Can't do displaced stepping with no symbols Pedro Alves
2015-04-01 22:14 ` [PATCH 09/17] Misc switch_back_to_stepped_thread cleanups Pedro Alves
2015-04-01 22:14 ` [PATCH 03/17] Displaced stepping debug: fetch the right regcache Pedro Alves
2015-04-07 10:47 ` Pedro Alves
2015-04-07 13:55 ` Yao Qi
2015-04-07 14:12 ` Pedro Alves
2015-04-01 22:24 ` [PATCH 07/17] Embed the pending step-over chain in thread_info objects Pedro Alves
2015-04-01 22:40 ` [PATCH 06/17] Make thread_still_needs_step_over consider stepping_over_watchpoint too Pedro Alves
2015-04-01 22:40 ` [PATCH 15/17] Fix step-over-trips-on-watchpoint.exp/step-over-lands-on-breakpoint.exp race Pedro Alves
2015-04-01 22:41 ` [PATCH 12/17] Implement all-stop on top of a target running non-stop mode Pedro Alves
2015-04-02 14:58 ` Eli Zaretskii
2015-04-07 9:51 ` Pedro Alves
2015-04-07 10:01 ` Eli Zaretskii
2015-04-07 10:11 ` Pedro Alves
2015-04-01 23:06 ` [PATCH 14/17] Fix interrupt-noterm.exp on targets always in non-stop Pedro Alves
2015-04-01 23:06 ` [PATCH 16/17] Disable displaced stepping if trying it fails Pedro Alves
2015-04-01 23:07 ` [PATCH 05/17] remote.c/all-stop: Implement TARGET_WAITKIND_NO_RESUMED and TARGET_WNOHANG Pedro Alves
2015-04-01 23:08 ` [PATCH 11/17] Teach non-stop to do in-line step-overs (stop all, step, restart) Pedro Alves
2015-04-07 12:52 ` [cancel] Re: [PATCH 00/17] All-stop on top of non-stop Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427926454-16431-1-git-send-email-palves@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox