X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=lib%2Fev-debug.c;h=0173a7da388090023a6f6f7ce160f6e0dec5ebf2;hb=205c689a78e992d1ad3cf9223f7c95bf424dda94;hp=8648e2d59c6401cd81b3f6149c372158e7877063;hpb=16ebda50ec3b3ab96d9bbc3c8e8522b269ef1191;p=evince.git diff --git a/lib/ev-debug.c b/lib/ev-debug.c index 8648e2d5..0173a7da 100644 --- a/lib/ev-debug.c +++ b/lib/ev-debug.c @@ -29,7 +29,9 @@ #include #include #include +#ifdef HAVE_EXECINFO_H #include +#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) {