Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR the ability to include Natvis files into a module's PDB using
Compile.addObjectFile
. This is eventually passed to the linker via the-NATVIS:[file]
flag. Fixes: #19646.This is my first PR that touches the compiler, so review by people working in that area would be great.
Features:
natvis
files for executables.natvis
files specified by any dependency usingCompile.linkLibrary
.Reasons for Inclusion
Issues
There is no way to add visualizers for slices as they have square brackets in their type name, which isn't allowed for C++ types. This is an issue the Rust devs ran into and AFAIK still hasn't been fixed. Note that it is still possible to do
(char*)buf.ptr,[buf.len]s8
for a[]u8
slice when in the debugger.Some types like packed structs/comptime known enums are lowered to their integer representation when debugging, and these base types cannot be selected for visualization.