From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aFIzGANXSmqsrygAWB0awg (envelope-from ) for ; Sun, 05 Jul 2026 09:07:15 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=ainLgZlR; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 5137C1E098; Sun, 05 Jul 2026 09:07:15 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,WEIRD_PORT autolearn=ham autolearn_force=no version=4.0.1 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 38A1F1E024 for ; Sun, 05 Jul 2026 09:07:14 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ED2F94BA2E1C for ; Sun, 5 Jul 2026 13:07:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED2F94BA2E1C Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=ainLgZlR Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 60DF14BA2E07 for ; Sun, 5 Jul 2026 13:06:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 60DF14BA2E07 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 60DF14BA2E07 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783256810; cv=none; b=pzQMz7CXHAXHE118u8Gz/CPyME2UnnKSo7sSCCUWLwsNJ5pas9uej/5wIVOJLgFiq9ssAPW9MAk6a45srqJrdjeT6fthTYn7Zymchmn5ucITUGwm0B0V5RXNQYYBdGo0dhyFoEJCausc7kiLmjvWw+icVxoWLRV5A7tZOouQrnM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783256810; c=relaxed/simple; bh=TjPc7XlAtTsE3TSRAwWHqeUCk+LqhKq6jtfUVY66iB0=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=Z8crSuhczVbPXwEeq3goxdE1x/SGLVwgrkhxsbRA4ZdQMzHhIS2Gzx9OjFOlkLAuyXgyUzBlDTLDS5i2EE4qeQyY2Qmdn12ixHfouIjE79pSJYYkevFvm9ooQ1n0q0jCSV3cMmuY8ROjEMC1cBk9qlHH1TgyhfXmIcg1GdIG3Vg= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=ainLgZlR DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 60DF14BA2E07 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wgMYb-0006Ig-Fr; Sun, 05 Jul 2026 09:06:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=4n21dWFEXDQgDnmfwm7IfBt11rZRz/LKtuXUiFWnN3U=; b=ainLgZlRUVj+ 3j69/8FmoS2krHUETz19luQt2J+K+PGaHtZjcI6HcdBtKS5EuxAuI1VPQbz+XZEKqnnJMkgmmt2Fx RqundGa1SXJPHjz181xB+RLNHafTuY607GQg4tYOj/dpSSLEju00/ScYJAZ/X18dWmhZNRb6gtt6w F4z3+vR41XhRlKadBJd9hGdIvRrPvS2pKM6GsV+jECiZ+uPhcCNiCY9abh97Z19lVh23bPhSriXVc q9j0FekAD9FYdNFy8rsuqfr1zOhcBKFdLzePzslTqcI8BHylWCoHHP2g5iSPqTXNCtmGIVyzAWFud uS8GCbgQyoNFrOTuSndeuQ==; Date: Sun, 05 Jul 2026 16:06:46 +0300 Message-Id: <86o6gl8u1l.fsf@gnu.org> From: Eli Zaretskii To: Tom Tromey Cc: gdb-patches@sourceware.org In-Reply-To: <20260705122609.145493-1-tom@tromey.com> (message from Tom Tromey on Sun, 5 Jul 2026 06:26:09 -0600) Subject: Re: [PATCH v2] Show the selected frame in "bt" References: <20260705122609.145493-1-tom@tromey.com> 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 > From: Tom Tromey > Cc: Tom Tromey > 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=, 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