Skip to content

Commit

Permalink
Fix 'invalid literal for int()' exception with unicode in pretty-prin…
Browse files Browse the repository at this point in the history
…ters

str() can't handle unicode strings
  • Loading branch information
gentoo90 committed May 30, 2017
1 parent 167e4b0 commit 10977bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/etc/gdb_rust_pretty_printing.py
Expand Up @@ -78,7 +78,7 @@ def get_child_at_index(self, index):

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)

Expand Down

0 comments on commit 10977bc

Please sign in to comment.