aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2015-09-19 17:45:47 -0600
committerTom Tromey <tom@tromey.com>2016-06-02 13:18:42 -0600
commit1b40ec0559f4b24ccdf6b073610c526c4aa33c4d (patch)
treeb9ef31e8cc53d502afbba67d7e1582b1d694bdb6 /gdb/testsuite
parent99914dfd71d74bc700bb6d15647895ac0c8cc8e1 (diff)
downloadgdb-1b40ec0559f4b24ccdf6b073610c526c4aa33c4d.zip
gdb-1b40ec0559f4b24ccdf6b073610c526c4aa33c4d.tar.gz
gdb-1b40ec0559f4b24ccdf6b073610c526c4aa33c4d.tar.bz2
Fix PR python/18984
This fixes PR python/18984. The bug is that gdbpy_solib_name uses GDB_PY_LL_ARG, whereas it should use GDB_PY_LLU_ARG to avoid overflow. Built and tested on x86-64 Fedora 23. 2016-06-02 Tom Tromey <tom@tromey.com> PR python/18984: * python/python.c (gdbpy_solib_name): Use GDB_PY_LLU_ARG. 2016-06-02 Tom Tromey <tom@tromey.com> PR python/18984: * gdb.python/py-shared.exp: Add solib_name test.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.python/py-shared.exp4
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 733dd3c..3b305a6 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-02 Tom Tromey <tom@tromey.com>
+
+ PR python/18984:
+ * gdb.python/py-shared.exp: Add solib_name test.
+
2016-06-02 Simon Marchi <simon.marchi@ericsson.com>
* gdb.mi/mi-memory-changed.exp: Fix filename passed to untested.
diff --git a/gdb/testsuite/gdb.python/py-shared.exp b/gdb/testsuite/gdb.python/py-shared.exp
index 8673e54..4a0c738 100644
--- a/gdb/testsuite/gdb.python/py-shared.exp
+++ b/gdb/testsuite/gdb.python/py-shared.exp
@@ -66,3 +66,7 @@ gdb_test "python print (gdb.solib_name(long(func1)))" "py-shared-sl.sl" "test fu
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"
+
+if {[is_lp64_target]} {
+ gdb_test "python print (len(\[gdb.solib_name(0xffffffffffffffff)\]))" "1"
+}