aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2016-10-06 10:41:27 -0700
committerDoug Evans <dje@google.com>2016-10-06 10:41:27 -0700
commit33fa2c6e1b1e63599156f7d79de8c0a6ea69c8af (patch)
treeb933abe112c0e009cc5c027554b526483a391c93 /gdb/python
parentd73f9c4bab1a0ec82007f9d36b8a7bf5d34f7bf6 (diff)
downloadgdb-33fa2c6e1b1e63599156f7d79de8c0a6ea69c8af.zip
gdb-33fa2c6e1b1e63599156f7d79de8c0a6ea69c8af.tar.gz
gdb-33fa2c6e1b1e63599156f7d79de8c0a6ea69c8af.tar.bz2
Fix gdb.Value->python conversion for large unsigned ints.
gdb/ChangeLog: * python/py-value.c (valpy_long): Handle unsigned values. gdb/testsuite/ChangeLog: * gdb.python/py-value.exp (test_value_creation): Add test for large unsigned 64-bit value.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-value.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index b0d3df3..46683b8 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -1518,7 +1518,10 @@ valpy_long (PyObject *self)
}
END_CATCH
- return gdb_py_long_from_longest (l);
+ if (TYPE_UNSIGNED (type))
+ return gdb_py_long_from_ulongest (l);
+ else
+ return gdb_py_long_from_longest (l);
}
/* Implements conversion to float. */