]> git.saurik.com Git - apple/objc4.git/blobdiff - runtime/objc-errors.mm
objc4-818.2.tar.gz
[apple/objc4.git] / runtime / objc-errors.mm
index 6d65ca252a835789f925fb3d43857760cb0a47ab..17fdda249dfdc9d702c92250f1fea671bf9bc429 100644 (file)
@@ -76,8 +76,6 @@ void _objc_error(id rcv, const char *fmt, va_list args)
 
 #include <_simple.h>
 
-OBJC_EXPORT void       (*_error)(id, const char *, va_list);
-
 // Return true if c is a UTF8 continuation byte
 static bool isUTF8Continuation(char c)
 {
@@ -160,7 +158,7 @@ static void _objc_syslog(const char *message)
 #if !__OBJC2__
 // used by ExceptionHandling.framework
 #endif
-__attribute__((noreturn))
+__attribute__((noreturn, cold))
 void _objc_error(id self, const char *fmt, va_list ap) 
 { 
     char *buf;
@@ -183,7 +181,7 @@ void __objc_error(id rcv, const char *fmt, ...)
     va_end(vp);
 }
 
-static __attribute__((noreturn))
+static __attribute__((noreturn, cold))
 void _objc_fatalv(uint64_t reason, uint64_t flags, const char *fmt, va_list ap)
 {
     char *buf1;
@@ -200,6 +198,7 @@ void _objc_fatalv(uint64_t reason, uint64_t flags, const char *fmt, va_list ap)
         _Exit(1);
     }
     else {
+        _objc_crashlog(buf1);
         abort_with_reason(OS_REASON_OBJC, reason, buf1, flags);
     }
 }