From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 8177A3858D33 for ; Tue, 7 Feb 2023 14:42:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8177A3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675780971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fYoUwuSaO9405YJetDs1iSrUK5p9/ohkA5SR+HUQKxs=; b=gDuMr+mWHYK401WoHPPcj3O7SVZ3YlF1mzV1YQIk0yvvryfA+7R2YHOWC7gZGRvaSb9jus yV9VxRosZyPhMOhFhFKomDoJzKGWzRd+NvGJ7QK8Vbh6L+1Emqz7Q3YoSLHz4sqvUJM7aK NxGV3OLXw2dCCjQGzBEKyzuORH/OZKs= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-501-TZ0uOPCyOpOHeilV37eJlw-1; Tue, 07 Feb 2023 09:42:49 -0500 X-MC-Unique: TZ0uOPCyOpOHeilV37eJlw-1 Received: by mail-qt1-f198.google.com with SMTP id f22-20020a05622a1a1600b003b8674f2302so8639306qtb.7 for ; Tue, 07 Feb 2023 06:42:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fYoUwuSaO9405YJetDs1iSrUK5p9/ohkA5SR+HUQKxs=; b=xbRPUZqtg7a0BhhmDYz6NdKfhdmi32X/HDVumh1TafTFjXOXcyB93vNSyOyOObfcDH pddju3xz3JQeoovSFHAzUZ0mGL0NQQXfjXw08PC7K0cOEKLXjzsXHJFEKnGD3oyKaXjc 9B8ndtw5RShxM+c4Zu5qmLHSR8bRwTGZphsNihbv7i+ITA0WiiR7MJbSLz/bIlr576gw 7hQloKV+XBU1LIusFwfOO4yECSCSO6Zm9JsLOJO8ZKCZvlcpiUV4GeP9bCvUF0eH/fNr QiFUNOF0KL7qUqwurhkvlemRdf62x4KeyWymB4gydOk8rA2DaJvizvDwvbwHa3N44IJc yEUA== X-Gm-Message-State: AO0yUKWsN72epRHfTByPKm/1yjIF1HkXCAIKTjKC2QUtG6xkMmISfi7H MaimjFTbGw2emFwsQCzOHoKLVURhMC5TJO2IA/UvgDrSLT8N5J9IwnvhBostmwPwIb10IVIpbrZ vk5vcO8hkpyWyMdVdClBUO99pXak= X-Received: by 2002:ac8:7f01:0:b0:3b8:5057:377b with SMTP id f1-20020ac87f01000000b003b85057377bmr5967561qtk.65.1675780968960; Tue, 07 Feb 2023 06:42:48 -0800 (PST) X-Google-Smtp-Source: AK7set9PZV/BvYCputs0nHTQcC/rPDtbZer4R1PCGZABIxyq08gjSSjfpthdphFAU+YQN90IVi24uQ== X-Received: by 2002:ac8:7f01:0:b0:3b8:5057:377b with SMTP id f1-20020ac87f01000000b003b85057377bmr5967532qtk.65.1675780968707; Tue, 07 Feb 2023 06:42:48 -0800 (PST) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id s26-20020a05622a1a9a00b003b62e8b77e7sm9566381qtc.68.2023.02.07.06.42.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 06:42:48 -0800 (PST) From: Andrew Burgess To: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [PATCHv2 3/6] gdb: fix display of thread condition for multi-location breakpoints In-Reply-To: <5bfb8ed2-1fcd-f5eb-26a1-a90780ed9143@palves.net> References: <403eeb015d985423d995b34a345e4e7816b8c349.1674207665.git.aburgess@redhat.com> <87h6vyx31v.fsf@redhat.com> <5bfb8ed2-1fcd-f5eb-26a1-a90780ed9143@palves.net> Date: Tue, 07 Feb 2023 14:42:46 +0000 Message-ID: <871qn1wn89.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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: Pedro Alves writes: > 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 I pushed this. Thanks, Andrew