Fix 'invalid literal for int()' exception with unicode in pretty-printers
str() can't handle unicode strings
This commit is contained in:
parent
167e4b09d1
commit
10977bcf6c
1 changed files with 1 additions and 1 deletions
|
|
@ -78,7 +78,7 @@ class GdbValue(rustpp.Value):
|
|||
|
||||
def as_integer(self):
|
||||
if self.gdb_val.type.code == gdb.TYPE_CODE_PTR:
|
||||
as_str = str(self.gdb_val).split()[0]
|
||||
as_str = unicode(self.gdb_val).split()[0]
|
||||
return int(as_str, 0)
|
||||
return int(self.gdb_val)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue