mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'aql2' of ssh://github.com/triAGENS/ArangoDB into aql2
This commit is contained in:
commit
776cb02f1e
|
@ -44,6 +44,11 @@ Exception::Exception (int code,
|
||||||
_file(file),
|
_file(file),
|
||||||
_line(line),
|
_line(line),
|
||||||
_code(code) {
|
_code(code) {
|
||||||
|
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||||
|
#if HAVE_BACKTRACE
|
||||||
|
_backtrace();
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -59,6 +64,11 @@ Exception::Exception (int code,
|
||||||
_file(file),
|
_file(file),
|
||||||
_line(line),
|
_line(line),
|
||||||
_code(code) {
|
_code(code) {
|
||||||
|
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||||
|
#if HAVE_BACKTRACE
|
||||||
|
_backtrace();
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -246,7 +246,7 @@ static inline void _backtrace(void)
|
||||||
int status = 0;
|
int status = 0;
|
||||||
char * demangled_name = abi::__cxa_demangle(mangled_name, 0, 0, &status);
|
char * demangled_name = abi::__cxa_demangle(mangled_name, 0, 0, &status);
|
||||||
if (status == 0) {
|
if (status == 0) {
|
||||||
fprintf(stderr, "%s %s\n", strings[i], demangled_name);
|
fprintf(stderr, "%s() [%p] %s\n", strings[i], stack_frames[i], demangled_name);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fprintf(stderr, "%s\n", strings[i]);
|
fprintf(stderr, "%s\n", strings[i]);
|
||||||
|
@ -260,7 +260,7 @@ static inline void _backtrace(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fprintf(stderr, "%p\n", stack_frames[i]);
|
fprintf(stderr, "[%p]\n", stack_frames[i]);
|
||||||
}
|
}
|
||||||
free(strings);
|
free(strings);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue