Skip to content

Commit

Permalink
Generic encoded enums no longer crash on reference/pointer types
Browse files Browse the repository at this point in the history
  • Loading branch information
royalstream committed May 13, 2016
1 parent e88defe commit 04baf25
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/etc/gdb_rust_pretty_printing.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ def get_child_at_index(self, index):
return child

def as_integer(self):
if self.gdb_val.type.code == gdb.TYPE_CODE_PTR:
return int(str(self.gdb_val), 0)
return int(self.gdb_val)

def get_wrapped_value(self):
Expand Down

0 comments on commit 04baf25

Please sign in to comment.