Skip to content

Commit

Permalink
Add debug eprintln!s
Browse files Browse the repository at this point in the history
Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu committed Jan 4, 2023
1 parent 11d0621 commit f5b6bee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/detect-targets/src/detect/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ impl BitMaskExt for MACHINE_ATTRIBUTES {
}

fn is_windows_11_or_later() -> bool {
eprintln!("In is_windows_11_or_later");

// Use GetVersionExA which is supported on windows XP
// despite desprecated afte windows 8.
let mut os_ver = OSVERSIONINFOA {
Expand All @@ -41,6 +43,8 @@ fn is_windows_11_or_later() -> bool {

fn is_arch_supported(arch: IMAGE_FILE_MACHINE) -> bool {
if is_windows_11_or_later() {
eprintln!("In is_arch_supported({arch}): is_windows_11_or_late() return true!");

// SAFETY: GetMachineTypeAttributes takes any argument with type
// IMAGE_FILE_MACHINE.
unsafe { GetMachineTypeAttributes(arch.0) }
Expand Down

0 comments on commit f5b6bee

Please sign in to comment.