Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/tools/compiletest/src/runtest/debuginfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,19 @@ impl TestCx<'_> {
"add-auto-load-safe-path {}\n",
self.output_base_dir().as_str().replace(r"\", r"\\")
));

// GDB visualizer scripts aren't properly embedded on `*-windows-gnu`
// at the moment (see: issue #156687), so we need to load them in
// manually.
#[cfg(target_os = "windows")]

@jieyouxu jieyouxu May 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: does this affect *-windows-msvc targets too? (I will test this later, asking in case you already know)

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically yes, but i don't think it would ever come up since GDB can't handle PDB debug info anyway.

IIRC *-windows-gnu can generate PDB debug info and *-windows-msvc can generate DWARF via a compiler/linker option, but afaik none of the tests do that.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK there are two ways to generate PDB from non-msvc toolchain: by using LLD with specific option or running some third party tool on the final binary.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that we don't currently test that configuration AFAIK, let's go with this for now -- AIUI this is still an improvement from the current situation of the test suite on windows-gnu.

{
script_str.push_str(&format!(
"source {}\n",
self.config
.src_root
.join("src/etc/gdb_load_rust_pretty_printers.py")
));
}
}
}
_ => {
Expand Down
Loading