Skip to content

Commit

Permalink
Append .dwp to the binary filename instead of replacing the existing …
Browse files Browse the repository at this point in the history
…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).
  • Loading branch information
khuey committed Jan 17, 2023
1 parent 61a415b commit 783caf3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 783caf3

Please sign in to comment.