public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: gdb-patches@sourceware.org
Subject: [PATCH v2 00/13] FreeBSD target async mode and related refactoring
Date: Tue,  3 Aug 2021 11:49:47 -0700	[thread overview]
Message-ID: <20210803185000.22171-1-jhb@FreeBSD.org> (raw)

Changes since the RFC:

- The series has been teste on Linux x86-64 and I did not see any
  regressions.

- The first patch includes some changes from Lancelot Six to only
  compile event-pipe.cc for platforms supporting pipe() or pipe2().  I
  haven't tested this on a Windows build however (and don't have an
  easy way to do so).

- Patches 4 through 6 are new based on Pedro's replies to some of my
  earlier questions.
  
- Patch 7 was originally part of the main "fbsd async" patch but I
  split it out so it is a bit clearer to other platforms which
  inherit from inf-ptrace which parts are shared vs platform-specific.
  It also now uses TARGET_WAITKIND_NO_RESUMED for the ECHILD case.

- Patches 12 and 13 are new and are further refactorings.  I could
  perhaps move them earlier before the main "fbsd async" patch
  if they are ok.  It would make the fbsd async patch itself a
  bit smaller if so, but for the last patch in particular it might
  also be useful to see two targets being updated to understand
  which parts were pulled up into inf-ptrace?

John Baldwin (13):
  gdbsupport: Add an event-pipe class.
  gdb linux-nat: Convert linux_nat_event_pipe to the event_pipe class.
  gdbserver linux-low: Convert linux_event_pipe to the event_pipe class.
  linux-nat: Don't enable async mode at the end of
    linux_nat_target::resume.
  do_target_wait_1: Clear TARGET_WNOHANG if the target isn't async.
  inf-ptrace: Raise an internal_error if waitpid() fails.
  inf-ptrace: Support async targets in inf_ptrace_target::wait.
  fbsd-nat: Implement async target support.
  fbsd-nat: Include ptrace operation in error messages.
  fbsd-nat: Switch fbsd_nat_target::resume entry debug message from lwp
    to nat.
  fbsd-nat: Return NULL rather than failing thread_alive.
  Enable async mode in the target in attach_cmd.
  inf-ptrace: Add an event_pipe to be used for async mode in subclasses.

 gdb/fbsd-nat.c                | 151 +++++++++++++++++++++++++-----
 gdb/fbsd-nat.h                |   6 ++
 gdb/inf-ptrace.c              |  51 +++++++++--
 gdb/inf-ptrace.h              |  24 +++++
 gdb/infcmd.c                  |   4 +
 gdb/infrun.c                  |   2 +-
 gdb/linux-nat.c               | 167 +++++++---------------------------
 gdb/linux-nat.h               |   4 -
 gdb/remote.c                  |   1 -
 gdbserver/ChangeLog-2002-2021 |   8 ++
 gdbserver/linux-low.cc        |  43 +++------
 gdbsupport/Makefile.am        |   5 +
 gdbsupport/Makefile.in        |   9 +-
 gdbsupport/configure          |  15 +++
 gdbsupport/configure.ac       |   3 +
 gdbsupport/event-pipe.cc      | 100 ++++++++++++++++++++
 gdbsupport/event-pipe.h       |  56 ++++++++++++
 17 files changed, 442 insertions(+), 207 deletions(-)
 create mode 100644 gdbsupport/event-pipe.cc
 create mode 100644 gdbsupport/event-pipe.h

-- 
2.31.1


             reply	other threads:[~2021-08-03 18:50 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03 18:49 John Baldwin [this message]
2021-08-03 18:49 ` [PATCH v2 01/13] gdbsupport: Add an event-pipe class John Baldwin
2021-10-11 21:39   ` Lancelot SIX
2021-11-24 13:04   ` Andrew Burgess
2021-08-03 18:49 ` [PATCH v2 02/13] gdb linux-nat: Convert linux_nat_event_pipe to the event_pipe class John Baldwin
2021-11-24 13:07   ` Andrew Burgess
2021-08-03 18:49 ` [PATCH v2 03/13] gdbserver linux-low: Convert linux_event_pipe " John Baldwin
2021-11-24 13:10   ` Andrew Burgess
2021-08-03 18:49 ` [PATCH v2 04/13] linux-nat: Don't enable async mode at the end of linux_nat_target::resume John Baldwin
2021-11-24 13:24   ` Andrew Burgess
2021-11-24 16:03     ` John Baldwin
2021-12-01 12:02       ` Andrew Burgess
2021-12-01 20:03         ` John Baldwin
2021-12-02 11:19           ` Andrew Burgess
2021-12-03  1:21             ` John Baldwin
2021-12-03 10:43               ` Andrew Burgess
2021-12-07 18:47               ` Tom Tromey
2021-08-03 18:49 ` [PATCH v2 05/13] do_target_wait_1: Clear TARGET_WNOHANG if the target isn't async John Baldwin
2021-11-24 13:26   ` Andrew Burgess
2021-08-03 18:49 ` [PATCH v2 06/13] inf-ptrace: Raise an internal_error if waitpid() fails John Baldwin
2021-11-24 14:16   ` Andrew Burgess
2021-11-24 20:16     ` Simon Marchi
2021-11-24 22:00       ` John Baldwin
2021-11-25 10:30         ` Andrew Burgess
2021-11-25 16:38           ` John Baldwin
2021-12-01 12:04             ` Andrew Burgess
2021-12-03 18:12               ` John Baldwin
2021-12-06 15:04                 ` Andrew Burgess
2021-08-03 18:49 ` [PATCH v2 07/13] inf-ptrace: Support async targets in inf_ptrace_target::wait John Baldwin
2021-11-24 14:31   ` Andrew Burgess
2021-11-24 16:05     ` John Baldwin
2021-08-03 18:49 ` [PATCH v2 08/13] fbsd-nat: Implement async target support John Baldwin
2021-11-24 15:00   ` Andrew Burgess
2021-11-24 22:17     ` John Baldwin
2021-08-03 18:49 ` [PATCH v2 09/13] fbsd-nat: Include ptrace operation in error messages John Baldwin
2021-11-24 15:02   ` Andrew Burgess
2021-08-03 18:49 ` [PATCH v2 10/13] fbsd-nat: Switch fbsd_nat_target::resume entry debug message from lwp to nat John Baldwin
2021-11-24 15:05   ` Andrew Burgess
2021-11-24 22:19     ` John Baldwin
2021-08-03 18:49 ` [PATCH v2 11/13] fbsd-nat: Return NULL rather than failing thread_alive John Baldwin
2021-11-24 15:12   ` Andrew Burgess
2021-11-24 21:29     ` John Baldwin
2021-12-01 12:15       ` Andrew Burgess
2021-08-03 18:49 ` [PATCH v2 12/13] Enable async mode in the target in attach_cmd John Baldwin
2021-11-24 15:16   ` Andrew Burgess
2021-11-24 22:42     ` John Baldwin
2021-12-01 12:21       ` Andrew Burgess
2021-08-03 18:50 ` [PATCH v2 13/13] inf-ptrace: Add an event_pipe to be used for async mode in subclasses John Baldwin
2021-11-24 15:30   ` Andrew Burgess
2021-11-25  0:14     ` John Baldwin
2021-11-25  0:31       ` John Baldwin
2021-10-06 15:43 ` [PING] [PATCH v2 00/13] FreeBSD target async mode and related refactoring John Baldwin

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=20210803185000.22171-1-jhb@FreeBSD.org \
    --to=jhb@freebsd.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).