diff options
author | Marc Hartmayer <marc1006@users.noreply.github.com> | 2019-09-24 03:34:12 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2019-09-24 03:34:12 (GMT) |
commit | 6f53d34fb0f944a8c0ee530334c353559ac40f72 (patch) | |
tree | 74da640e98f1d8b534e138e349e07863467cc356 /Tools/gdb | |
parent | 4346bad3321699d49a45e3446270b57726ab5c8f (diff) | |
download | cpython-6f53d34fb0f944a8c0ee530334c353559ac40f72.zip cpython-6f53d34fb0f944a8c0ee530334c353559ac40f72.tar.gz cpython-6f53d34fb0f944a8c0ee530334c353559ac40f72.tar.bz2 |
closes bpo-16637: libpython: construct integer object directly from gdbvalue (GH-15232)
This fixes the exception '`ValueError: invalid literal for int() with base 10`
if `str(gdbval)` returns a hexadecimal value (e.g. '0xa0'). This is the case if
the output-radix is set to 16 in gdb. See
https://sourceware.org/gdb/onlinedocs/gdb/Numbers.html for more information.
Diffstat (limited to 'Tools/gdb')
-rwxr-xr-x | Tools/gdb/libpython.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py index e28513d..2ab7d3b 100755 --- a/Tools/gdb/libpython.py +++ b/Tools/gdb/libpython.py @@ -1392,7 +1392,7 @@ class wrapperobject(PyObjectPtr): def int_from_int(gdbval): - return int(str(gdbval)) + return int(gdbval) def stringify(val): |