From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id dbBkCaLjGWqDiycAWB0awg (envelope-from ) for ; Fri, 29 May 2026 15:06:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1780081570; bh=vulXP74rdFZwcnapedUkApauqic+b0EJ0OHmYFwXwz8=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=bePlJr6EuDWQuLMawfZtCKwTXZOpzf+1zNy7Rp4fz6RzcOjBhtM1Xgsio6YjpXaoE ybbf0/NsBk3p4Ca7sdg3gs+OoxB2Q3fhD/0eQiGvzC4FJy2zBPGZTS0HK0/PSqGi06 flxMviiMtmzXityp3kvJ76zFIrhAMCcglw3lXcio= Received: by simark.ca (Postfix, from userid 112) id 14DC21E024; Fri, 29 May 2026 15:06:10 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED,WEIRD_PORT autolearn=ham autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=ZBHHdk1k; dkim-atps=neutral Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 429731E024 for ; Fri, 29 May 2026 15:06:09 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5A3EC4BA798E for ; Fri, 29 May 2026 19:06:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5A3EC4BA798E Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=ZBHHdk1k Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id A3DA24BA23ED for ; Fri, 29 May 2026 19:05:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A3DA24BA23ED Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A3DA24BA23ED Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780081542; cv=none; b=BMqdhkvcWJIAIvWT5GxjWmZla4CiHGF4/t/2msbgS45lXtsxoyeZi3XEC/o0YsONbQiFHfYo9sNVMb9oAD1UQoNyF685UxLRYaKC6FsbgVHoawIlEUw+gHqf48EI+Ju46rYThWl4H5U2Ag6sLjENwmmKR9Qnb0h3Tuu4lSPUWXk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1780081542; c=relaxed/simple; bh=vulXP74rdFZwcnapedUkApauqic+b0EJ0OHmYFwXwz8=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=oWBu5D4QPPMLonmCdH+cUawmL+u0+xW8xSKxMuFWAp1o3rAnXlF+KnQ9KaGTQyWHTQ7iZ4/JYxwmIje6xenqeZxaQeKkxiRZ3Lqm4iXiOQWevQvcBjTt2s8XOoiqjDxUSTV7vrzYQmh3UtfvzTsGf9VA+gAvcPDvTUOwe4HfPsk= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=ZBHHdk1k DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3DA24BA23ED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1780081541; bh=vulXP74rdFZwcnapedUkApauqic+b0EJ0OHmYFwXwz8=; h=Date:Subject:To:References:From:In-Reply-To:From; b=ZBHHdk1kmv5qNnmgmgEsG9uaGOpzxjcSEYbw/ROvdNgxpXU0dwT3iE5jasW5FOe+X t/vuMPp/n8T3fdLul1xsar0ek8QVPW8mwIO34rkhD1ahxX3R6JJoWu2gJw4oZ5rjSI eXJlN+votougbWeA6KuDd+0dP1GHvO2T6ze5sWZ8= Received: by simark.ca (Postfix) id 96B601E024; Fri, 29 May 2026 15:05:40 -0400 (EDT) Message-ID: Date: Fri, 29 May 2026 15:05:40 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC] Show the selected frame in "bt" To: Tom Tromey , gdb-patches@sourceware.org References: <20260529184503.3263361-1-tom@tromey.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20260529184503.3263361-1-tom@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 5/29/26 2:45 PM, Tom Tromey wrote: > I've occasionally wished that "bt" would indicate the selected frame. > This patch implements this idea. In particular it marks the selected > frame with "*", similar to other "selected" output in gdb. (See that > other series where emoji were allowed in the "current" column of a > table; if that is ever resurrected, I'd expect the same treatment to > be applied here.) > > Now the output looks like: > > (gdb) bt > #0 0x00007ffff6e381fd in poll () from /lib64/libc.so.6 > #1 0x000000000100b1ee in gdb_wait_for_event (block=1) at ../../binutils-gdb/gdbsupport/event-loop.cc:587 > #2 0x000000000100a77f in gdb_do_one_event (mstimeout=-1) at ../../binutils-gdb/gdbsupport/event-loop.cc:263 > * #3 0x00000000007d2c6a in interp::do_one_event (this=, mstimeout=-1) at ../../binutils-gdb/gdb/interps.h:90 > #4 start_event_loop () at ../../binutils-gdb/gdb/main.c:400 > #5 captured_command_loop () at ../../binutils-gdb/gdb/main.c:465 > #6 0x00000000007d5715 in captured_main (context=context@entry=0x7fffffffdd10) at ../../binutils-gdb/gdb/main.c:1373 > #7 gdb_main (args=args@entry=0x7fffffffdd50) at ../../binutils-gdb/gdb/main.c:1392 > #8 0x0000000000452cd5 in main (argc=1, argv=0x7fffffffdea8) at ../../binutils-gdb/gdb/gdb.c:38 > > I think the main downside of this patch is that it uses a little more > horizontal space for the indicator. I like it, it fits well in the "show user what is selected" paradigm. If we're talking about bt formatting and horizontal space, we could consider not showing addresses by default, I bet that most users don't care. I find it ugly that by default the address is shown for some frames but not all, it makes things unaligned (you can force GDB to show addresses with `-frame-info location-and-address` though). I don't know if there is currently a setting to make GDB show the function name but not the address. Simon