The previous patch was preventing core dumps on failed assertions, but
not on g_error()s.
/* --- functions --- */
-static void _g_log_abort (void) G_GNUC_NORETURN;
+static void _g_log_abort (gboolean breakpoint) G_GNUC_NORETURN;
static void
-_g_log_abort (void)
+_g_log_abort (gboolean breakpoint)
{
if (g_test_subprocess ())
{
*/
_exit (1);
}
+
+ if (breakpoint)
+ G_BREAKPOINT ();
else
abort ();
}
MessageBox (NULL, locale_msg, NULL,
MB_ICONERROR|MB_SETFOREGROUND);
}
- if (IsDebuggerPresent () && !(test_level & G_LOG_FLAG_RECURSION))
- G_BREAKPOINT ();
- else
- _g_log_abort ();
+ _g_log_abort (IsDebuggerPresent () && !(test_level & G_LOG_FLAG_RECURSION));
#else
- if (!(test_level & G_LOG_FLAG_RECURSION))
- G_BREAKPOINT ();
- else
- _g_log_abort ();
+ _g_log_abort (!(test_level & G_LOG_FLAG_RECURSION));
#endif /* !G_OS_WIN32 */
}
line,
pretty_function,
expression);
- _g_log_abort ();
+ _g_log_abort (FALSE);
}
/**