diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2014-11-28 11:18:48 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2014-11-28 11:36:52 -0500 |
commit | d7fc3181f73ab3d5549b396198645558127e0584 (patch) | |
tree | b802e7103873a444a6d8328de53faf92c3a293e0 /gdb/testsuite/gdb.python/py-linetable.exp | |
parent | 57df9adf2d437e3c7f17a77c3e0f3c0d8e56aa40 (diff) | |
download | gdb-d7fc3181f73ab3d5549b396198645558127e0584.zip gdb-d7fc3181f73ab3d5549b396198645558127e0584.tar.gz gdb-d7fc3181f73ab3d5549b396198645558127e0584.tar.bz2 |
Fix prints in tests for Python 3
Python 3's print requires to use parentheses, so this patch adds them
where they were missing.
gdb/testsuite/ChangeLog:
* gdb.ada/py_range.exp: Add parentheses to calls to print.
* gdb.dwarf2/symtab-producer.exp: Same.
* gdb.gdb/python-interrupts.exp: Same.
* gdb.gdb/python-selftest.exp: Same.
* gdb.python/py-linetable.exp: Same.
* gdb.python/py-type.exp: Same.
* gdb.python/py-value-cc.exp: Same.
* gdb.python/py-value.exp: Same.
Diffstat (limited to 'gdb/testsuite/gdb.python/py-linetable.exp')
-rw-r--r-- | gdb/testsuite/gdb.python/py-linetable.exp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.python/py-linetable.exp b/gdb/testsuite/gdb.python/py-linetable.exp index 2f24ab4..a3d5a75c 100644 --- a/gdb/testsuite/gdb.python/py-linetable.exp +++ b/gdb/testsuite/gdb.python/py-linetable.exp @@ -44,17 +44,17 @@ gdb_py_test_multiple "input simple command" \ "python" "" \ "def list_lines():" "" \ " for l in lt:" "" \ - " print 'L' +str(l.line)+' A '+hex(l.pc)" "" \ + " print ('L' + str(l.line) + ' A ' + hex(l.pc))" "" \ "end" "" gdb_test "python list_lines()" \ "L20 A $hex.*L21 A $hex.*L22 A $hex.*L24 A $hex.*L25 A $hex.*L40 A $hex.*L42 A $hex.*L44 A $hex.*L42 A $hex.*L46 A $hex.*" \ "test linetable iterator addr" -gdb_test "python print len(lt.line(42))" "2" \ +gdb_test "python print(len(lt.line(42)))" "2" \ "Test length of a multiple pc line" -gdb_test "python print len(lt.line(20))" "1" \ +gdb_test "python print(len(lt.line(20)))" "1" \ "Test length of a single pc line" -gdb_test "python print lt.line(1)" "None" \ +gdb_test "python print(lt.line(1))" "None" \ "Test None returned for line with no pc" # Test gdb.Linetable.sourcelines () @@ -65,12 +65,12 @@ gdb_test "python print (sorted(fset))" \ "Test frozen set contains line numbers" # Test gdb.Linetable.has_line () -gdb_test "python print lt.has_line(20)" \ +gdb_test "python print(lt.has_line(20))" \ "True.*" \ "Test has_pcs at line 20" -gdb_test "python print lt.has_line(44)" \ +gdb_test "python print(lt.has_line(44))" \ "True.*" \ "Test has_pcs at line 40" -gdb_test "python print lt.has_line(10)" \ +gdb_test "python print(lt.has_line(10))" \ "False.*" \ "Test has_pcs at line 10" |