aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2019-06-26 19:38:24 -0700
committerKevin Buettner <kevinb@redhat.com>2019-07-20 22:47:15 -0700
commit86ceaf9867288530af927aa98680526c897cf4cc (patch)
tree0b49ddfdb4a0b69fd06a3d6f73068bcb2d792c10 /gdb
parentf720d67c59a4c7e6bf92538c6bfc8dc76f7c7224 (diff)
downloadgdb-86ceaf9867288530af927aa98680526c897cf4cc.zip
gdb-86ceaf9867288530af927aa98680526c897cf4cc.tar.gz
gdb-86ceaf9867288530af927aa98680526c897cf4cc.tar.bz2
Make documentation of "python" command match actual behavior
The example in the documentation for the "python" command shows GDB outputting instructions for how to terminate a sequence of python commands entered from the command line. The documentation shows that the following two lines are being output, though this does not occur when actually using the "python" command from GDB: Type python script End with a line saying just "end". While display of this text might be helpful, GDB has several other commands which also use the "end" terminator that offer no such text. Examples include the "if" and "while" commands. For example, (gdb) if 1==1 >print "a" >end $1 = "a" This seems similar to doing: (gdb) python >print 23 >end 23 If we decide that we want the "python" command to print such a message, we should also adjust the behavior for other GDB commands which also use "end" to terminate a command list. I.e, if this decision is made, the "if" and "while" commands ought to also print similar messages. So, for the moment anyway, this commit adjusts the documentation of the python command to match its implementation. This patch was taken from a larger body of work originating from the Archer project. I haven't been able to determine its original author, though I did find a commit log from Jan Kratochvil (in the Archer repository) which suggests that the change had originally been made to gdb.texinfo, but got inadvertently dropped when the python related documentation was split out to python.texi. gdb/doc/ChangeLog: * python.texi (python command): Revise example to match command behavior.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/doc/ChangeLog5
-rw-r--r--gdb/doc/python.texi2
2 files changed, 5 insertions, 2 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index fe3df3d..948b2b2 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2019-07-20 Kevin Buettner <kevinb@redhat.com>
+
+ * python.texi (python command): Revise example to match
+ command behavior.
+
2019-07-09 Pedro Alves <palves@redhat.com>
* gdb.texinfo (C++ Exception GDB/MI Catchpoint Commands): Adjust
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi
index f769ad0..0346235 100644
--- a/gdb/doc/python.texi
+++ b/gdb/doc/python.texi
@@ -90,8 +90,6 @@ containing @code{end}. For example:
@smallexample
(@value{GDBP}) python
-Type python script
-End with a line saying just "end".
>print 23
>end
23