From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH v3 0/7] Fix handling of pending fork events
Date: Wed, 1 Dec 2021 09:44:53 -0500 [thread overview]
Message-ID: <20211201144500.627736-1-simon.marchi@polymtl.ca> (raw)
From: Simon Marchi <simon.marchi@efficios.com>
This is v3 of:
https://sourceware.org/pipermail/gdb-patches/2021-November/183797.html
The series grew a little bit:
- gdbserver: hide fork child threads from GDB
Don't move the fork_relative field to thread_info, add a new target
method instead.
- gdb/linux-nat: factor ptrace-detach code to new detach_one_pid function
No changes.
- gdbserver: suppress "Detaching from process" message
New, makes testing in last patch easier. Potentially controversial.
- gdb/remote.c: move some things up
New, trivial changes.
- gdb/remote.c: refactor pending fork status functions
New, small refactor to clean things up.
- gdb: move clearing of tp->pending_follow to follow_fork_inferior
New, fix necessary for last patch.
- gdb, gdbserver: detach fork child when detaching from fork parent
Handle detaching after a "catch fork" stop. Handle fork statuses in
pending stop replies in the remote target, add new test for this.
Simon Marchi (7):
gdbserver: hide fork child threads from GDB
gdb/linux-nat: factor ptrace-detach code to new detach_one_pid
function
gdbserver: suppress "Detaching from process" message
gdb/remote.c: move some things up
gdb/remote.c: refactor pending fork status functions
gdb: move clearing of tp->pending_follow to follow_fork_inferior
gdb, gdbserver: detach fork child when detaching from fork parent
gdb/infrun.c | 28 ++-
gdb/linux-nat.c | 129 +++++++---
gdb/remote.c | 232 ++++++++++--------
.../pending-fork-event-detach-ns.c | 98 ++++++++
.../pending-fork-event-detach-ns.exp | 67 +++++
.../pending-fork-event-detach-touch-file.c | 26 ++
.../gdb.threads/pending-fork-event-detach.c | 86 +++++++
.../gdb.threads/pending-fork-event-detach.exp | 127 ++++++++++
gdb/testsuite/lib/gdb.exp | 21 ++
gdbserver/linux-low.cc | 22 ++
gdbserver/linux-low.h | 56 +++++
gdbserver/server.cc | 36 ++-
gdbserver/target.cc | 12 +
gdbserver/target.h | 20 ++
14 files changed, 806 insertions(+), 154 deletions(-)
create mode 100644 gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.c
create mode 100644 gdb/testsuite/gdb.threads/pending-fork-event-detach-ns.exp
create mode 100644 gdb/testsuite/gdb.threads/pending-fork-event-detach-touch-file.c
create mode 100644 gdb/testsuite/gdb.threads/pending-fork-event-detach.c
create mode 100644 gdb/testsuite/gdb.threads/pending-fork-event-detach.exp
--
2.33.1
next reply other threads:[~2021-12-01 14:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-01 14:44 Simon Marchi [this message]
2021-12-01 14:44 ` [PATCH v3 1/7] gdbserver: hide fork child threads from GDB Simon Marchi
2021-12-03 23:30 ` Pedro Alves
2021-12-01 14:44 ` [PATCH v3 2/7] gdb/linux-nat: factor ptrace-detach code to new detach_one_pid function Simon Marchi
2021-12-03 23:30 ` Pedro Alves
2021-12-01 14:44 ` [PATCH v3 3/7] gdbserver: suppress "Detaching from process" message Simon Marchi
2021-12-03 23:42 ` Pedro Alves
2021-12-04 2:57 ` Simon Marchi
2021-12-01 14:44 ` [PATCH v3 4/7] gdb/remote.c: move some things up Simon Marchi
2021-12-03 23:42 ` Pedro Alves
2021-12-01 14:44 ` [PATCH v3 5/7] gdb/remote.c: refactor pending fork status functions Simon Marchi
2021-12-03 23:43 ` Pedro Alves
2021-12-04 3:03 ` Simon Marchi
2021-12-01 14:44 ` [PATCH v3 6/7] gdb: move clearing of tp->pending_follow to follow_fork_inferior Simon Marchi
2021-12-03 23:43 ` Pedro Alves
2021-12-01 14:45 ` [PATCH v3 7/7] gdb, gdbserver: detach fork child when detaching from fork parent Simon Marchi
2021-12-03 23:44 ` Pedro Alves
2021-12-04 3:36 ` Simon Marchi
2021-12-07 23:25 ` Pedro Alves
2021-12-08 19:54 ` Simon Marchi
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=20211201144500.627736-1-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
/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).