From 04baf2593e782dafc979cfbfb6c9994e3a0d1e78 Mon Sep 17 00:00:00 2001 From: Steven Burns Date: Thu, 12 May 2016 22:01:49 -0600 Subject: [PATCH] Generic encoded enums no longer crash on reference/pointer types --- src/etc/gdb_rust_pretty_printing.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/etc/gdb_rust_pretty_printing.py b/src/etc/gdb_rust_pretty_printing.py index f93f3490215d1..38c9fbf98281a 100755 --- a/src/etc/gdb_rust_pretty_printing.py +++ b/src/etc/gdb_rust_pretty_printing.py @@ -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):