#ifndef _WX_DEBUG_H_
#define _WX_DEBUG_H_
-#if !defined(__WXPALMOS5__) && !defined(__WXWINCE__)
+#if !defined(__WXWINCE__)
#include <assert.h>
#endif // systems without assert.h
/*
A macro which disables asserts for applications compiled in release build.
- By default, IMPLEMENT_APP (or rather IMPLEMENT_WXWIN_MAIN) disable the
+ By default, wxIMPLEMENT_APP (or rather wxIMPLEMENT_WXWIN_MAIN) disable the
asserts in the applications compiled in the release build by calling this.
It does nothing if NDEBUG is not defined.
*/
/*
wxOnAssert() is used by the debugging macros defined below. Different
- overloads are needed because these macros can be used with or without _T().
+ overloads are needed because these macros can be used with or without wxT().
All of them are implemented in src/common/appcmn.cpp and unconditionally
call wxTheAssertHandler so the caller must check that it is non-NULL
#if wxUSE_UNICODE
// these overloads are the ones typically used by debugging macros: we have to
-// provide wxChar* msg version because it's common to use _T() in the macros
+// provide wxChar* msg version because it's common to use wxT() in the macros
// and finally, we can't use const wx(char)* msg = NULL, because that would
// be ambiguous
//
#define wxASSERT_LEVEL_2(cond)
#endif
+// This is simply a wrapper for the standard abort() which is not available
+// under all platforms.
+//
+// It isn't really debug-related but there doesn't seem to be any better place
+// for it, so declare it here and define it in appbase.cpp, together with
+// wxTrap().
+extern void WXDLLIMPEXP_BASE wxAbort();
/*
wxCHECK macros always check their conditions, setting debug level to 0 only
wxCHECK_RET( p != NULL, "pointer can't be NULL" )
*/
-// the generic macro: takes the condition to check, the statement to be execute
+// the generic macro: takes the condition to check, the statement to be executed
// in case the condition is false and the message to pass to the assert handler
#define wxCHECK2_MSG(cond, op, msg) \
if ( cond ) \
/*
Return true if we're running under debugger.
- Currently this only really works under Win32 and Mac in CodeWarrior builds,
- it always returns false in other cases.
+ Currently only really works under Win32 and just returns false elsewhere.
*/
-#if defined(__WXMAC__) || defined(__WIN32__)
+#if defined(__WIN32__)
extern bool WXDLLIMPEXP_BASE wxIsDebuggerRunning();
#else // !Mac
inline bool wxIsDebuggerRunning() { return false; }