From 8d4d5038aa8a850d06354a970348aa58cf6d7ac2 Mon Sep 17 00:00:00 2001 From: Alex Dupre Date: Wed, 3 Jul 2013 10:00:40 +0200 Subject: [PATCH] Linux implementation of isRunningUnderDebugger using ptrace() doesn't work on FreeBSD. (I doubt it'll work on Linux, too, but I'm not sure) --- .../beast_core/native/beast_bsd_Threads.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/Subtrees/beast/modules/beast_core/native/beast_bsd_Threads.cpp b/Subtrees/beast/modules/beast_core/native/beast_bsd_Threads.cpp index 5ce0db555..3c7349f4e 100644 --- a/Subtrees/beast/modules/beast_core/native/beast_bsd_Threads.cpp +++ b/Subtrees/beast/modules/beast_core/native/beast_bsd_Threads.cpp @@ -54,20 +54,8 @@ void Process::terminate() BEAST_API bool BEAST_CALLTYPE beast_isRunningUnderDebugger() { - static char testResult = 0; - - if (testResult == 0) - { - testResult = (char) ptrace (PT_TRACE_ME, 0, 0, 0); - - if (testResult >= 0) - { - ptrace (PT_DETACH, 0, (caddr_t) 1, 0); - testResult = 1; - } - } - - return testResult < 0; + bassertfalse; // XXX not implemented for FreeBSD! + return false; } BEAST_API bool BEAST_CALLTYPE Process::isRunningUnderDebugger()