Skip to content

Commit

Permalink
Resolve typedef in HashMap lldb pretty-printer only if possible
Browse files Browse the repository at this point in the history
Previously, `GetTypedefedType` was invoked unconditionally.
But this did not work in case of `rust-lldb` without Rust patches
since there was no typedef actually.
  • Loading branch information
artemmukhin committed Feb 6, 2021
1 parent 399b645 commit 9ce070d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/etc/lldb_providers.py
Expand Up @@ -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()
Expand Down

0 comments on commit 9ce070d

Please sign in to comment.