From: Joe Wreschnig Date: Sun, 17 Mar 2013 21:30:02 +0000 (+0100) Subject: isBeingDebugged needs to always be NO in release builds as kinfo_proc offers no ABI... X-Git-Tag: version-1.1~16 X-Git-Url: https://git.yukkurigames.com/?a=commitdiff_plain;h=99bb6bddccccd77d17ef7cc691b370cb727aa1a4;p=enjoyable.git isBeingDebugged needs to always be NO in release builds as kinfo_proc offers no ABI guarantee. --- diff --git a/Categories/NSProcessInfo+Debugging.m b/Categories/NSProcessInfo+Debugging.m index 649de3b..1356ae7 100644 --- a/Categories/NSProcessInfo+Debugging.m +++ b/Categories/NSProcessInfo+Debugging.m @@ -17,6 +17,7 @@ @implementation NSProcessInfo (Debugging) - (BOOL)isBeingDebugged { +#ifdef DEBUG int mib[4]; struct kinfo_proc info; size_t size = sizeof(info); @@ -30,6 +31,9 @@ return sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0) == 0 && (info.kp_proc.p_flag & P_TRACED) != 0; +#else + return NO; +#endif } @end diff --git a/Enjoyable.xcodeproj/project.pbxproj b/Enjoyable.xcodeproj/project.pbxproj index 890b562..74db726 100644 --- a/Enjoyable.xcodeproj/project.pbxproj +++ b/Enjoyable.xcodeproj/project.pbxproj @@ -574,6 +574,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = NO; GCC_C_LANGUAGE_STANDARD = c99; GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; GCC_TREAT_WARNINGS_AS_ERRORS = YES; diff --git a/Info.plist b/Info.plist index 393ccf5..93df827 100644 --- a/Info.plist +++ b/Info.plist @@ -46,7 +46,7 @@ CFBundleSignature ???? CFBundleVersion - 482 + 483 LSApplicationCategoryType public.app-category.utilities NSHumanReadableCopyright