From 175a4eab84379cebfc230ea357ae02dc9be39660 Mon Sep 17 00:00:00 2001 From: ridwanabdillahi <91507758+ridwanabdillahi@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:02:43 -0700 Subject: Add support for a new attribute `#[debugger_visualizer]` to support embedding debugger visualizers into a generated PDB. Cleanup `DebuggerVisualizerFile` type and other minor cleanup of queries. Merge the queries for debugger visualizers into a single query. Revert move of `resolve_path` to `rustc_builtin_macros`. Update dependencies in Cargo.toml for `rustc_passes`. Respond to PR comments. Load visualizer files into opaque bytes `Vec`. Debugger visualizers for dynamically linked crates should not be embedded in the current crate. Update the unstable book with the new feature. Add the tracking issue for the debugger_visualizer feature. Respond to PR comments and minor cleanups. --- .../src/language-features/debugger-visualizer.md | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/doc/unstable-book/src/language-features/debugger-visualizer.md (limited to 'src/doc') diff --git a/src/doc/unstable-book/src/language-features/debugger-visualizer.md b/src/doc/unstable-book/src/language-features/debugger-visualizer.md new file mode 100644 index 00000000000..4ab482fffb9 --- /dev/null +++ b/src/doc/unstable-book/src/language-features/debugger-visualizer.md @@ -0,0 +1,25 @@ +# `debugger_visualizer` + +The tracking issue for this feature is: [#95939] + +[#95939]: https://github.com/rust-lang/rust/issues/95939 + +------------------------ + +The `debugger_visualizer` attribute can be used to instruct the compiler +to embed a debugger visualizer file into the PDB/ELF generated by `rustc`. + +## Examples + +``` rust,ignore (partial-example) +#![feature(debugger_visualizer)] +#![debugger_visualizer(natvis_file = "foo.natvis")] +struct Foo { + +} +``` + +## Limitations + +Currently, this feature only supports embedding Natvis files on `-windows-msvc` +targets when using the MSVC linker via the `natvis_file` meta item. -- cgit 1.4.1-3-g733a5