Skip to content

Commit

Permalink
Attempt to fix arm32 Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbai committed Dec 20, 2024
1 parent 26ab4af commit f1e48a6
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/windows_sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,51 @@ pub struct CONTEXT {
pub SegSs: u32,
pub ExtendedRegisters: [u8; 512],
}

cfg_if::cfg_if! {
if #[cfg(target_arch = "arm")] {
pub const ARM_MAX_BREAKPOINTS: usize = 8;
pub const ARM_MAX_WATCHPOINTS: usize = 1;

#[repr(C)]
#[derive(Clone, Copy)]
pub struct CONTEXT_u([u64; 32]);

#[repr(C)]
#[derive(Clone, Copy)]
pub struct CONTEXT {
pub ContextFlags: u32,
pub R0: u32,
pub R1: u32,
pub R2: u32,
pub R3: u32,
pub R4: u32,
pub R5: u32,
pub R6: u32,
pub R7: u32,
pub R8: u32,
pub R9: u32,
pub R10: u32,
pub R11: u32,
pub R12: u32,
pub Sp: u32,
pub Lr: u32,
pub Pc: u32,
pub Cpsr: u32,
pub Fpsrc: u32,
pub Padding: u32,
pub u: CONTEXT_u,
pub Bvr: [u32; ARM_MAX_BREAKPOINTS],
pub Bcr: [u32; ARM_MAX_BREAKPOINTS],
pub Wvr: [u32; ARM_MAX_WATCHPOINTS],
pub Wcr: [u32; ARM_MAX_WATCHPOINTS],
pub Padding2: [u32; 2],
}

pub const IMAGE_FILE_MACHINE_ARMNT: IMAGE_FILE_MACHINE = 0x01c4;
}
}

pub type CONTEXT_FLAGS = u32;
pub const CP_UTF8: u32 = 65001u32;
pub type CREATE_TOOLHELP_SNAPSHOT_FLAGS = u32;
Expand Down

0 comments on commit f1e48a6

Please sign in to comment.