Skip to content

Commit 97f75ae

Browse files
fix: guard breakpoint() with x86 check for ARM64 Windows support
The breakpoint() function uses x86-specific intrinsics (__stosb, __movsb) and x86 debug registers (Dr0, Dr7 from CONTEXT) that don't exist on ARM64 Windows. This causes compilation to fail when targeting aarch64-pc-windows-msvc. Added the same #if (!x86) return false; #endif guard that msr() already uses.
1 parent a343d7c commit 97f75ae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/vmaware.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11956,6 +11956,9 @@ struct VM {
1195611956
* @implements VM::BREAKPOINT
1195711957
*/
1195811958
[[nodiscard]] static bool breakpoint() {
11959+
#if (!x86)
11960+
return false;
11961+
#endif
1195911962
const HMODULE ntdll = util::get_ntdll();
1196011963
if (!ntdll) return false;
1196111964

0 commit comments

Comments
 (0)