X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/6b200bc335dc93c5516ccb52f14bd896d8c7fad7..dd5fb164cf5b32c462296bc65e289e100f74b59a:/OSX/utilities/src/debugging.h diff --git a/OSX/utilities/src/debugging.h b/OSX/utilities/src/debugging.h index 6a716d53..8c1f411d 100644 --- a/OSX/utilities/src/debugging.h +++ b/OSX/utilities/src/debugging.h @@ -76,31 +76,22 @@ __BEGIN_DECLS #define SECLOG_LEVEL_DEBUG 7 #include -extern os_log_t logObjForScope(const char *scope); /* XXX don't use me, remove */ extern os_log_t secLogObjForScope(const char *scope); +extern os_log_t secLogObjForCFScope(CFStringRef scope); extern bool secLogEnabled(void); extern void secLogDisable(void); extern void secLogEnable(void); #if TARGET_OS_OSX -#define NO_OS_LOG 1 -#ifdef NO_OS_LOG - -// There might be no os_log available. Weak link their internal functions. +// Downstream projects link these, but we no longer use them internally. Keep them here for now. +// Remove weak-linked os_log functions void weak_os_log_impl(void *dso, os_log_t log, os_log_type_t type, const char *format, uint8_t *buf, unsigned int size); -#define _os_log_impl weak_os_log_impl - -#undef os_log_create os_log_t weak_os_log_create(const char *subsystem, const char *category); -#define os_log_create weak_os_log_create - bool weak_os_log_type_enabled(os_log_t oslog, os_log_type_t type); -#define os_log_type_enabled weak_os_log_type_enabled - -#endif // NO_OS_LOG #endif // TARGET_OS_OSX -CFStringRef SecLogAPICreate(bool apiIn, const char *api, CFStringRef format, ...); +CFStringRef SecLogAPICreate(bool apiIn, const char *api, CFStringRef format, ...) + CF_FORMAT_FUNCTION(3, 4); extern const char *api_trace; @@ -163,6 +154,7 @@ void __security_stackshotreport(CFStringRef reason, uint32_t code); #define __sec_exception_code_CKD_nil_pending_keys __sec_exception_code(9) #define __sec_exception_code_SQLiteBusy __sec_exception_code(10) #define __sec_exception_code_CorruptDb(rc) __sec_exception_code(11|((rc)<<8)) +#define __sec_exception_code_Watchdog __sec_exception_code(12) /* For testing only, turns off/on simulated crashes, when turning on, returns number of simulated crashes which were not reported since last turned off. */