Skip to content

Commit

Permalink
Rollup merge of #81834 - ortem:fix-LLDB-hashmap-pretty-printers, r=Ma…
Browse files Browse the repository at this point in the history
…rk-Simulacrum

Resolve typedef in HashMap lldb pretty-printer only if possible

Fixes #81814

Previously, `GetTypedefedType` was invoked unconditionally.
But this did not work in case of `rust-lldb` without Rust patches since there was no typedef.
  • Loading branch information
Dylan-DPC authored Feb 9, 2021
2 parents d19f375 + 9ce070d commit 1652759
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/etc/lldb_providers.py
Original file line number Diff line number Diff line change
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 1652759

Please sign in to comment.