[glib] gmessages: make _g_log_abort() do only breakpoints again



commit bff76bc36ff2b158bb702f9d579e2ff039a252b0
Author: Marc-André Lureau <marcandre lureau gmail com>
Date:   Tue Dec 3 15:35:50 2013 +0100

    gmessages: make _g_log_abort() do only breakpoints again
    
    Commit e53caad4 makes _g_log_abort() noreturn by calling abort()
    unconditionally.
    
    However, it is useful to be able to skip some log_abort() with a
    debugger, to reach a point of interest. Revert back to previous
    behaviour. Make g_assert_warning() noreturn by calling abort().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711800

 glib/gmessages.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/glib/gmessages.c b/glib/gmessages.c
index 0a8dc82..a118002 100644
--- a/glib/gmessages.c
+++ b/glib/gmessages.c
@@ -290,7 +290,7 @@ static gpointer          fatal_log_data;
 
 /* --- functions --- */
 
-static void _g_log_abort (gboolean breakpoint) G_GNUC_NORETURN;
+static void _g_log_abort (gboolean breakpoint);
 
 static void
 _g_log_abort (gboolean breakpoint)
@@ -307,8 +307,8 @@ _g_log_abort (gboolean breakpoint)
 
   if (breakpoint)
     G_BREAKPOINT ();
-
-  abort ();
+  else
+    abort ();
 }
 
 #ifdef G_OS_WIN32
@@ -1130,6 +1130,7 @@ g_assert_warning (const char *log_domain,
         pretty_function,
         expression);
   _g_log_abort (FALSE);
+  abort ();
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]