diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2020-11-28 15:58:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-28 15:58:17 +0100 |
| commit | 93d830ed50ada43ce3c7561d6f98dd3630a11cf9 (patch) | |
| tree | 507dd9976c9ca2c47474c6e32e0eb24d905497e8 /src/etc/gdb_providers.py | |
| parent | a732c3a3693fab727d3b8e6f5594b67efbb421eb (diff) | |
| parent | 905ed3bb6b1f1a8abb253192333bb3f5a08b61c8 (diff) | |
| download | rust-93d830ed50ada43ce3c7561d6f98dd3630a11cf9.tar.gz rust-93d830ed50ada43ce3c7561d6f98dd3630a11cf9.zip | |
Rollup merge of #79234 - ortem:fix-hashmap-pretty-printers, r=Mark-Simulacrum
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] = { ... }
```
Based on https://github.com/intellij-rust/intellij-rust/pull/6258
Diffstat (limited to 'src/etc/gdb_providers.py')
| -rw-r--r-- | src/etc/gdb_providers.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/etc/gdb_providers.py b/src/etc/gdb_providers.py index b74d47a8002..cabf5dccbfe 100644 --- a/src/etc/gdb_providers.py +++ b/src/etc/gdb_providers.py @@ -352,7 +352,7 @@ class StdHashMapProvider: ctrl = table["ctrl"]["pointer"] self.size = int(table["items"]) - self.pair_type = table.type.template_argument(0) + self.pair_type = table.type.template_argument(0).strip_typedefs() self.new_layout = not table.type.has_key("data") if self.new_layout: |
