about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgentoo90 <gentoo90@gmail.com>2017-05-30 23:42:35 +0300
committergentoo90 <gentoo90@gmail.com>2017-05-30 23:42:35 +0300
commit10977bcf6cb278895313045b048851bef019272d (patch)
treef1ae55d8c753a049f10d42a3979591f5d1afb169
parent167e4b09d1688a0b4ac9b260a84bacdc926e0230 (diff)
downloadrust-10977bcf6cb278895313045b048851bef019272d.tar.gz
rust-10977bcf6cb278895313045b048851bef019272d.zip
Fix 'invalid literal for int()' exception with unicode in pretty-printers
str() can't handle unicode strings
-rwxr-xr-xsrc/etc/gdb_rust_pretty_printing.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/etc/gdb_rust_pretty_printing.py b/src/etc/gdb_rust_pretty_printing.py
index 2ad16b50d3f..aa1d00eaaab 100755
--- a/src/etc/gdb_rust_pretty_printing.py
+++ b/src/etc/gdb_rust_pretty_printing.py
@@ -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)