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 D298F3858D1E for ; Mon, 6 Feb 2023 17:02:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D298F3858D1E 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 k13so3623087wrh.8 for ; Mon, 06 Feb 2023 09:02:02 -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:from:references:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=v50kRQUD8Qe3jtIgRNlRQnKkAHnTrAFSLYNwfhjNWRU=; b=XHbig7pRn+XMXhoz99989jlxKg08W5VCVOYO59kyowDVZZhzem3IEdP3OeCV/pk55x VVPXDSDFo6F2Y/MdDcNp5o5Ok+eUhudaRq5/Lv2nEd93fvMb2w16L2j6fsqCDP4XqkjV X7L4m98W+6MUIusly815+Zaap3k6mn06e2Gdf+sIvEE+SfAaXbifqbNnjW+MVi/06nI7 32MU1UHjsZiAeuDD3SulRqT3hZ8V/qmPXsZvEE1C5G+SFWexA2fNRepeJYG13KPNC2V3 rx8Fhpn9aC/a1UOZX3C7SyzS5In2Tj2AyW93YUcb7JvHFPmkUT2WK3kmqhNlQkWeKuJf A0GQ== X-Gm-Message-State: AO0yUKUTSwnFjiAtN+PC1Zr0YVJ9KHgR/JRGSjxk2lCnErFfiuIsoQxo vzY3hEKMGkQ02zKSm4ZxvTcAhXyGOoqx9A== X-Google-Smtp-Source: AK7set+ManHoPrMdSGNhw8G4qc5v8VIxYm1PjWxZApCw0DPl/XtsWTRkyY7y2q7eAPlIa6pwVNgzBQ== X-Received: by 2002:a5d:6386:0:b0:2c3:e045:2738 with SMTP id p6-20020a5d6386000000b002c3e0452738mr274253wru.28.1675702921381; Mon, 06 Feb 2023 09:02:01 -0800 (PST) Received: from ?IPv6:2001:8a0:f92b:9e00::1fe? ([2001:8a0:f92b:9e00::1fe]) by smtp.gmail.com with ESMTPSA id o21-20020a5d58d5000000b002c3f0a78e39sm618940wrf.9.2023.02.06.09.02.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Feb 2023 09:02:00 -0800 (PST) Subject: Re: [PATCHv2 3/6] gdb: fix display of thread condition for multi-location breakpoints To: Andrew Burgess , gdb-patches@sourceware.org References: <403eeb015d985423d995b34a345e4e7816b8c349.1674207665.git.aburgess@redhat.com> <87h6vyx31v.fsf@redhat.com> From: Pedro Alves Message-ID: <5bfb8ed2-1fcd-f5eb-26a1-a90780ed9143@palves.net> Date: Mon, 6 Feb 2023 17:01:58 +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: <87h6vyx31v.fsf@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.7 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-02-06 2:48 p.m., Andrew Burgess wrote: > Pedro Alves writes: > >> (gdb) info breakpoints >> Num Type Disp Enb Address What >> 2 breakpoint keep y foo thread 1 >> stop only in thread 1 >> 2.1 y 0x0000000000401114 in foo at /tmp/src/gdb/testsuite/gdb.base/thread-bp-multi-loc.c:25 >> 2.2 y 0x0000000000401146 in foo at /tmp/src/gdb/testsuite/gdb.base/thread-bp-multi-loc.c:25 >> 2.3 y 0x0000000000401168 in foo at /tmp/src/gdb/testsuite/gdb.base/thread-bp-multi-loc.c:25 >> 3 breakpoint keep y bar thread 1 >> stop only in thread 1 >> 3.1 breakpoint keep y 0x000000000040110a in bar at /tmp/src/gdb/testsuite/gdb.base/thread-bp-multi-loc.c:32 >> >> ... for instance. Or not include the "thread 1". But my point is that if we were to show it, that's where we would >> show it, not in the breapoint locations. > > I dug out your multi-location proposal, and it looks good. It's a shame > it got bogged down as it did.... Thanks. I still hope to get back to it at some point, but probably only after I manage to be done with the step over thread clone/exit series, and the big ctrl-c rework. >> To fix that, we should merge those three gdb_asserts into a single gdb_assert, >> and we should $gdb_test_name for its test name, along with passing a meaningful >> test name to gdb_test_multiple, so internal FAILs get that meaningful name >> as well. If we want to show the individual conditions, that can >> still be done by outputting them to the log. > > Done. Thank you. > > I agree that, if/when your multi-location work is merged we might want > to once again adjust how this information is displayed, inline with your > suggestion above. > > However... how would you feel if this patch (as shown below) was merged > now? I think this fixes the stray "thread 1" text immediately, and the > multi-location display patch should be easily updated on top of this, if > that was something that you plan to continue developing? Oh yes, I totally agree with merging your patch. I only referenced the multi-locations proposal to help with justifying why I think your patch is good. I did not mean to suggest that getting my proposal in would remove the need for your patch. In sum, in my view, code locations are not thread specific, so the "thread N" part should not be displayed as if part of the location. Approved-By: Pedro Alves Pedro Alves