[Base/Debugging] Replaces x86 hack with arch agnostic Win32 API call
This commit is contained in:
@@ -15,10 +15,7 @@
|
|||||||
namespace xe {
|
namespace xe {
|
||||||
namespace debugging {
|
namespace debugging {
|
||||||
|
|
||||||
bool IsDebuggerAttached() {
|
bool IsDebuggerAttached() { return ::IsDebuggerPresent() != 0; }
|
||||||
return reinterpret_cast<const bool*>(
|
|
||||||
__readgsqword(0x60))[2]; // get BeingDebugged field of PEB
|
|
||||||
}
|
|
||||||
|
|
||||||
void Break() { __debugbreak(); }
|
void Break() { __debugbreak(); }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user