Skip to content

Commit

Permalink
Auto merge of #72357 - ortem:new-dbg-pretty-printers, r=pnkfelix
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Jun 15, 2020
2 parents ff4a253 + 47c26e6 commit f315c35
Show file tree
Hide file tree
Showing 59 changed files with 1,871 additions and 1,495 deletions.
8 changes: 5 additions & 3 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,19 +619,21 @@ impl Step for DebuggerScripts {
cp_debugger_script("natvis/libcore.natvis");
cp_debugger_script("natvis/libstd.natvis");
} else {
cp_debugger_script("debugger_pretty_printers_common.py");
cp_debugger_script("rust_types.py");

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

cp_debugger_script("gdb_load_rust_pretty_printers.py");
cp_debugger_script("gdb_rust_pretty_printing.py");
cp_debugger_script("gdb_lookup.py");
cp_debugger_script("gdb_providers.py");

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

cp_debugger_script("lldb_rust_formatters.py");
cp_debugger_script("lldb_lookup.py");
cp_debugger_script("lldb_providers.py");
}
}
}
Expand Down
Loading

0 comments on commit f315c35

Please sign in to comment.