[Base/Debugging] Replaces x86 hack with arch agnostic Win32 API call

This commit is contained in:
Herman S.
2026-03-17 08:13:17 +09:00
parent 61639c8906
commit f3a456d353

View File

@@ -15,10 +15,7 @@
namespace xe {
namespace debugging {
bool IsDebuggerAttached() {
return reinterpret_cast<const bool*>(
__readgsqword(0x60))[2]; // get BeingDebugged field of PEB
}
bool IsDebuggerAttached() { return ::IsDebuggerPresent() != 0; }
void Break() { __debugbreak(); }