From: Simon Sobisch via Gdb <gdb@sourceware.org>
To: gdb@sourceware.org
Subject: python API to trigger a "select-frame" like event with a given location
Date: Wed, 24 Sep 2025 20:56:12 +0200 [thread overview]
Message-ID: <35f6cb30-6118-4c3d-9c5a-2f819e6b7c6c@gnu.org> (raw)
using a frame filter and decorator I can drop "not interesting" frames
and add "artificial - display only" ones:
Instead of
(gdb) backtrace
#0 PROG2_ (...) at copybook.cpy:14
#1 PROG2 (...) at progb.cob:127
#2 PROG1_ (...) at init.cpy:21
#3 PROG1 (...) at prog.cob:139
#4 main (...) at prog.c:23223
I can show (combined with
(gdb) mybacktrace
#0 PROG2_ (...) at copybook.cpy:14
#0.0 COPYFUNC SECTION at copybook.cpy:14
#0.1 PROGFIN SECTION at progb.cob:521
#0.2 PROGMAIN SECTION at progb.cob:195
#0.3 PROG2 at progb.cob:127
#2 PROG1_ (...) at init.cpy:21
#2.0 PROG-INIT-EXT SECTION at init.cpy:21
#2.1 PROG-INIT SECTION at init.cpy:41
#2.2 MAIN-000 SECTION at proga.cob:139
#2.3 PROG1 at proga.cob:139
Also there's the option to add myup and mydown commands which select the
"expected" frame (0 and 2, in this example) where all the relevant
variables are defined.
But currently I see no way to programmatically "select" by location
(frame + linespec/LOCATION) [which would, other than "list" also be
passed to UIs/MI).
Is there an option that I've overlooked?
If not: could there be an extension to "select-frame level"
select-frame level LOCATION
select-frame level -- Select a stack frame by level and show LOCATION in
the UI
or a new command
show-location LOCATION
that executes what select-frame does, but _without_ selecting anything
(calling interps_notify() with the location as "selection")?
Thanks for any insights and for possibly considering this feature request.
Simon
next reply other threads:[~2025-09-24 18:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 18:56 Simon Sobisch via Gdb [this message]
2025-09-30 15:30 ` Andrew Burgess via Gdb
2025-09-30 16:41 ` Simon Sobisch via Gdb
2025-10-06 15:54 ` Andrew Burgess via Gdb
2025-10-03 19:40 ` 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=35f6cb30-6118-4c3d-9c5a-2f819e6b7c6c@gnu.org \
--to=gdb@sourceware.org \
--cc=simonsobisch@gnu.org \
/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