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/gdb-7.11-branch] gdb-gdb.py: SyntaxError: Missing parentheses in call to 'print'


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

commit 3d58f8997229b9045899dd306a47a3c27d03a9fd
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Feb 22 17:15:14 2016 +0100

    gdb-gdb.py: SyntaxError: Missing parentheses in call to 'print'
    
    After building GDB
    	--with-python=/usr/bin/python3
    and for example stripping ./gdb and running:
    	./gdb -data-directory data-directory/ -iex "add-auto-load-safe-path $PWD/gdb-gdb.gdb" -iex "add-auto-load-safe-path $PWD/gdb-gdb.
    py" ./gdb
    I get:
    	Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]
    	  File "/home/jkratoch/redhat/gdb-test-python3/gdb/gdb-gdb.py", line 91
    	    print "Warning: Cannot find enum type_flag_value type."
    								  ^
    	SyntaxError: Missing parentheses in call to 'print'
    	(top-gdb) q
    
    gdb/ChangeLog
    2016-02-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* gdb-gdb.py (class TypeFlagsPrinter): Use parentheses for print.

Diff:
---
 gdb/ChangeLog  | 4 ++++
 gdb/gdb-gdb.py | 8 ++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1b834eb..8e4ecef 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2016-02-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb-gdb.py (class TypeFlagsPrinter): Use parentheses for print.
+
 2016-02-16  Don Breazeal  <donb@codesourcery.com>
 
 	PR remote/19496
diff --git a/gdb/gdb-gdb.py b/gdb/gdb-gdb.py
index 4f3ac1c..9a12baf 100644
--- a/gdb/gdb-gdb.py
+++ b/gdb/gdb-gdb.py
@@ -88,14 +88,14 @@ class TypeFlagsPrinter:
         try:
             flags = gdb.lookup_type("enum type_flag_value")
         except:
-            print "Warning: Cannot find enum type_flag_value type."
-            print "         `struct type' pretty-printer will be degraded"
+            print("Warning: Cannot find enum type_flag_value type.")
+            print("         `struct type' pretty-printer will be degraded")
             return
         try:
             iflags = gdb.lookup_type("enum type_instance_flag_value")
         except:
-            print "Warning: Cannot find enum type_instance_flag_value type."
-            print "         `struct type' pretty-printer will be degraded"
+            print("Warning: Cannot find enum type_instance_flag_value type.")
+            print("         `struct type' pretty-printer will be degraded")
             return
         # Note: TYPE_FLAG_MIN is a duplicate of TYPE_FLAG_UNSIGNED,
         # so exclude it from the list we are building.


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