public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 00/18] Remote all-stop on top of non-stop
@ 2015-10-14 15:28 Pedro Alves
  2015-10-14 15:28 ` [PATCH 13/18] infrun: Fix TARGET_WAITKIND_NO_RESUMED handling in non-stop mode Pedro Alves
                   ` (20 more replies)
  0 siblings, 21 replies; 60+ messages in thread
From: Pedro Alves @ 2015-10-14 15:28 UTC (permalink / raw)
  To: gdb-patches

This series implements remote support for all-stop on top of non-stop.

The first bits do the base work, enough to start running the testsuite
with "maint set target-non-stop on".  And then one by one, the patches
tackle issues exposed by the testsuite until I found no regressions on
x86-64 Fedora 20 (remote and extended-remote).

The last patch in the series enables the feature by default.  What
this means is that for non-stop-aware remote stubs that support all
the needed extensions, GDB will always connect in non-stop mode.  Note
that from the users' perspective, nothing should change -- gdb still
stops all threads whenever a breakpoint hits, etc.

The difference is that with the remote side in non-stop mode, gdb is
always free to sent commands/packets, even while the target is
running, due to the asynchronous nature of the non-stop variant of the
RSP.  E.g.,

Before:

 (gdb) c&
 Continuing.
 (gdb) Reading /lib64/libpthread.so.0 from remote target...
 Reading /lib64/libc.so.6 from remote target...
 b threads.c:68
 Cannot execute this command while the target is running.
 Use the "interrupt" command to stop the target
 and then try again.
 (gdb) 

After:

 (gdb) c&
 Continuing.
 (gdb) Reading /lib64/libpthread.so.0 from remote target...
 Reading /lib64/libc.so.6 from remote target...
 info threads 
 [New Thread 24891]
 [New Thread 24892]
   Id   Target Id         Frame 
   3    Thread 24892      (running)
   2    Thread 24891      (running)
 * 1    Thread 24881      (running)
 (gdb) b threads.c:68
 Breakpoint 1 at 0x400811: file threads.c, line 68.
 (gdb) [Switching to Thread 24891]

 Breakpoint 1, thread_function0 (arg=0x0) at threads.c:68
 68              (*myp) ++;
 info threads 
   Id   Target Id         Frame 
   3    Thread 24892      0x0000003615ebc6ed in nanosleep () at ../sysdeps/unix/syscall-template.S:81
 * 2    Thread 24891      thread_function0 (arg=0x0) at threads.c:68
   1    Thread 24881      0x0000003616a09237 in pthread_join (threadid=140737353881344, thread_return=0x7fffffffd718) at pthread_join.c:92
 (gdb) 

In addition, this paves to way for itsets support with remote
targets too.

As with the equivalent work done for the native target, it's easy to
revert back to the old behavior by entering "maint set target-non-stop
off" or reverting the last patch.

Pedro Alves (18):
  Fix mi-nonstop.exp with extended-remote
  Remote all-stop-on-top-of-non-stop
  attach + target always in non-stop mode: stop all threads
  gdbserver crash running gdb.threads/non-ldr-exc-1.exp
  remote: stop reason and watchpoint data address per thread
  New vCtrlC packet, non-stop mode equivalent of \003
  gdbserver crash if gdb attaches too fast
  gdbserver resume_stop handling bug
  Make dprintf-non-stop.exp cope with remote testing
  Remote thread create/exit events
  gdbserver: fix killed-outside.exp
  testsuite: Range stepping and non-stop mode
  infrun: Fix TARGET_WAITKIND_NO_RESUMED handling in non-stop mode
  Implement TARGET_WAITKIND_NO_RESUMED in the remote protocol
  gdbserver:prepare_access_memory: pick another thread
  gdbserver/linux: Always wake up event loop after resume
  gdbserver: don't exit until GDB disconnects
  remote: enable "maint set target-non-stop" by default

 gdb/NEWS                                     |  28 ++
 gdb/doc/gdb.texinfo                          | 123 +++++++-
 gdb/gdbserver/gdbthread.h                    |   4 +
 gdb/gdbserver/inferiors.c                    |  23 ++
 gdb/gdbserver/linux-low.c                    | 180 ++++++++---
 gdb/gdbserver/mem-break.c                    |  17 +-
 gdb/gdbserver/remote-utils.c                 |  21 +-
 gdb/gdbserver/server.c                       | 151 ++++++---
 gdb/gdbserver/server.h                       |   1 +
 gdb/gdbserver/target.c                       | 107 +++++++
 gdb/gdbserver/target.h                       |  14 +-
 gdb/gdbthread.h                              |   7 +-
 gdb/infcmd.c                                 | 101 ++++--
 gdb/inferior.h                               |  12 +
 gdb/infrun.c                                 | 150 ++++++++-
 gdb/infrun.h                                 |   6 +
 gdb/remote-notif.c                           |   4 +-
 gdb/remote.c                                 | 438 ++++++++++++++++++++++-----
 gdb/target-delegates.c                       |  28 ++
 gdb/target.c                                 |   8 +
 gdb/target.h                                 |   5 +
 gdb/target/waitstatus.c                      |   5 +
 gdb/target/waitstatus.h                      |   8 +-
 gdb/testsuite/gdb.base/dprintf-non-stop.exp  |  10 +-
 gdb/testsuite/gdb.mi/mi-nonstop.exp          |  11 +-
 gdb/testsuite/lib/gdb.exp                    |  20 +-
 gdb/testsuite/lib/mi-support.exp             |   9 +
 gdb/testsuite/lib/range-stepping-support.exp |   7 +-
 gdb/thread.c                                 |  16 +
 29 files changed, 1266 insertions(+), 248 deletions(-)

