diff options
| author | gentoo90 <gentoo90@gmail.com> | 2017-05-30 11:14:25 +0300 |
|---|---|---|
| committer | gentoo90 <gentoo90@gmail.com> | 2017-05-30 11:17:05 +0300 |
| commit | 167e4b09d1688a0b4ac9b260a84bacdc926e0230 (patch) | |
| tree | 0274b025595120c971a804861c650430efbc52c3 /src | |
| parent | ac33d2cbfbe103cb9dda7cc31eda85fcd8ca039d (diff) | |
Fix 'invalid literal for int()' exception in pretty-printers
Some pointers values include additional info, so they can't be parsed with int().
Diffstat (limited to 'src')
| -rwxr-xr-x | src/etc/gdb_rust_pretty_printing.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/etc/gdb_rust_pretty_printing.py b/src/etc/gdb_rust_pretty_printing.py index e617435f54f..2ad16b50d3f 100755 --- a/src/etc/gdb_rust_pretty_printing.py +++ b/src/etc/gdb_rust_pretty_printing.py @@ -78,7 +78,8 @@ class GdbValue(rustpp.Value): def as_integer(self): if self.gdb_val.type.code == gdb.TYPE_CODE_PTR: - return int(str(self.gdb_val), 0) + as_str = str(self.gdb_val).split()[0] + return int(as_str, 0) return int(self.gdb_val) def get_wrapped_value(self): |
