From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Show the selected frame in "bt"
Date: Tue, 21 Jul 2026 16:55:46 +0200 [thread overview]
Message-ID: <f5cca46a5a2f5436ac1614dc453b6d840aad47d5.camel@skynet.be> (raw)
In-Reply-To: <20260705122609.145493-1-tom@tromey.com>
On Sun, 2026-07-05 at 06:26 -0600, 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=<optimized out>, 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.
Maybe you could instead replace the # by a * for the selected frame so as to have:
(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=<optimized out>, 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
Philippe
next prev parent reply other threads:[~2026-07-21 14:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-05 12:26 Tom Tromey
2026-07-05 13:06 ` Eli Zaretskii
2026-07-21 14:55 ` Philippe Waroquiers [this message]
2026-07-21 17:50 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f5cca46a5a2f5436ac1614dc453b6d840aad47d5.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox