[PATCH v2 00/13] FreeBSD target async mode and related refactoring
John Baldwin
jhb@FreeBSD.org
Tue Aug 3 18:49:47 GMT 2021
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
More information about the Gdb-patches
mailing list