From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by sourceware.org (Postfix) with ESMTPS id 1AC523858438 for ; Mon, 27 Feb 2023 19:12:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1AC523858438 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-f43.google.com with SMTP id h14so7351490wru.4 for ; Mon, 27 Feb 2023 11:12:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:references:to:from:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xE86q7jBMejdGByTsqJjoJ4j9zow76pwm0DXCsaJBTo=; b=vpFgN+AJ5hFGREGi4rPX8ZZ8Nek6g7km95VeaK/95LZxgVrJUkg/KvDcFGhZQh0iDe 8sUYZnz627YL1NlW8lzS6LKoe+QMBIfUm/NrGYF8ruHEPAnUREnyV4+deVj50QxcNJHC uvguITyLFc4uS1Mwb7zUhB3QxZHQ1I9Kw0HKlVxP5KVyzH616vSegdrP7wYC0qign7V7 tHNYqJExiY/+kJjl5QByRdNSt4V6x0PV7f7MPJkC/tcz0IQsh/rAYoIiWqH8/rWJCBrk qVsmHn/nGPpY753UINtTu48/QkEbrsKocOfVNHjhnQmHsO5a62BCdSQWy3S9tRt10UG0 PETQ== X-Gm-Message-State: AO0yUKUtKhqBwOsdMMbBWtncOx3yJoBd4Dw2NJ4NYQD2z4q/5TiZZ0Og SFIP69M6Sl7qIFXfK/Temk7ZcPKuZXpyeg== X-Google-Smtp-Source: AK7set/0T4FX/m7N9+z8/33hFh16Kg2Spuh1mFXxlenDQytzurhOxerBA5stR4lCdbm5GqtuWgNTYg== X-Received: by 2002:a05:6000:1c1e:b0:2c5:642f:1550 with SMTP id ba30-20020a0560001c1e00b002c5642f1550mr7288696wrb.15.1677525122673; Mon, 27 Feb 2023 11:12:02 -0800 (PST) Received: from ?IPv6:2001:8a0:f92b:9e00::1fe? ([2001:8a0:f92b:9e00::1fe]) by smtp.gmail.com with ESMTPSA id q8-20020a1cf308000000b003e11ad0750csm10344594wmq.47.2023.02.27.11.12.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Feb 2023 11:12:02 -0800 (PST) Subject: Re: [PATCH 0/6] Eliminate infrun_thread_thread_exit observer From: Pedro Alves To: gdb-patches@sourceware.org References: <20221203211338.2264994-1-pedro@palves.net> Message-ID: <0dbad955-f78b-7290-cc8c-4fe178e6d4df@palves.net> Date: Mon, 27 Feb 2023 19:12:03 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20221203211338.2264994-1-pedro@palves.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 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=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi! On 2022-12-03 9:13 p.m., Pedro Alves wrote: > This series started out as me realizing that I had one change in the > pending step-over-thread-exit series that was in conflict with > infrun_thread_thread_exit. infrun_thread_thread_exit wants to clear > the last target waitstatus when that status is for the thread that > exited, while I'll need to preserve the thread exit waitstatus for > normal stop. In the step-over-thread-exit series, I was calling > set_last_target_status again when handling a > TARGET_WAITKING_THREAD_EXIT, and that was undoing the clear that > infrun_thread_thread_exit does. > > So I looked at eliminating infrun_thread_thread_exit, see if we could > make whatever is relying on it no longer rely on it. > > The end result is this thread. It ends up fixing some bugs and > improving GDB behavior such that I think it stands on its own, even > without the last patch, the one that finally eliminates > infrun_thread_thread_exit. I kept the thread title about > infrun_thread_thread_exit because that's my end goal, but I could as > well remove the last patch and call this thread "improve 'info > program' and 'follow-fork'". > > Tested on x86-64 GNU/Linux, native and extended-gdbserver. > > Pedro Alves (6): > Tweak "Using the running image of ..." output > Convert previous_inferior_ptid to strong reference to thread_info > Improve "info program" > Make follow_fork not rely on get_last_target_status > all-stop "follow-fork parent" and selecting another thread > Remove infrun_thread_thread_exit observer FYI, I'm putting this in.