1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-10-03 14:46:31 +00:00
parent ceff716a39
commit 05e4c79c7c

View file

@ -201,34 +201,43 @@
extern bool JUCE_CALLTYPE juce_isRunningUnderDebugger() throw();
END_JUCE_NAMESPACE
#if JUCE_MSVC || DOXYGEN
#if JUCE_WIN32 || DOXYGEN
#if JUCE_USE_INTRINSICS
#pragma intrinsic (__debugbreak)
/** This will always cause an assertion failure.
It is only compiled in a debug build, (unless JUCE_LOG_ASSERTIONS is enabled
in juce_Config.h).
/** This will try to break the debugger if one is currently hosting this app.
@see jassert()
*/
#define jassertfalse { juce_LogCurrentAssertion; if (juce_isRunningUnderDebugger()) __debugbreak(); }
#define juce_breakDebugger __debugbreak();
#elif JUCE_GCC
/** This will try to break the debugger if one is currently hosting this app.
@see jassert()
*/
#define juce_breakDebugger asm("int $3");
#else
/** This will always cause an assertion failure.
This is only compiled in a debug build.
/** This will try to break the debugger if one is currently hosting this app.
@see jassert()
*/
#define jassertfalse { juce_LogCurrentAssertion; if (juce_isRunningUnderDebugger()) { __asm int 3 } }
#define juce_breakDebugger { __asm int 3 }
#endif
#elif defined (JUCE_MAC)
#define jassertfalse { juce_LogCurrentAssertion; if (juce_isRunningUnderDebugger()) Debugger(); }
#elif defined (JUCE_GCC) || defined (JUCE_LINUX)
#define jassertfalse { juce_LogCurrentAssertion; if (juce_isRunningUnderDebugger()) asm("int $3"); }
#elif JUCE_MAC
#define juce_breakDebugger Debugger();
#elif JUCE_LINUX
#define juce_breakDebugger kill (0, SIGTRAP);
#endif
//==============================================================================
/** This will always cause an assertion failure.
It is only compiled in a debug build, (unless JUCE_LOG_ASSERTIONS is enabled
in juce_Config.h).
@see jassert()
*/
#define jassertfalse { juce_LogCurrentAssertion; if (JUCE_NAMESPACE::juce_isRunningUnderDebugger()) juce_breakDebugger; }
//==============================================================================
/** Platform-independent assertion macro.