Skip to content

Commit f315c35

Browse files
committed
Auto merge of #72357 - ortem:new-dbg-pretty-printers, r=pnkfelix
Implement new gdb/lldb pretty-printers Reopened #60826 This PR replaces current gdb and lldb pretty-printers with new ones that 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](#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`. Fixes #56252
2 parents ff4a253 + 47c26e6 commit f315c35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1871
-1495
lines changed

src/bootstrap/dist.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -619,19 +619,21 @@ impl Step for DebuggerScripts {
619619
cp_debugger_script("natvis/libcore.natvis");
620620
cp_debugger_script("natvis/libstd.natvis");
621621
} else {
622-
cp_debugger_script("debugger_pretty_printers_common.py");
622+
cp_debugger_script("rust_types.py");
623623

624624
// gdb debugger scripts
625625
builder.install(&builder.src.join("src/etc/rust-gdb"), &sysroot.join("bin"), 0o755);
626626
builder.install(&builder.src.join("src/etc/rust-gdbgui"), &sysroot.join("bin"), 0o755);
627627

628628
cp_debugger_script("gdb_load_rust_pretty_printers.py");
629-
cp_debugger_script("gdb_rust_pretty_printing.py");
629+
cp_debugger_script("gdb_lookup.py");
630+
cp_debugger_script("gdb_providers.py");
630631

631632
// lldb debugger scripts
632633
builder.install(&builder.src.join("src/etc/rust-lldb"), &sysroot.join("bin"), 0o755);
633634

634-
cp_debugger_script("lldb_rust_formatters.py");
635+
cp_debugger_script("lldb_lookup.py");
636+
cp_debugger_script("lldb_providers.py");
635637
}
636638
}
637639
}

0 commit comments

Comments
 (0)