From: Eli Zaretskii <eliz@gnu.org>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Show the selected frame in "bt"
Date: Sun, 05 Jul 2026 16:06:46 +0300 [thread overview]
Message-ID: <86o6gl8u1l.fsf@gnu.org> (raw)
In-Reply-To: <20260705122609.145493-1-tom@tromey.com> (message from Tom Tromey on Sun, 5 Jul 2026 06:26:09 -0600)
> From: Tom Tromey <tom@tromey.com>
> Cc: Tom Tromey <tom@tromey.com>
> Date: Sun, 5 Jul 2026 06:26:09 -0600
>
> 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.
>
> Compared to v1, this version just fixes the test suite. Note that
> there may be other tests that need updating but that I couldn't test.
>
> Regression tested on x86-64 Fedora 40.
> ---
> gdb/NEWS | 3 +
> gdb/doc/gdb.texinfo | 62 ++--
> gdb/extension-priv.h | 3 +-
> gdb/extension.c | 8 +-
> gdb/extension.h | 3 +-
> gdb/frame.h | 3 +-
> gdb/gstack-1.in | 2 +-
> gdb/mi/mi-cmd-stack.c | 8 +-
> gdb/python/py-framefilter.c | 18 +-
> gdb/python/python-internal.h | 3 +-
> gdb/stack.c | 39 ++-
> .../gdb.ada/out_of_line_in_inlined.exp | 6 +-
> gdb/testsuite/gdb.arch/amd64-entry-value.exp | 52 +--
> .../gdb.arch/amd64-invalid-stack-middle.exp | 4 +-
> .../gdb.arch/amd64-invalid-stack-top.exp | 4 +-
> gdb/testsuite/gdb.arch/amd64-tailcall-cxx.exp | 2 +-
> .../gdb.arch/amd64-tailcall-noret.exp | 2 +-
> .../gdb.arch/amd64-tailcall-self.exp | 2 +-
> .../gdb.arch/i386-attach-see-vdso.exp | 2 +-
> gdb/testsuite/gdb.arch/i386-signal.exp | 2 +-
> gdb/testsuite/gdb.base/annota1.exp | 6 +-
> .../gdb.base/backtrace-through-cu-nodebug.exp | 8 +-
> gdb/testsuite/gdb.base/backtrace.exp | 16 +-
> .../gdb.base/bad-frame-selection.exp | 16 +-
> gdb/testsuite/gdb.base/break-interp.exp | 6 +-
> gdb/testsuite/gdb.base/break.exp | 4 +-
> gdb/testsuite/gdb.base/bt-selected-frame.exp | 12 +-
> gdb/testsuite/gdb.base/dfp-test.exp | 6 +-
> gdb/testsuite/gdb.base/frame-args.exp | 2 +-
> gdb/testsuite/gdb.base/frame-selection.exp | 6 +-
> gdb/testsuite/gdb.base/funcargs.exp | 316 +++++++++---------
> gdb/testsuite/gdb.base/gcore.exp | 18 +-
> gdb/testsuite/gdb.base/gdb1250.exp | 4 +-
> gdb/testsuite/gdb.base/gstack.exp | 2 +-
> gdb/testsuite/gdb.base/hbreak2.exp | 6 +-
> .../gdb.base/inline-frame-cycle-unwind.exp | 38 +--
> gdb/testsuite/gdb.base/jit-reader.exp | 16 +-
> gdb/testsuite/gdb.base/large-frame.exp | 6 +-
> gdb/testsuite/gdb.base/pc-not-saved.exp | 6 +-
> gdb/testsuite/gdb.base/readnever.exp | 8 +-
> gdb/testsuite/gdb.base/recpar.exp | 2 +-
> gdb/testsuite/gdb.base/sepdebug.exp | 6 +-
> gdb/testsuite/gdb.base/sigaltstack.exp | 16 +-
> gdb/testsuite/gdb.base/siginfo.exp | 6 +-
> gdb/testsuite/gdb.base/sigstep.exp | 18 +-
> gdb/testsuite/gdb.base/tailcall-msym.exp | 6 +-
> gdb/testsuite/gdb.base/until-in-tailcall.exp | 6 +-
> .../gdb.base/unwind-on-each-insn.exp.tcl | 2 +-
> gdb/testsuite/gdb.btrace/record_goto.exp | 6 +-
> gdb/testsuite/gdb.btrace/tailcall.exp | 6 +-
> gdb/testsuite/gdb.compile/compile-cplus.exp | 2 +-
> gdb/testsuite/gdb.cp/exception.exp | 8 +-
> gdb/testsuite/gdb.cp/expand-sals.exp | 2 +-
> gdb/testsuite/gdb.cp/pass-by-ref-2.exp | 8 +-
> .../gdb.dwarf2/debug-frame-no-cfa.exp | 2 +-
> gdb/testsuite/gdb.dwarf2/debug-frame.exp | 2 +-
> gdb/testsuite/gdb.dwarf2/dw2-entry-points.exp | 12 +-
> gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp | 4 +-
> .../gdb.dwarf2/dw2-inline-many-frames.exp | 24 +-
> gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp | 2 +-
> gdb/testsuite/gdb.dwarf2/dw2-op-out-param.exp | 8 +-
> gdb/testsuite/gdb.dwarf2/dw2-ranges-func.exp | 8 +-
> .../gdb.dwarf2/dw2-reg-undefined.exp | 2 +-
> gdb/testsuite/gdb.dwarf2/dw2-restore.exp | 2 +-
> .../gdb.dwarf2/dw2-wrong-mangled-name.exp | 4 +-
> gdb/testsuite/gdb.fortran/backtrace.exp | 6 +-
> .../gdb.fortran/mixed-lang-stack.exp | 20 +-
> gdb/testsuite/gdb.opt/empty-inline-cxx.exp | 14 +-
> gdb/testsuite/gdb.opt/inline-bt.exp | 6 +-
> .../gdb.python/pretty-print-call-by-hand.exp | 24 +-
> .../py-finish-breakpoint-tailcall.exp | 6 +-
> .../gdb.python/py-framefilter-addr.exp | 16 +-
> .../gdb.python/py-inf-exited-at-exit.exp | 4 +-
> .../gdb.python/py-pending-frame-level.exp | 20 +-
> .../gdb.python/py-recurse-unwind.exp | 8 +-
> gdb/testsuite/gdb.python/py-unwind-inline.exp | 4 +-
> gdb/testsuite/gdb.python/py-unwind-maint.exp | 2 +-
> .../gdb.python/py-unwind-user-regs.exp | 14 +-
> gdb/testsuite/gdb.python/py-unwind.exp | 10 +-
> .../gdb.threads/pthread_cond_wait.exp | 2 +-
> gdb/testsuite/gdb.trace/entry-values.exp | 14 +-
> 81 files changed, 552 insertions(+), 512 deletions(-)
Thanks, the documentation parts are approved.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
next prev parent reply other threads:[~2026-07-05 13:07 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 [this message]
2026-07-21 14:55 ` Philippe Waroquiers
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=86o6gl8u1l.fsf@gnu.org \
--to=eliz@gnu.org \
--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