From 9ce070d27ddbbae3004dd7af6ac6fca59c8b2e23 Mon Sep 17 00:00:00 2001 From: ortem Date: Sat, 6 Feb 2021 20:20:25 +0300 Subject: [PATCH] Resolve typedef in HashMap lldb pretty-printer only if possible Previously, `GetTypedefedType` was invoked unconditionally. But this did not work in case of `rust-lldb` without Rust patches since there was no typedef actually. --- src/etc/lldb_providers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/etc/lldb_providers.py b/src/etc/lldb_providers.py index 9c7b07efbaa77..ca2685ca31ffd 100644 --- a/src/etc/lldb_providers.py +++ b/src/etc/lldb_providers.py @@ -531,7 +531,9 @@ def update(self): ctrl = table.GetChildMemberWithName("ctrl").GetChildAtIndex(0) self.size = table.GetChildMemberWithName("items").GetValueAsUnsigned() - self.pair_type = table.type.template_args[0].GetTypedefedType() + self.pair_type = table.type.template_args[0] + if self.pair_type.IsTypedefType(): + self.pair_type = self.pair_type.GetTypedefedType() self.pair_type_size = self.pair_type.GetByteSize() self.new_layout = not table.GetChildMemberWithName("data").IsValid()