1//
2//  debugging_internal.h
3//  libsecurity_utilities
4//
5//  Created by ohjelmoija on 11/27/12.
6//
7//
8
9#ifndef libsecurity_utilities_debugging_internal_h
10#define libsecurity_utilities_debugging_internal_h
11
12
13#ifdef __cplusplus
14extern "C"
15{
16#endif // __cplusplus
17
18//
19// Include DTrace static probe definitions
20//
21typedef const void *DTException;
22
23#include <security_utilities/utilities_dtrace.h>
24
25//
26// The debug-log macro is now unconditionally emitted as a DTrace static probe point.
27//
28
29void secdebug_internal(const char* scope, const char* format, ...);
30
31#define secdebug(scope, format...) secdebug_internal(scope, format)
32#define secdebugf(scope, __msg)	SECURITY_DEBUG_LOG((char *)(scope), (__msg))
33
34//
35// The old secdelay() macro is also emitted as a DTrace probe (use destructive actions to handle this).
36// Secdelay() should be considered a legacy feature; just put a secdebug at the intended delay point.
37//
38#define secdelay(file)	SECURITY_DEBUG_DELAY((char *)(file))
39
40
41#ifdef __cplusplus
42};
43#endif // __cplusplus
44
45#endif
46