Index: gdb/testsuite/gdb.python/py-shared.exp |
diff --git a/gdb/testsuite/gdb.python/py-shared.exp b/gdb/testsuite/gdb.python/py-shared.exp |
index 454a325260eb3be5afbdfb25e5ccbd4cda0d0e5f..dd4a12582a368d2373a5ec1243e532992c4b05a0 100644 |
--- a/gdb/testsuite/gdb.python/py-shared.exp |
+++ b/gdb/testsuite/gdb.python/py-shared.exp |
@@ -1,4 +1,4 @@ |
-# Copyright (C) 2008-2012 Free Software Foundation, Inc. |
+# Copyright (C) 2008-2013 Free Software Foundation, Inc. |
# This program is free software; you can redistribute it and/or modify |
# it under the terms of the GNU General Public License as published by |
@@ -58,8 +58,11 @@ runto [gdb_get_line_number "Break to end."] |
# Test gdb.solib_name |
gdb_test "p &func1" "" "func1 address" |
gdb_py_test_silent_cmd "python func1 = gdb.history(0)" "Aquire func1 address" 1 |
-gdb_test "python print gdb.solib_name(long(func1))" "py-shared-sl.sl" "test func1 solib location" |
+if { $gdb_py_is_py3k == 1 } { |
+ gdb_py_test_silent_cmd "python long = int" "" 0 |
+} |
+gdb_test "python print (gdb.solib_name(long(func1)))" "py-shared-sl.sl" "test func1 solib location" |
gdb_test "p &main" "" "main address" |
gdb_py_test_silent_cmd "python main = gdb.history(0)" "Aquire main address" 1 |
-gdb_test "python print gdb.solib_name(long(main))" "None" "test main solib location" |
+gdb_test "python print (gdb.solib_name(long(main)))" "None" "test main solib location" |