[PATCH] Add to documentation of Python 'dont_repeat' method
Tom Tromey
tom@tromey.com
Sat Feb 19 16:47:53 GMT 2022
PR python/28533 points out that the Python 'dont_repeat' documentation
is a bit ambiguous about when the method ought to be called. This
patch spells it out.
---
gdb/doc/python.texi | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index c1a3f5f2a7e..c861bc34fd3 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -3896,8 +3896,10 @@ not documented.'' is used.
@defun Command.dont_repeat ()
By default, a @value{GDBN} command is repeated when the user enters a
blank line at the command prompt. A command can suppress this
-behavior by invoking the @code{dont_repeat} method. This is similar
-to the user command @code{dont-repeat}, see @ref{Define, dont-repeat}.
+behavior by invoking the @code{dont_repeat} method at some point in
+its @code{invoke} method (normally this is done early in case of
+exception). This is similar to the user command @code{dont-repeat},
+see @ref{Define, dont-repeat}.
@end defun
@defun Command.invoke (argument, from_tty)
--
2.31.1
More information about the Gdb-patches
mailing list