+
+ asprintf(&buf2, "objc[%d]: %s\n", getpid(), buf1);
+ _objc_crashlog(buf2);
+
+ free(buf2);
+ free(buf1);
+}
+
+
+/*
+ * Like calling both _objc_inform and _objc_inform_on_crash.
+ */
+__private_extern__ void _objc_inform_now_and_on_crash(const char *fmt, ...)
+{
+ va_list ap;
+ char *buf1;
+ char *buf2;
+
+ va_start (ap,fmt);
+ vasprintf(&buf1, fmt, ap);
+ va_end (ap);
+
+ asprintf(&buf2, "objc[%d]: %s\n", getpid(), buf1);
+ _objc_crashlog(buf2);
+ _objc_syslog(buf2);
+
+ free(buf2);
+ free(buf1);
+}
+
+
+/* Kill the process in a way that generates a crash log.
+ * This is better than calling exit(). */
+static void _objc_trap(void)
+{
+ __builtin_trap();
+}
+
+/* Try to keep _objc_warn_deprecated out of crash logs
+ * caused by _objc_trap(). rdar://4546883 */
+__attribute__((used))
+static void _objc_trap2(void)
+{
+ __builtin_trap();
+}
+
+__private_extern__ void _objc_warn_deprecated(const char *old, const char *new)
+{
+ if (PrintDeprecation) {
+ if (new) {
+ _objc_inform("The function %s is obsolete. Use %s instead. Set a breakpoint on _objc_warn_deprecated to find the culprit.", old, new);
+ } else {
+ _objc_inform("The function %s is obsolete. Do not use it. Set a breakpoint on _objc_warn_deprecated to find the culprit.", old);
+ }
+ }
+}
+
+
+/* Entry points for breakable errors. For some reason, can't inhibit the compiler's inlining aggression.
+ */
+
+__private_extern__ void objc_assign_ivar_error(id base, ptrdiff_t offset) {
+}
+
+__private_extern__ void objc_assign_global_error(id value, id *slot) {
+}
+
+__private_extern__ void objc_exception_during_finalize_error(void) {