diff options
author | Doug Evans <dje@google.com> | 2016-10-06 10:41:27 -0700 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2016-10-06 10:41:27 -0700 |
commit | 33fa2c6e1b1e63599156f7d79de8c0a6ea69c8af (patch) | |
tree | b933abe112c0e009cc5c027554b526483a391c93 /gdb/python | |
parent | d73f9c4bab1a0ec82007f9d36b8a7bf5d34f7bf6 (diff) | |
download | gdb-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.c | 5 |
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. */ |