[glib] gbacktrace: fix G_BREAKPOINT on Darwin (OSX, iOS)
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gbacktrace: fix G_BREAKPOINT on Darwin (OSX, iOS)
- Date: Thu, 9 Jul 2015 14:41:22 +0000 (UTC)
commit 27fae8390946e73e8343a7fd7505796f3599ee23
Author: Ilya Konstantinov <ilya konstantinov gmail com>
Date: Thu Jun 11 21:42:00 2015 +0300
gbacktrace: fix G_BREAKPOINT on Darwin (OSX, iOS)
Using __builtin_trap() according to Apple's own documentation:
https://developer.apple.com/library/mac/technotes/tn2124/_index.html#//apple_ref/doc/uid/DTS10003391-CH1-SECCONTROLLEDCRASH
https://bugzilla.gnome.org/show_bug.cgi?id=750807
glib/gbacktrace.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/glib/gbacktrace.h b/glib/gbacktrace.h
index 03b6029..1a4f534 100644
--- a/glib/gbacktrace.h
+++ b/glib/gbacktrace.h
@@ -55,6 +55,8 @@ void g_on_error_stack_trace (const gchar *prg_name);
# define G_BREAKPOINT() G_STMT_START{ __debugbreak(); }G_STMT_END
#elif defined (__alpha__) && !defined(__osf__) && defined (__GNUC__) && __GNUC__ >= 2
# define G_BREAKPOINT() G_STMT_START{ __asm__ __volatile__ ("bpt"); }G_STMT_END
+#elif defined (__APPLE__)
+# define G_BREAKPOINT() G_STMT_START{ __builtin_trap(); }G_STMT_END
#else /* !__i386__ && !__alpha__ */
# define G_BREAKPOINT() G_STMT_START{ raise (SIGTRAP); }G_STMT_END
#endif /* __i386__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]