From e2a5108657befd0f680242dec5852caa98cb8ae8 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 2 Nov 2024 14:53:30 +0000 Subject: Merge commit '5b1246bb4bed72fd0bb8fa497d8e5ed2c7f3515c' into sync_cg_clif-2024-11-02 --- src/debuginfo/line_info.rs | 7 ++++++- src/debuginfo/mod.rs | 3 ++- src/debuginfo/unwind.rs | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src/debuginfo') diff --git a/src/debuginfo/line_info.rs b/src/debuginfo/line_info.rs index c3d9d635084..fa7b39c836f 100644 --- a/src/debuginfo/line_info.rs +++ b/src/debuginfo/line_info.rs @@ -50,7 +50,12 @@ fn make_file_info(hash: SourceFileHash) -> Option { if hash.kind == SourceFileHashAlgorithm::Md5 { let mut buf = [0u8; MD5_LEN]; buf.copy_from_slice(hash.hash_bytes()); - Some(FileInfo { timestamp: 0, size: 0, md5: buf }) + Some(FileInfo { + timestamp: 0, + size: 0, + md5: buf, + source: None, // FIXME implement -Zembed-source + }) } else { None } diff --git a/src/debuginfo/mod.rs b/src/debuginfo/mod.rs index 79d76925df9..78ae43b1c4d 100644 --- a/src/debuginfo/mod.rs +++ b/src/debuginfo/mod.rs @@ -101,6 +101,7 @@ impl DebugContext { None => (tcx.crate_name(LOCAL_CRATE).to_string(), None), }; + let file_has_md5 = file_info.is_some(); let mut line_program = LineProgram::new( encoding, LineEncoding::default(), @@ -108,7 +109,7 @@ impl DebugContext { LineString::new(name.as_bytes(), encoding, &mut dwarf.line_strings), file_info, ); - line_program.file_has_md5 = file_info.is_some(); + line_program.file_has_md5 = file_has_md5; dwarf.unit.line_program = line_program; diff --git a/src/debuginfo/unwind.rs b/src/debuginfo/unwind.rs index 9399230f292..362333d35a4 100644 --- a/src/debuginfo/unwind.rs +++ b/src/debuginfo/unwind.rs @@ -60,8 +60,8 @@ impl UnwindContext { self.frame_table .add_fde(self.cie_id.unwrap(), unwind_info.to_fde(address_for_func(func_id))); } - UnwindInfo::WindowsX64(_) => { - // FIXME implement this + UnwindInfo::WindowsX64(_) | UnwindInfo::WindowsArm64(_) => { + // Windows does not have debug info for its unwind info. } unwind_info => unimplemented!("{:?}", unwind_info), } -- cgit 1.4.1-3-g733a5