public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Simon Sobisch <simonsobisch@gnu.org>
To: gdb@sourceware.org
Subject: Is there a way to know about current "until"/"advance" execution?
Date: Fri, 5 Nov 2021 10:14:36 +0100	[thread overview]
Message-ID: <6640cbc8-38d7-5138-d28e-8fd94f486704@gnu.org> (raw)
In-Reply-To: <60c53fa8bf160533a2eddf1da280eb50c7461a6a.camel@fit.cvut.cz>

For a silent breakpoint the following commands are very useful

break something
command
   silent
   do_something
   continue
end

or the similar version in a python script using the silent attribute and 
continue as a command.

I've recently seen a problem with this the first time - it break any 
active "until"


break 120
command
   silent
   continue
end
break 140
until 123


will execute until 140 (with a function that just executes each line), 
while the user "intended" to go until line 123.

Similar applies to "advance".


The workaround as a user:
instead of using "until": create a temporary maintenance breakpoint in 
line 123 and "continue".
... but as the break 120 in the sample above is scripted and not 
executed by a user this cannot be applied.

Questions:
* Is there a more direct way to "preserve" the running "until"/"advance" 
in GDB scripting or with Python?

* Is there a way in Python to know about the current active "until" (so 
this can be re-done instead of "continue"/"until" in the above example)?

* If there isn't an option for this, can you please consider this as a 
Feature Request for the Python API of GDB?

Thanks,
Simon

  parent reply	other threads:[~2021-11-05  9:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 16:40 How to create new mi commands via python / get current interpreter in python Simon Sobisch
2021-11-02 16:56 ` Jan Vrany
2021-11-02 19:11   ` Simon Sobisch
2021-11-03  9:06     ` Jan Vrany
2021-11-05 18:51       ` Jan Vrany
2021-11-05 21:18         ` feature branch for creating MI commands with python (was: How to create new mi commands via python / get current interpreter in python) Simon Sobisch
2021-11-23 12:29           ` Jan Vrany
2021-11-23 12:48             ` Lancelot SIX
2021-11-23 16:28               ` Jan Vrany
2021-11-03 16:31   ` How to get the full source location of a frame via python Simon Sobisch
2021-11-03 20:07     ` Jan Vrany
2021-11-03 20:35       ` Simon Sobisch
2021-11-03 20:50   ` UnicodeDecodeError on gdb.execute Simon Sobisch
2021-11-03 21:55   ` Is "forward-search" also possible case insensitive? Simon Sobisch
2021-11-05  9:14   ` Simon Sobisch [this message]
2021-11-22 14:54   ` Is there a way to get a function's end address other than `disassemble`? Simon Sobisch
2021-11-22 15:14     ` Andreas Schwab
2021-11-22 15:17       ` Simon Sobisch
2021-11-25 19:28   ` Broken source view with Pygments and non-UTF-8 encoded source Simon Sobisch
2021-11-26 11:16     ` Andrew Burgess
2021-11-26 13:39       ` Andrew Burgess

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=6640cbc8-38d7-5138-d28e-8fd94f486704@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).