This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix help text for "python" command


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a154931ef1ef1c588c0e7da5e5fd4658c5dd28f5

commit a154931ef1ef1c588c0e7da5e5fd4658c5dd28f5
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Sep 8 09:13:37 2018 -0600

    Fix help text for "python" command
    
    PR python/18380 points out that the example in the "help python" text
    will only work in Python 2.  This changes the example to be valid
    syntax for both Python 2 and Python 3.
    
    gdb/ChangeLog
    2018-09-10  Tom Tromey  <tom@tromey.com>
    
    	PR python/18380:
    	* python/python.c (_initialize_python): Make example in "python"
    	help work in Python 3.

Diff:
---
 gdb/ChangeLog       | 6 ++++++
 gdb/python/python.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7b0ef2e..7adb11f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2018-09-10  Tom Tromey  <tom@tromey.com>
+
+	PR python/18380:
+	* python/python.c (_initialize_python): Make example in "python"
+	help work in Python 3.
+
 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
 
 	* Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 20fc674..6f798a0 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1875,7 +1875,7 @@ Evaluate a Python command.\n\
 \n\
 The command can be given as an argument, for instance:\n\
 \n\
-    python print 23\n\
+    python print (23)\n\
 \n\
 If no argument is given, the following lines are read and used\n\
 as the Python commands.  Type a line containing \"end\" to indicate\n\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]