mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
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.
This commit is contained in:
parent
399b6452b5
commit
9ce070d27d
@ -531,7 +531,9 @@ class StdHashMapSyntheticProvider:
|
|||||||
ctrl = table.GetChildMemberWithName("ctrl").GetChildAtIndex(0)
|
ctrl = table.GetChildMemberWithName("ctrl").GetChildAtIndex(0)
|
||||||
|
|
||||||
self.size = table.GetChildMemberWithName("items").GetValueAsUnsigned()
|
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.pair_type_size = self.pair_type.GetByteSize()
|
||||||
|
|
||||||
self.new_layout = not table.GetChildMemberWithName("data").IsValid()
|
self.new_layout = not table.GetChildMemberWithName("data").IsValid()
|
||||||
|
Loading…
Reference in New Issue
Block a user