Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-08-29 20:40:07 (GMT)
committer Christian Persch <chpe@src.gnome.org>2005-08-29 20:40:07 (GMT)
commit8d0f9c8819f0b6fa8b2801909ba343f5407d8b67 (patch)
tree5108e797feb59391ef093e43e3cfaf5338dcdc77 /lib
parent7e66514ee0e1d7ef5b02ac09e789fccc11728db4 (diff)
Check for execinfo.h and use it only if it exists.
2005-08-29 Christian Persch <chpe@cvs.gnome.org> * configure.ac: * lib/ev-debug.c: (trap_handler): Check for execinfo.h and use it only if it exists.
Diffstat (limited to 'lib')
-rw-r--r--lib/ev-debug.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ev-debug.c b/lib/ev-debug.c
index 8648e2d..0173a7d 100644
--- a/lib/ev-debug.c
+++ b/lib/ev-debug.c
@@ -29,7 +29,9 @@
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
+#endif
static GHashTable *ev_profilers_hash = NULL;
static const char *ev_profile_modules = NULL;
@@ -98,11 +100,15 @@ trap_handler (const char *log_domain,
{
if (strcmp (ev_debug_break, "stack") == 0)
{
+#ifdef HAVE_EXECINFO_H
void *array[MAX_DEPTH];
size_t size;
size = backtrace (array, MAX_DEPTH);
backtrace_symbols_fd (array, size, 2);
+#else
+ g_on_error_stack_trace (g_get_prgname ());
+#endif
}
else if (strcmp (ev_debug_break, "trap") == 0)
{