From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 3ECFC385782D for ; Wed, 24 Nov 2021 20:56:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3ECFC385782D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [172.16.0.95] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id E6DAA1E940; Wed, 24 Nov 2021 15:56:39 -0500 (EST) Subject: Re: [PATCH 0/3] Fix handling of pending fork events To: Simon Marchi , gdb-patches@sourceware.org References: <20211029203332.69894-1-simon.marchi@polymtl.ca> <20211124200444.614978-1-simon.marchi@efficios.com> From: Simon Marchi Message-ID: Date: Wed, 24 Nov 2021 15:56:39 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211124200444.614978-1-simon.marchi@efficios.com> Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2021 20:56:42 -0000 Aaaaaand I forgot to use v2 in the subject :(. On 2021-11-24 3:04 p.m., Simon Marchi via Gdb-patches wrote: > 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 >