Browse Source

build: look for backtrace_symbols() before enabling the Unix stack

walking code.
legacy
Sam Hocevar sam 12 years ago
parent
commit
586a984498
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      configure.ac
  2. +1
    -1
      src/base/assert.cpp

+ 1
- 1
configure.ac View File

@@ -88,7 +88,7 @@ AC_CHECK_HEADERS(cxxabi.h)
AC_LANG_POP(C++) AC_LANG_POP(C++)


dnl Common C functions dnl Common C functions
AC_CHECK_FUNCS(getcwd _getcwd)
AC_CHECK_FUNCS(getcwd _getcwd backtrace_symbols)




if test "${enable_debug}" = "yes"; then if test "${enable_debug}" = "yes"; then


+ 1
- 1
src/base/assert.cpp View File

@@ -26,7 +26,7 @@ namespace lol


void DumpStack() void DumpStack()
{ {
#if defined HAVE_CXA_DEMANGLE
#if defined HAVE_CXA_DEMANGLE && defined HAVE_BACKTRACE_SYMBOLS
/* Get current stack frames */ /* Get current stack frames */
void *stack_ptrs[50]; void *stack_ptrs[50];
size_t size = backtrace(stack_ptrs, 50); size_t size = backtrace(stack_ptrs, 50);


Loading…
Cancel
Save