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.133.124]) by sourceware.org (Postfix) with ESMTPS id CD1133858D32 for ; Sat, 11 Feb 2023 17:41:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CD1133858D32 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=1676137316; 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=fES04RKhMf4T70BsfOheMLd0ELb4H7yl7LvH9ctHeuI=; b=GUXWskm4KlHYSQntHqSU4z3rkh2ngJxxuQL68nZEhwjvKtXU6VOvCb7e3iGpQWXY2Je2sa st9NBjWg5pZWXMbbpFKJK6HRPpdJJYt9afq+pDCGpFhbnbllUpzf+s09QMzxB8KXVKT4Ze OWgzDgUX9cT+EfICp84LzttmGG7IiIo= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-8--xoUFy5ONYKN4aquxEGdag-1; Sat, 11 Feb 2023 12:41:55 -0500 X-MC-Unique: -xoUFy5ONYKN4aquxEGdag-1 Received: by mail-qk1-f200.google.com with SMTP id x7-20020a05620a098700b007242aa494ddso5244327qkx.19 for ; Sat, 11 Feb 2023 09:41:55 -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=fES04RKhMf4T70BsfOheMLd0ELb4H7yl7LvH9ctHeuI=; b=R49cVKVzl6MvnGdbh8h1/TBr89nXPHpSjBBxyHm1qrdmOwrwED9ObXlqKsp2BnC7Nx NQzDOjSsKGiXyMVl/HVqkzHe54j1up32UMZiXMMBnDjN9YCiFfCSTXqUcO6pykwm7aIl 6NIOs/Wj9EcK4t2FYi79Bai8Ix/3ORt7zS13J+t/aEzVMgYDMe2YhsUgvVeb+y81gey/ z6BSQ1pITcdAmexPWD+tKLekEae73D/9f174yZIj5q9P3kcMW3eLGp26OEKskmiI3ErS G6iDXFKlNaio9dGhAoL6UFrUAuj64MJiAT3tY16L3t0e3jA3FJqaj5+u5RlNOvS6o/+u ZfLg== X-Gm-Message-State: AO0yUKVHn1tKQSHGec8va1Nf8zGN2RrCH5MohAuid+y/sKT2kdVhHBnR ClMIVUuF2Dn+PBy874cH+cg4N+F+oZ3A30fNNrXdAEZ9x5U3N+W7q6FALSL70FuAzfzwZkisMGY TEfGOsLxPoklKMpMcHOG3i8ppkBk= X-Received: by 2002:a05:622a:44:b0:3b8:6043:daf8 with SMTP id y4-20020a05622a004400b003b86043daf8mr35115387qtw.47.1676137314669; Sat, 11 Feb 2023 09:41:54 -0800 (PST) X-Google-Smtp-Source: AK7set/9JeU4aK1IFnyiNgj/LG1nwHouUGrGo8SOojihrohjeZaxph3mpRzD+f+nxTEzPds42c9c+A== X-Received: by 2002:a05:622a:44:b0:3b8:6043:daf8 with SMTP id y4-20020a05622a004400b003b86043daf8mr35115369qtw.47.1676137314456; Sat, 11 Feb 2023 09:41:54 -0800 (PST) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id c193-20020ae9edca000000b007389403f7e6sm6152148qkg.9.2023.02.11.09.41.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Feb 2023 09:41:54 -0800 (PST) From: Andrew Burgess To: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [PATCH 1/3] gdb: don't print global thread-id to CLI in describe_other_breakpoints In-Reply-To: <3696851d-d3a2-e18a-6108-0a945f6a56ae@palves.net> References: <3696851d-d3a2-e18a-6108-0a945f6a56ae@palves.net> Date: Sat, 11 Feb 2023 17:41:52 +0000 Message-ID: <87edqwumjj.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-08 3:23 p.m., Andrew Burgess via Gdb-patches wrote: >> I noticed that describe_other_breakpoints was printing the global >> thread-id to the CLI. For CLI output we should be printing the >> inferior local thread-id (e.g. "2.1"). This can be seen in the >> following GDB session: >> >> (gdb) info threads >> Id Target Id Frame >> 1.1 Thread 4065742.4065742 "bp-thread-speci" main () at /tmp/bp-thread-specific.c:27 >> * 2.1 Thread 4065743.4065743 "bp-thread-speci" main () at /tmp/bp-thread-specific.c:27 >> (gdb) break foo thread 2.1 >> Breakpoint 3 at 0x40110a: foo. (2 locations) >> (gdb) break foo thread 1.1 >> Note: breakpoint 3 (thread 2) also set at pc 0x40110a. >> Note: breakpoint 3 (thread 2) also set at pc 0x40110a. >> Breakpoint 4 at 0x40110a: foo. (2 locations) >> >> Notice that GDB says: >> >> Note: breakpoint 3 (thread 2) also set at pc 0x40110a. >> >> The 'thread 2' in here is using the global thread-id, we should >> instead say 'thread 2.1' which corresponds to how the user specified >> the breakpoint. >> >> This commit fixes this issue and adds a test. > > Approved-By: Pedro Alves Pushed. Thanks, Andrew