public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Simon Sobisch <simonsobisch@gnu.org>
To: gdb@sourceware.org
Subject: Is it possible to "inject" into the stack or show non-stack entries via frame decorator api?
Date: Fri, 25 Jun 2021 00:24:39 +0200	[thread overview]
Message-ID: <f1e33049-aa36-07d3-709d-642f74d49ffd@gnu.org> (raw)

Scenario:

the current call-stack currently looks like

#0 func3
#1 func3_wrapper
#2 func2
#3 func2_wrapper
#4 func1
#5 func1_wrapper
#6 main


Using frame filters it is no problem to change that to either

#0 func3
#2 func2
#4 func1

or

#0 func3
    #1 func3_wrapper
#2 func2
    #3 func2_wrapper
#4 func1
    #5 func1_wrapper
#6 main


Question: Is it possibly to also add a "virtual" stack entry (one could 
select/up/down to), or at least show it in the backtrace?

Something like the following:

#0 func3 at ...
    #0.1  func3_part_a at ...
    #0.2  func3_part_c at ...
    #0.3  func3_part_b at ...
    #0.4  func3_part_a at ...
    #0.5  func3_start at ...
#2 func2 at ...


Background:
Each of those "func" entries in the stack have an internal frame 
handling using a linked list that contains label address pointers. It 
would be very cool to list those directly (currently only done with 
additional commands local-backtrace and list-local-frame which I'd like 
to drop).

I _guess_ adding those to the shown stack may be possible, but likely 
only with telling GDB about those (patching GDB), but maybe there's a 
way to at least print those with their positions in "bt" using a frame 
decorator?

Thanks for answers,
Simon



             reply	other threads:[~2021-06-24 22:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24 22:24 Simon Sobisch [this message]
2021-07-17 14:22 ` Simon Sobisch
2021-07-19 15:49 ` How/where is the mi watchpoint-trigger / EXEC_ASYNC_WATCHPOINT_TRIGGER raised? Simon Sobisch
2021-11-28 15:40 ` Is it possible to "inject" into the stack or show non-stack entries via frame decorator api? Simon Sobisch

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=f1e33049-aa36-07d3-709d-642f74d49ffd@gnu.org \
    --to=simonsobisch@gnu.org \
    --cc=gdb@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).