about summary refs log tree commit diff
path: root/src/etc/lldb_providers.py
diff options
context:
space:
mode:
authorortem <ortem00@gmail.com>2020-11-20 17:54:26 +0300
committerortem <ortem00@gmail.com>2020-11-20 17:54:57 +0300
commit905ed3bb6b1f1a8abb253192333bb3f5a08b61c8 (patch)
tree322f26550bd716a21adcde069fe6259a43b42e70 /src/etc/lldb_providers.py
parentae6aa22cf26fede2177abe4ff974030058885b7a (diff)
downloadrust-905ed3bb6b1f1a8abb253192333bb3f5a08b61c8.tar.gz
rust-905ed3bb6b1f1a8abb253192333bb3f5a08b61c8.zip
Resolve typedefs in HashMap gdb/lldb pretty-printers
`GetTypedefedType` (LLDB) and `strip_typedefs` (GDB) calls are needed to resolve key and value types completely.
Without these calls, debugger doesn't show the actual type.

* Before (without `GetTypedefedType`):
(lldb) frame variable hm[0]
(T) hm[0] = { ... }

* After (with `GetTypedefedType`):
(lldb) frame variable hm[0]
((i32, alloc::string::String)) hm[0] = { ... }
Diffstat (limited to 'src/etc/lldb_providers.py')
-rw-r--r--src/etc/lldb_providers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/etc/lldb_providers.py b/src/etc/lldb_providers.py
index 64cb9837943..9c7b07efbaa 100644
--- a/src/etc/lldb_providers.py
+++ b/src/etc/lldb_providers.py
@@ -531,7 +531,7 @@ class StdHashMapSyntheticProvider:
         ctrl = table.GetChildMemberWithName("ctrl").GetChildAtIndex(0)
 
         self.size = table.GetChildMemberWithName("items").GetValueAsUnsigned()
-        self.pair_type = table.type.template_args[0]
+        self.pair_type = table.type.template_args[0].GetTypedefedType()
         self.pair_type_size = self.pair_type.GetByteSize()
 
         self.new_layout = not table.GetChildMemberWithName("data").IsValid()