diff options
| author | Kyle Huey <khuey@kylehuey.com> | 2023-01-13 06:29:46 -0800 |
|---|---|---|
| committer | Kyle Huey <khuey@kylehuey.com> | 2023-01-16 17:49:16 -0800 |
| commit | 783caf3702fa28aeeaebd413eb9072399506eab1 (patch) | |
| tree | 089a4e7351a259c515c645e533a18dfc46a73c86 /compiler/rustc_codegen_ssa/src/back | |
| parent | 61a415be590113b4935464ef0aaf3b4e7713a077 (diff) | |
| download | rust-783caf3702fa28aeeaebd413eb9072399506eab1.tar.gz rust-783caf3702fa28aeeaebd413eb9072399506eab1.zip | |
Append .dwp to the binary filename instead of replacing the existing extension.
gdb et al. expect to find the dwp file at <binary>.dwp, even if <binary> already has an extension (e.g. libfoo.so's dwp is expected to be at libfoo.so.dwp).
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 8ca7103ed48..06dbeac2850 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -599,7 +599,8 @@ fn link_dwarf_object<'a>( cg_results: &CodegenResults, executable_out_filename: &Path, ) { - let dwp_out_filename = executable_out_filename.with_extension("dwp"); + let mut dwp_out_filename = executable_out_filename.to_path_buf().into_os_string(); + dwp_out_filename.push(".dwp"); debug!(?dwp_out_filename, ?executable_out_filename); #[derive(Default)] |
