mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 15:06:14 +01:00
in case we have to abort the program, debugging is enabled and we are not
Mon Sep 13 23:25:59 1999 Tim Janik <timj@gtk.org> * gmessages.c (g_logv): in case we have to abort the program, debugging is enabled and we are not called recursively, try to abort with raise (SIGTRAP) first, so developers may ignore certain failure conditions during debugging stage.
This commit is contained in:
parent
ebeb32f252
commit
6072e65caf
@ -1,3 +1,10 @@
|
||||
Mon Sep 13 23:25:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmessages.c (g_logv): in case we have to abort the program,
|
||||
debugging is enabled and we are not called recursively, try
|
||||
to abort with raise (SIGTRAP) first, so developers may ignore
|
||||
certain failure conditions during debugging stage.
|
||||
|
||||
Thu Aug 26 15:09:36 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* Makefile.am:
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Sep 13 23:25:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmessages.c (g_logv): in case we have to abort the program,
|
||||
debugging is enabled and we are not called recursively, try
|
||||
to abort with raise (SIGTRAP) first, so developers may ignore
|
||||
certain failure conditions during debugging stage.
|
||||
|
||||
Thu Aug 26 15:09:36 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* Makefile.am:
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Sep 13 23:25:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmessages.c (g_logv): in case we have to abort the program,
|
||||
debugging is enabled and we are not called recursively, try
|
||||
to abort with raise (SIGTRAP) first, so developers may ignore
|
||||
certain failure conditions during debugging stage.
|
||||
|
||||
Thu Aug 26 15:09:36 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* Makefile.am:
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Sep 13 23:25:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmessages.c (g_logv): in case we have to abort the program,
|
||||
debugging is enabled and we are not called recursively, try
|
||||
to abort with raise (SIGTRAP) first, so developers may ignore
|
||||
certain failure conditions during debugging stage.
|
||||
|
||||
Thu Aug 26 15:09:36 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* Makefile.am:
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Sep 13 23:25:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmessages.c (g_logv): in case we have to abort the program,
|
||||
debugging is enabled and we are not called recursively, try
|
||||
to abort with raise (SIGTRAP) first, so developers may ignore
|
||||
certain failure conditions during debugging stage.
|
||||
|
||||
Thu Aug 26 15:09:36 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* Makefile.am:
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Sep 13 23:25:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmessages.c (g_logv): in case we have to abort the program,
|
||||
debugging is enabled and we are not called recursively, try
|
||||
to abort with raise (SIGTRAP) first, so developers may ignore
|
||||
certain failure conditions during debugging stage.
|
||||
|
||||
Thu Aug 26 15:09:36 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* Makefile.am:
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Sep 13 23:25:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmessages.c (g_logv): in case we have to abort the program,
|
||||
debugging is enabled and we are not called recursively, try
|
||||
to abort with raise (SIGTRAP) first, so developers may ignore
|
||||
certain failure conditions during debugging stage.
|
||||
|
||||
Thu Aug 26 15:09:36 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* Makefile.am:
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Sep 13 23:25:59 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gmessages.c (g_logv): in case we have to abort the program,
|
||||
debugging is enabled and we are not called recursively, try
|
||||
to abort with raise (SIGTRAP) first, so developers may ignore
|
||||
certain failure conditions during debugging stage.
|
||||
|
||||
Thu Aug 26 15:09:36 1999 Tim Janik <timj@gtk.org>
|
||||
|
||||
* Makefile.am:
|
||||
|
@ -40,6 +40,7 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef NATIVE_WIN32
|
||||
# define STRICT
|
||||
@ -387,7 +388,16 @@ g_logv (const gchar *log_domain,
|
||||
/* *domain can be cluttered now */
|
||||
|
||||
if (test_level & G_LOG_FLAG_FATAL)
|
||||
abort ();
|
||||
{
|
||||
#if defined (G_ENABLE_DEBUG) && defined (SIGTRAP)
|
||||
if (!(test_level & G_LOG_FLAG_RECURSION))
|
||||
raise (SIGTRAP);
|
||||
else
|
||||
abort ();
|
||||
#else /* !G_ENABLE_DEBUG || !SIGTRAP */
|
||||
abort ();
|
||||
#endif /* !G_ENABLE_DEBUG || !SIGTRAP */
|
||||
}
|
||||
|
||||
depth--;
|
||||
g_private_set (g_log_depth, GUINT_TO_POINTER (depth));
|
||||
|
12
gmessages.c
12
gmessages.c
@ -40,6 +40,7 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef NATIVE_WIN32
|
||||
# define STRICT
|
||||
@ -387,7 +388,16 @@ g_logv (const gchar *log_domain,
|
||||
/* *domain can be cluttered now */
|
||||
|
||||
if (test_level & G_LOG_FLAG_FATAL)
|
||||
abort ();
|
||||
{
|
||||
#if defined (G_ENABLE_DEBUG) && defined (SIGTRAP)
|
||||
if (!(test_level & G_LOG_FLAG_RECURSION))
|
||||
raise (SIGTRAP);
|
||||
else
|
||||
abort ();
|
||||
#else /* !G_ENABLE_DEBUG || !SIGTRAP */
|
||||
abort ();
|
||||
#endif /* !G_ENABLE_DEBUG || !SIGTRAP */
|
||||
}
|
||||
|
||||
depth--;
|
||||
g_private_set (g_log_depth, GUINT_TO_POINTER (depth));
|
||||
|
Loading…
Reference in New Issue
Block a user