59 #ifndef ID_ENABLE_DEBUGGING 60 #error ID_ENABLE_DEBUGGING is not defined in DEBUG. 65 #if !defined( _lint) && !defined( __GNUC__) 66 #define COMPILE_CHECK(p) {struct _CC {char a[(p) ? 1 : -1];};} 0 68 #define COMPILE_CHECK(p) 73 #ifdef ID_ENABLE_DEBUGGING 75 typedef void (*ShowAssertFnc)(
const char* msg);
76 RUNTIME_DECL
void ClientShowAssert(
const char* msg);
77 RUNTIME_DECL
void ServerShowAssert(
const char* msg);
80 typedef void (*ShowAssertFnc)(
const char* mesg,
const char* file, int32 line);
81 RUNTIME_DECL
void ClientShowAssert(
const char* mesg,
const char* file, int32 line);
82 RUNTIME_DECL
void ServerShowAssert(
const char* mesg,
const char* file, int32 line);
85 typedef void (*ShowAssertFnc)(
const char* msg);
86 RUNTIME_DECL
void ClientShowAssert(
const char* msg);
88 RUNTIME_DECL
void InitializeDebugging(ShowAssertFnc showAssertFnc);
89 RUNTIME_DECL
void TerminateDebugging();
91 RUNTIME_DECL
void BreakToDebugger();
92 RUNTIME_DECL
void BreakStrToDebugger(
const char* mesg,
const char* file = nil, int32 line = 0);
94 RUNTIME_DECL bool16 IsDebuggerRunning();
97 RUNTIME_DECL DebugLog& GetTraceLog();
98 RUNTIME_DECL bool16 GetLogAsserts();
99 RUNTIME_DECL
void SetLogAsserts(bool16 arg);
100 RUNTIME_DECL bool16 GetBreakOnAssert();
101 RUNTIME_DECL
void SetBreakOnAssert(bool16 val);
103 RUNTIME_DECL bool16 GetIntenseDebugging();
104 RUNTIME_DECL
void SetIntenseDebugging(bool16 intense);
105 RUNTIME_DECL bool16 GetDisableCloseVerify();
106 RUNTIME_DECL
void SetDisableCloseVerify(bool16 disable);
107 RUNTIME_DECL bool16 GetSuppressDebugUI();
108 RUNTIME_DECL
void SetSuppressDebugUI(bool16 suppress);
111 RUNTIME_DECL
void ASSERT_STD_FUNC(
const char* message,
const char* file, int32 line);
112 #define ASSERT(p) !(p) ? ASSERT_STD_FUNC(#p, __FILE__, __LINE__) : (void) 0 115 #define ASSERT_UNIMPLEMENTED() ASSERT_UNIMPLEMENTED_FUNC(__FILE__, __LINE__) 116 RUNTIME_DECL
void ASSERT_UNIMPLEMENTED_FUNC(
const char* file, int32 line);
119 RUNTIME_DECL
char *FORMAT_ARGS(
const char *msg, ...);
120 RUNTIME_DECL
void ASSERT_FUNC(
const char* str,
const char* file, int32 line);
121 #define ASSERT_MSG(p,msg) !(p) ? ASSERT_FUNC((msg), __FILE__, __LINE__) : (void) 0 122 #define ASSERT_FAIL(msg) ASSERT_FUNC((msg), __FILE__, __LINE__) 126 #define ASSERT_MSG(p, msg) ((void) 0) 127 #define ASSERT(p) ((void) 0) 128 #define ASSERT_UNIMPLEMENTED() ((void) 0) 129 #define ASSERT_FAIL(msg) ((void) 0) 130 #define ASSERT_STD_FUNC(p, file, line) ((void) 0) 131 #define ASSERT_FUNC(p, file, line) ((void) 0)