Fix 'invalid literal for int()' exception in pretty-printers
Some pointers values include additional info, so they can't be parsed with int().
This commit is contained in:
parent
ac33d2cbfb
commit
167e4b09d1
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user