Skip to content

Commit 40706c0

Browse files
authored
Rollup merge of rust-lang#60826 - ortem:new-dbg-pretty-printers, r=pnkfelix
Implement new gdb/lldb pretty-printers This PR replaces current gdb and lldb pretty-printers with new ones which were originally written for [IntelliJ Rust](https://github.com/intellij-rust/intellij-rust/tree/master/prettyPrinters). The current state of lldb pretty-printers is poor, because [they don't use synthetic children](rust-lang#55586 (comment)). When I started to reimplement lldb pretty-printers with synthetic children support, I've found current version strange and hard to support. I think `debugger_pretty_printers_common.py` is overkill, so I got rid of it. The new pretty-printers have to support all types supported by current pretty-printers, and also support `Rc`, `Arc`, `Cell`, `Ref`, `RefCell`, `RefMut`, `HashMap`, `HashSet`.
2 parents 49c68bd + 87f4eb2 commit 40706c0

18 files changed

+1479
-1191
lines changed

src/bootstrap/dist.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -614,19 +614,21 @@ impl Step for DebuggerScripts {
614614
cp_debugger_script("natvis/libcore.natvis");
615615
cp_debugger_script("natvis/libstd.natvis");
616616
} else {
617-
cp_debugger_script("debugger_pretty_printers_common.py");
617+
cp_debugger_script("rust_types.py");
618618

619619
// gdb debugger scripts
620620
builder.install(&builder.src.join("src/etc/rust-gdb"), &sysroot.join("bin"), 0o755);
621621
builder.install(&builder.src.join("src/etc/rust-gdbgui"), &sysroot.join("bin"), 0o755);
622622

623623
cp_debugger_script("gdb_load_rust_pretty_printers.py");
624-
cp_debugger_script("gdb_rust_pretty_printing.py");
624+
cp_debugger_script("gdb_lookup.py");
625+
cp_debugger_script("gdb_providers.py");
625626

626627
// lldb debugger scripts
627628
builder.install(&builder.src.join("src/etc/rust-lldb"), &sysroot.join("bin"), 0o755);
628629

629-
cp_debugger_script("lldb_rust_formatters.py");
630+
cp_debugger_script("lldb_lookup.py");
631+
cp_debugger_script("lldb_providers.py");
630632
}
631633
}
632634
}

0 commit comments

Comments
 (0)