about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorridwanabdillahi <91507758+ridwanabdillahi@users.noreply.github.com>2022-04-25 18:02:43 -0700
committerridwanabdillahi <91507758+ridwanabdillahi@users.noreply.github.com>2022-05-03 10:53:54 -0700
commit175a4eab84379cebfc230ea357ae02dc9be39660 (patch)
tree19f4ae4b9b91cb53e6ee05368127daa4fbc88d33 /src/doc
parente1df625306f4136949e02612406f0c60df6008f3 (diff)
downloadrust-175a4eab84379cebfc230ea357ae02dc9be39660.tar.gz
rust-175a4eab84379cebfc230ea357ae02dc9be39660.zip
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<u8>`. 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.
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/unstable-book/src/language-features/debugger-visualizer.md25
1 files changed, 25 insertions, 0 deletions
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.