From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH 0/3] Fix handling of pending fork events
Date: Wed, 24 Nov 2021 15:04:41 -0500 [thread overview]
Message-ID: <20211124200444.614978-1-simon.marchi@efficios.com> (raw)
In-Reply-To: <20211029203332.69894-1-simon.marchi@polymtl.ca>
This is v2 of:
https://sourceware.org/pipermail/gdb-patches/2021-October/182922.html
Patch 2/3 is new, it factors out some code in the function, to keep the
following patch simple.
Changes in patch 3/3 (patch 2/2 in v1) are:
- The test did fail on some machines (not my development machine
apparently). It is because I only handled pending statuses in
lwp_info::status, in the linux-nat target. There may also be some
pending statuses in lwp_info::waitstatus, handle them too.
- Rather than adding a target method to allow the core to detach
pending fork children, make the targets (linux-nat and remote) peek
in thread_info::pending_waitstatus to see if there is one there.
Simon Marchi (3):
gdbserver: hide fork child threads from GDB
gdb/linux-nat: factor ptrace-detach code to new detach_one_pid
function
gdb, gdbserver: detach fork child when detaching from fork parent
gdb/linux-nat.c | 124 ++++++++++-----
gdb/remote.c | 14 ++
.../pending-fork-event-touch-file.c | 26 +++
.../gdb.threads/pending-fork-event.c | 82 ++++++++++
.../gdb.threads/pending-fork-event.exp | 150 ++++++++++++++++++
gdbserver/gdbthread.h | 9 ++
gdbserver/linux-low.cc | 36 +++--
gdbserver/linux-low.h | 6 -
gdbserver/server.cc | 35 ++++
9 files changed, 422 insertions(+), 60 deletions(-)
create mode 100644 gdb/testsuite/gdb.threads/pending-fork-event-touch-file.c
create mode 100644 gdb/testsuite/gdb.threads/pending-fork-event.c
create mode 100644 gdb/testsuite/gdb.threads/pending-fork-event.exp
--
2.26.2
next prev parent reply other threads:[~2021-11-24 20:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-29 20:33 [PATCH 1/2] gdbserver: hide fork child threads from GDB Simon Marchi
2021-10-29 20:33 ` [PATCH 2/2] gdb, gdbserver: detach fork child when detaching from fork parent Simon Marchi
2021-11-12 20:54 ` [PATCH 1/2] gdbserver: hide fork child threads from GDB (ping) Simon Marchi
2021-11-24 20:04 ` Simon Marchi [this message]
2021-11-24 20:04 ` [PATCH 1/3] gdbserver: hide fork child threads from GDB Simon Marchi
2021-11-26 22:51 ` Pedro Alves
2021-11-29 12:46 ` Simon Marchi
2021-11-29 15:37 ` Pedro Alves
2021-11-24 20:04 ` [PATCH 2/3] gdb/linux-nat: factor ptrace-detach code to new detach_one_pid function Simon Marchi
2021-11-26 22:51 ` Pedro Alves
2021-11-24 20:04 ` [PATCH 3/3] gdb, gdbserver: detach fork child when detaching from fork parent Simon Marchi
2021-11-26 22:54 ` Pedro Alves
2021-11-29 18:27 ` Simon Marchi
2021-11-24 20:56 ` [PATCH 0/3] Fix handling of pending fork events Simon Marchi
2021-11-26 22:50 ` 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=20211124200444.614978-1-simon.marchi@efficios.com \
--to=simon.marchi@efficios.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).