From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by sourceware.org (Postfix) with ESMTPS id 4822B3858D39 for ; Fri, 26 Nov 2021 22:50:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4822B3858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f45.google.com with SMTP id s13so21632601wrb.3 for ; Fri, 26 Nov 2021 14:50:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=NnY2HcbXuSzzt3MyAniGBhC/H5MM+Lxo2e4EldlSVv4=; b=kguj4miMj8pDQt1zwrDZkzbgNXj1HZXCkyXZ2R9/BAVmdezKxhThV0NcVgn4vXrs6h J6aB0+P6ClfiVfmSNU569o0kK8L48cPxe2LLjlOasYgAHa8ItQ/TBphoMTxS7tbsY+oF eF1s7dofozOjlyb0nCpIq4dAVMTEX057uHFI8mJ/W8JnWs3VOXB6nycOaYM/gW1kC/Mt QqvAjRS9wm4NMCZ/gVWjD2CPK0MzL+JHMycTATmsL9xqRUB650/OepKDU2PQIzr0L0ip kAzd2itIz6o9MyByQ15weeR3G2Zh5rXCoHYFkval4RxfyIV4e8ztV1WQqcmqPnFTHksL 8EWg== X-Gm-Message-State: AOAM533Dtp8WGVsudGcai4k7VCVFWTvEyhUPyC7j6UAIhC3bcQyxNZQs wPKC3TJ5i1PPLDa0IRgMlqCWIa3OWjI= X-Google-Smtp-Source: ABdhPJyijqU67MWaMUWg7ECSi1O0f5jueWIETaMrdFK4S7DM6d3tCcCYCFgPaIS0GNeFJu8Wx2rCtw== X-Received: by 2002:adf:fcce:: with SMTP id f14mr17670854wrs.595.1637967023205; Fri, 26 Nov 2021 14:50:23 -0800 (PST) Received: from ?IPV6:2001:8a0:f912:1a00:d3db:ac91:4b9e:1449? ([2001:8a0:f912:1a00:d3db:ac91:4b9e:1449]) by smtp.gmail.com with ESMTPSA id g124sm11934279wme.28.2021.11.26.14.50.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Nov 2021 14:50:22 -0800 (PST) Message-ID: Date: Fri, 26 Nov 2021 22:50:21 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH 0/3] Fix handling of pending fork events Content-Language: en-US To: Simon Marchi , gdb-patches@sourceware.org References: <20211029203332.69894-1-simon.marchi@polymtl.ca> <20211124200444.614978-1-simon.marchi@efficios.com> From: Pedro Alves In-Reply-To: <20211124200444.614978-1-simon.marchi@efficios.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, 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: Fri, 26 Nov 2021 22:50:25 -0000 On 2021-11-24 20:04, 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. Thanks! FTR, I had been discussing v1 with Simon offlist. The change to drop the target method helps with some other work I'm doing that coincidentally ran into the same issues Simon ran into, so I'm basing it on top of this series. Namely, I'm teaching GDB and GDBserver about a new "clone" event, similar to fork and vfork events. This allows fixing displaced stepping over clone syscalls (PR gdb/19675). I've rebased my clone work on top of v2, and it all seems to work fine. I have one point that needs to be discussed though. See replies to patches #1 and #3.