-- 
1.9.3

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

end of thread, other threads:[~2015-12-01 17:10 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14 15:28 [PATCH 00/18] Remote all-stop on top of non-stop Pedro Alves
2015-10-14 15:28 ` [PATCH 13/18] infrun: Fix TARGET_WAITKIND_NO_RESUMED handling in non-stop mode Pedro Alves
2015-10-14 15:28 ` [PATCH 01/18] Fix mi-nonstop.exp with extended-remote Pedro Alves
2015-10-14 15:28 ` [PATCH 03/18] attach + target always in non-stop mode: stop all threads Pedro Alves
2015-10-26 13:22   ` Yao Qi
2015-11-23 18:15     ` Pedro Alves
2015-11-23 18:42       ` Pedro Alves
2015-11-26 16:12       ` Yao Qi
2015-11-26 16:23         ` Pedro Alves
2015-11-27  9:33           ` Yao Qi
2015-10-14 15:28 ` [PATCH 02/18] Remote all-stop-on-top-of-non-stop Pedro Alves
2015-10-24 22:39   ` Yao Qi
2015-11-23 15:40     ` Pedro Alves
2015-11-23 18:39       ` Pedro Alves
2015-11-26 15:53         ` Yao Qi
2015-10-14 15:28 ` [PATCH 15/18] gdbserver:prepare_access_memory: pick another thread Pedro Alves
2015-10-14 15:28 ` [PATCH 18/18] remote: enable "maint set target-non-stop" by default Pedro Alves
2015-10-14 15:33 ` [PATCH 05/18] remote: stop reason and watchpoint data address per thread Pedro Alves
2015-10-14 15:33 ` [PATCH 10/18] Remote thread create/exit events Pedro Alves
2015-10-14 16:35   ` Eli Zaretskii
2015-10-26 16:50   ` Yao Qi
2015-11-23 15:41     ` Pedro Alves
2015-12-01 15:12   ` Ulrich Weigand
2015-12-01 16:06     ` Pedro Alves
2015-12-01 17:10       ` Ulrich Weigand
2015-10-14 15:36 ` [PATCH 12/18] testsuite: Range stepping and non-stop mode Pedro Alves
2015-10-14 15:36 ` [PATCH 17/18] gdbserver: don't exit until GDB disconnects Pedro Alves
2015-10-14 15:36 ` [PATCH 14/18] Implement TARGET_WAITKIND_NO_RESUMED in the remote protocol Pedro Alves
2015-10-14 16:36   ` Eli Zaretskii
2015-10-19 16:21   ` Yao Qi
2015-10-19 16:48     ` Pedro Alves
2015-10-14 15:36 ` [PATCH 11/18] gdbserver: fix killed-outside.exp Pedro Alves
2015-10-27 12:02   ` Yao Qi
2015-11-25 15:06     ` Pedro Alves
2015-11-26 16:51       ` Yao Qi
2015-11-26 17:56         ` Pedro Alves
2015-10-14 15:36 ` [PATCH 06/18] New vCtrlC packet, non-stop mode equivalent of \003 Pedro Alves
2015-10-26 14:11   ` Yao Qi
2015-11-30 18:25     ` Pedro Alves
2015-10-14 15:36 ` [PATCH 04/18] gdbserver crash running gdb.threads/non-ldr-exc-1.exp Pedro Alves
2015-10-26 13:54   ` Yao Qi
2015-11-24 16:34     ` Pedro Alves
2015-11-26 16:23       ` Yao Qi
2015-11-30 14:53         ` Pedro Alves
2015-10-14 15:37 ` [PATCH 07/18] gdbserver crash if gdb attaches too fast Pedro Alves
2015-10-14 15:37 ` [PATCH 09/18] Make dprintf-non-stop.exp cope with remote testing Pedro Alves
2015-10-14 15:37 ` [PATCH 16/18] gdbserver/linux: Always wake up event loop after resume Pedro Alves
2015-10-26 17:28   ` Yao Qi
2015-11-25 15:31     ` Pedro Alves
2015-10-14 15:38 ` [PATCH 08/18] gdbserver resume_stop handling bug Pedro Alves
2015-10-14 16:37   ` Eli Zaretskii
2015-11-25 15:12     ` Pedro Alves
2015-11-25 17:53       ` Eli Zaretskii
2015-10-15 10:46 ` [PATCH 00/18] Remote all-stop on top of non-stop Pedro Alves
2015-10-16 16:47 ` Yao Qi
2015-10-19 11:48   ` Yao Qi
2015-10-19 15:28     ` Pedro Alves
2015-10-19 15:47       ` Yao Qi
2015-10-27 13:11 ` Yao Qi
2015-11-30 19:59   ` Pedro Alves

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).