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.
(cherry picked from commit 6f53d34fb0)

Co-authored-by: Marc Hartmayer <marc1006@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2019-09-23 20:52:50 -07:00 committed by GitHub
parent a7c73a0094
commit 5b94eb8d14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1392,7 +1392,7 @@ class wrapperobject(PyObjectPtr):
def int_from_int(gdbval):
return int(str(gdbval))
return int(gdbval)
def stringify(val):