Added support for Windows x64 in Singlepass for Unwind infos

This commit is contained in:
ptitSeb
2022-03-11 16:01:07 +01:00
parent ca6d30fd8e
commit 408847ee75
9 changed files with 378 additions and 26 deletions

View File

@ -13,7 +13,7 @@ use crate::machine::{
use crate::machine_arm64::MachineARM64;
use crate::machine_x64::MachineX86_64;
#[cfg(feature = "unwind")]
use crate::unwind::create_systemv_cie;
use crate::unwind::{create_systemv_cie, UnwindFrame};
#[cfg(feature = "unwind")]
use gimli::write::{EhFrame, FrameTable};
use loupe::MemoryUsage;
@ -249,7 +249,9 @@ impl Compiler for SinglepassCompiler {
let dwarf = if let Some((mut dwarf_frametable, cie_id)) = dwarf_frametable {
for fde in fdes {
if let Some(fde) = fde {
dwarf_frametable.add_fde(cie_id, fde);
match fde {
UnwindFrame::SystemV(fde) => dwarf_frametable.add_fde(cie_id, fde),
}
}
}
let mut eh_frame = EhFrame(WriterRelocate::new(target.triple().endianness().ok()));