Skip to content

Commit 04baf25

Browse files
committed
Generic encoded enums no longer crash on reference/pointer types
1 parent e88defe commit 04baf25

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/etc/gdb_rust_pretty_printing.py

+2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ def get_child_at_index(self, index):
7070
return child
7171

7272
def as_integer(self):
73+
if self.gdb_val.type.code == gdb.TYPE_CODE_PTR:
74+
return int(str(self.gdb_val), 0)
7375
return int(self.gdb_val)
7476

7577
def get_wrapped_value(self):

0 commit comments

Comments
 (0)