From: Phil Muldoon <pmuldoon@redhat.com>
To: gdb-patches@sourceware.org
Cc: eli@gnu.org, pedro@codesourcery.com
Subject: [python] [doc] PR 12930/12802 (clarify Breakpoint::stop doco)
Date: Thu, 06 Oct 2011 10:59:00 -0000 [thread overview]
Message-ID: <m3pqia8jys.fsf@redhat.com> (raw)
This patch address the PRs 12930, and 12802 which both arise from
confusion regarding the scope of actions in the Breakpoint::stop
callback. I have added some documentation to clarify.
Pedro, please excuse the gratuitous CC, but beyond Eli's normal review
can you please fact-check the documentation to make sure I am not
writing something about states that is incorrect.
Cheers,
Phil
--
2011-10-06 Phil Muldoon <pmuldoon@redhat.com>
PR python/12930
PR python/12802
* gdb.texinfo (Breakpoints In Python): Clarify behavior in the
stop method.
--
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index dd0f7f6..0a66f5c 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -23552,6 +23552,18 @@ methods have a chance to execute at that location. In this scenario
if one of the methods returns @code{True} but the others return
@code{False}, the inferior will still be stopped.
+When @value{GDBN} executes each @code{stop} method, the inferior has
+been stopped, but the internal state accounting for that inferior is
+undetermined. As the return value from each @code{stop} method has the
+potential to instruct @value{GDBN} to restart the inferior, or keep it
+in a stopped state, this indeterminate state will remain until the
+execution scope of each @code{stop} method has been completed. Therefore
+you should not alter the execution state of the inferior (IE step, next,
+etc), alter the current frame context (IE change the current active
+frame), or alter, add or delete any breakpoint. As a general rule, you
+should not alter any data within @value{GDBN} or the inferior at this
+time.
+
Example @code{stop} implementation:
@smallexample
next reply other threads:[~2011-10-06 10:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-06 10:59 Phil Muldoon [this message]
2011-10-06 13:40 ` Pedro Alves
2011-10-06 13:58 ` Phil Muldoon
2011-10-06 14:02 ` Pedro Alves
2011-10-06 18:32 ` Eli Zaretskii
2011-10-07 10:22 ` Phil Muldoon
2011-10-07 13:48 ` Phil Muldoon
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=m3pqia8jys.fsf@redhat.com \
--to=pmuldoon@redhat.com \
--cc=eli@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.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