Skip to content

Commit

Permalink
uclibc can be configured without backtrace support, so check for it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Jones committed Oct 8, 2014
1 parent c02034e commit 1cc389f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions configure.sh
Expand Up @@ -196,6 +196,7 @@ check_header sound/compress_offload.h USE_SNDDRV_COMPRESS_OFFLOAD
check_header linux/kvm.h USE_KVM
check_header linux/seccomp.h USE_SECCOMP
check_header linux/vhost.h USE_VHOST
check_header execinfo.h USE_BACKTRACE

rm -f "$TMP" "$TMP.log" "$TMP.c"

Expand Down
7 changes: 6 additions & 1 deletion debug.c
Expand Up @@ -2,11 +2,14 @@
* Various routines useful for debugging.
*/

#include "config.h"

#ifdef USE_BACKTRACE
#include <execinfo.h>
#endif
#include <stdio.h>
#include <stdarg.h>
#include "child.h"
#include "config.h"
#include "debug.h"
#include "log.h"
#include "params.h"
Expand All @@ -18,6 +21,7 @@

void show_backtrace(void)
{
#ifdef USE_BACKTRACE
unsigned int j, nptrs;
void *buffer[BACKTRACE_SIZE];
char **strings;
Expand All @@ -38,6 +42,7 @@ void show_backtrace(void)
free(strings);
out:
set_dontkillme(getpid(), TRUE);
#endif
}

void __BUG(const char *bugtxt, const char *filename, const char *funcname, unsigned int lineno)
Expand Down

0 comments on commit 1cc389f

Please sign in to comment.