Commit Graph

12 Commits

Author SHA1 Message Date
Markus Westerlind 7cf8d3ac2b feat: Update hashbrown to instantiate less llvm IR
Includes https://github.com/rust-lang/hashbrown/pull/204 and https://github.com/rust-lang/hashbrown/pull/205 (not yet merged) which both server to reduce the amount of IR generated for hashmaps.

Inspired by the llvm-lines data gathered in https://github.com/rust-lang/rust/pull/76680
2021-03-16 11:20:26 +01:00
bors 92e4fb0732 Auto merge of #79235 - ortem:fix-btreemap-gdb-pretty-printer, r=Mark-Simulacrum
Fix zero-sized BTreeMap gdb pretty-printer

`gdb.parse_and_eval("()")` is needed because GDB treats "()" as a Rust array of two characters, not as a unit

Based on https://github.com/intellij-rust/intellij-rust/pull/6356
2020-12-02 04:12:33 +00:00
Jonas Schievink 93d830ed50
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
2020-11-28 15:58:17 +01:00
Stein Somers 8526c313c1 BTreeMap: cut out the ceremony around BoxedNode 2020-11-23 17:02:08 +01:00
ortem 685e1f3e45 Fix zero-sized BTreeMap gdb pretty-printer
`gdb.parse_and_eval("()")` is needed because GDB treats "()" as a Rust array of two characters, not as a unit
2020-11-23 17:07:14 +03:00
ortem 905ed3bb6b 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] = { ... }
2020-11-20 17:54:57 +03:00
Stein Somers 9fca57ceb9 BTreeMap: reuse NodeRef as Root, keep BoxedNode for edges only, ban Unique 2020-11-18 10:07:42 +01:00
Stein Somers 28af355b9f BTreeMap: improve gdb introspection of BTreeMap with ZST keys or values 2020-10-14 13:03:23 +02:00
Stein Somers bb9da7a0ed BTreeMap: fix gdb introspection of BTreeMap with ZST keys or values 2020-10-10 15:27:51 +02:00
Matt Brubeck ebd15e790a Implement HashSet in terms of hashbrown::HashSet 2020-09-08 17:24:23 -07:00
Amanieu d'Antras e3283e0331 Handle new HashMap layout in GDB and LLDB 2020-08-07 07:03:15 +01:00
ortem 47c26e69a9 Implement new gdb/lldb pretty-printers
Replace old GDB and LLDB pretty-printers with new ones
which were originally written for IntelliJ Rust.
New LLDB pretty-printers support synthetic children.
New GDB/LLDB pretty-printers support all Rust types
supported by old pretty-printers, and also support:
Rc, Arc, Cell, Ref, RefCell, RefMut, HashMap, HashSet.
2020-06-09 16:13:11 +03:00