diff --git a/src/backtrace/dbghelp.rs b/src/backtrace/dbghelp.rs index d1b76e28..193fc82e 100644 --- a/src/backtrace/dbghelp.rs +++ b/src/backtrace/dbghelp.rs @@ -60,7 +60,7 @@ impl Frame { #[repr(C, align(16))] // required by `CONTEXT`, is a FIXME in winapi right now struct MyContext(CONTEXT); -#[cfg(target_arch = "x86_64")] +#[cfg(any(target_arch = "x86_64", target_arch = "arm64ec"))] impl MyContext { #[inline(always)] fn ip(&self) -> DWORD64 { @@ -122,7 +122,11 @@ impl MyContext { } } -#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] +#[cfg(any( + target_arch = "x86_64", + target_arch = "aarch64", + target_arch = "arm64ec" +))] #[inline(always)] pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) { use core::ptr; diff --git a/src/windows.rs b/src/windows.rs index 268362f6..a95762d3 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -459,7 +459,11 @@ ffi! { } } -#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] +#[cfg(any( + target_arch = "x86_64", + target_arch = "aarch64", + target_arch = "arm64ec" +))] ffi! { #[link(name = "kernel32")] extern "system" { @@ -606,7 +610,7 @@ ffi! { } } -#[cfg(target_arch = "x86_64")] +#[cfg(any(target_arch = "x86_64", target_arch = "arm64ec"))] ffi! { #[repr(C, align(8))] pub struct CONTEXT { @@ -674,7 +678,7 @@ ffi! { } #[repr(C)] -#[cfg(target_arch = "x86_64")] +#[cfg(any(target_arch = "x86_64", target_arch = "arm64ec"))] #[derive(Copy, Clone)] pub struct FLOATING_SAVE_AREA { _Dummy: [u8; 512],