1
Fork 0

Rollup merge of #97028 - ridwanabdillahi:pretty-printer, r=michaelwoerister

Add support for embedding pretty printers via `#[debugger_visualizer]` attribute

Initial support for [RFC 3191](https://github.com/rust-lang/rfcs/pull/3191) in PR https://github.com/rust-lang/rust/pull/91779 was scoped to supporting embedding NatVis files using a new attribute. This PR implements the pretty printer support as stated in the RFC mentioned above.

This change includes embedding pretty printers in the `.debug_gdb_scripts` just as the pretty printers for rustc are embedded today. Also added additional tests for embedded pretty printers. Additionally cleaned up error checking so all error checking is done up front regardless of the current target.

RFC: https://github.com/rust-lang/rfcs/pull/3191
This commit is contained in:
Guillaume Gomez 2022-05-29 01:12:30 +02:00 committed by GitHub
commit 239287f013
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 462 additions and 200 deletions

View file

@ -1203,6 +1203,7 @@ impl SourceFileHash {
#[derive(Copy, PartialEq, PartialOrd, Clone, Ord, Eq, Hash, Debug, Encodable, Decodable)]
pub enum DebuggerVisualizerType {
Natvis,
GdbPrettyPrinter,
}
/// A single debugger visualizer file.

View file

@ -722,6 +722,7 @@ symbols! {
fundamental,
future,
future_trait,
gdb_script_file,
ge,
gen_future,
gen_kill,