about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteven Burns <royalstream@hotmail.com>2016-05-12 22:01:49 -0600
committerSteven Burns <royalstream@hotmail.com>2016-05-12 22:01:49 -0600
commit04baf2593e782dafc979cfbfb6c9994e3a0d1e78 (patch)
tree4c6238549882fa2a766ee5bbe57478c6e58dcdab
parente88defe71806ad190588e168e513bc1098f7c9fb (diff)
Generic encoded enums no longer crash on reference/pointer types
-rwxr-xr-xsrc/etc/gdb_rust_pretty_printing.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/etc/gdb_rust_pretty_printing.py b/src/etc/gdb_rust_pretty_printing.py
index f93f3490215..38c9fbf9828 100755
--- a/src/etc/gdb_rust_pretty_printing.py
+++ b/src/etc/gdb_rust_pretty_printing.py
@@ -70,6 +70,8 @@ class GdbValue(rustpp.Value):
         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):