X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/c38e3ce98599a410a47dc10253faa4d5830f13b2..427c49bcad63d042b29ada2ac27e3dfc4845c779:/libsecurity_utilities/lib/debugging_internal.h diff --git a/libsecurity_utilities/lib/debugging_internal.h b/libsecurity_utilities/lib/debugging_internal.h new file mode 100644 index 00000000..01996792 --- /dev/null +++ b/libsecurity_utilities/lib/debugging_internal.h @@ -0,0 +1,45 @@ +// +// debugging_internal.h +// libsecurity_utilities +// +// Created by ohjelmoija on 11/27/12. +// +// + +#ifndef libsecurity_utilities_debugging_internal_h +#define libsecurity_utilities_debugging_internal_h + + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// +// Include DTrace static probe definitions +// +typedef const void *DTException; + +#include + +// +// The debug-log macro is now unconditionally emitted as a DTrace static probe point. +// + +void secdebug_internal(const char* scope, const char* format, ...); + +#define secdebug(scope, format...) secdebug_internal(scope, format) +#define secdebugf(scope, __msg) SECURITY_DEBUG_LOG((char *)(scope), (__msg)) + +// +// The old secdelay() macro is also emitted as a DTrace probe (use destructive actions to handle this). +// Secdelay() should be considered a legacy feature; just put a secdebug at the intended delay point. +// +#define secdelay(file) SECURITY_DEBUG_DELAY((char *)(file)) + + +#ifdef __cplusplus +}; +#endif // __cplusplus + +#endif