Skip to content

Commit f8bef52

Browse files
committed
arm64ec
1 parent 0249531 commit f8bef52

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/backtrace/dbghelp.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl Frame {
6060
#[repr(C, align(16))] // required by `CONTEXT`, is a FIXME in winapi right now
6161
struct MyContext(CONTEXT);
6262

63-
#[cfg(target_arch = "x86_64")]
63+
#[cfg(any(target_arch = "x86_64", target_arch = "arm64ec"))]
6464
impl MyContext {
6565
#[inline(always)]
6666
fn ip(&self) -> DWORD64 {
@@ -122,7 +122,11 @@ impl MyContext {
122122
}
123123
}
124124

125-
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
125+
#[cfg(any(
126+
target_arch = "x86_64",
127+
target_arch = "aarch64",
128+
target_arch = "arm64ec"
129+
))]
126130
#[inline(always)]
127131
pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
128132
use core::ptr;

src/windows.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,11 @@ ffi! {
447447
}
448448
}
449449

450-
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
450+
#[cfg(any(
451+
target_arch = "x86_64",
452+
target_arch = "aarch64",
453+
target_arch = "arm64ec"
454+
))]
451455
ffi! {
452456
#[link(name = "kernel32")]
453457
extern "system" {
@@ -594,7 +598,7 @@ ffi! {
594598
}
595599
}
596600

597-
#[cfg(target_arch = "x86_64")]
601+
#[cfg(any(target_arch = "x86_64", target_arch = "arm64ec"))]
598602
ffi! {
599603
#[repr(C, align(8))]
600604
pub struct CONTEXT {
@@ -662,7 +666,7 @@ ffi! {
662666
}
663667

664668
#[repr(C)]
665-
#[cfg(target_arch = "x86_64")]
669+
#[cfg(any(target_arch = "x86_64", target_arch = "arm64ec"))]
666670
#[derive(Copy, Clone)]
667671
pub struct FLOATING_SAVE_AREA {
668672
_Dummy: [u8; 512],

0 commit comments

Comments
 (0)