18 #import "NIDebuggingTools.h"
20 #if !defined(__has_feature) || !__has_feature(objc_arc)
21 #error "Nimbus requires ARC support."
27 #if defined(DEBUG) || defined(NI_DEBUG)
30 #import <sys/sysctl.h>
35 struct kinfo_proc info;
41 info.kp_proc.p_flag = 0;
48 mib[2] = KERN_PROC_PID;
54 sysctl(mib,
sizeof(mib) /
sizeof(*mib), &info, &size, NULL, 0);
58 return (info.kp_proc.p_flag & P_TRACED) != 0;
61 #endif // #if defined(DEBUG) || defined(NI_DEBUG)