mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Merge from 5.0
This commit is contained in:
commit
7a14bfa52d
3 changed files with 22 additions and 3 deletions
|
@ -2094,7 +2094,7 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
|
|||
sighold sigset sigthreadmask port_create sleep \
|
||||
snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
|
||||
strtol strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr \
|
||||
posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd)
|
||||
posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd printstack)
|
||||
|
||||
#
|
||||
#
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
(defined(__alpha__) && defined(__GNUC__))
|
||||
#define HAVE_STACKTRACE 1
|
||||
#endif
|
||||
#elif defined(__WIN__)
|
||||
#elif defined(__WIN__) || defined(__sun)
|
||||
#define HAVE_STACKTRACE 1
|
||||
#endif
|
||||
|
||||
|
|
|
@ -63,7 +63,26 @@ void my_safe_print_str(const char* name, const char* val, int max_len)
|
|||
fputc('\n', stderr);
|
||||
}
|
||||
|
||||
#if HAVE_BACKTRACE && (HAVE_BACKTRACE_SYMBOLS || HAVE_BACKTRACE_SYMBOLS_FD)
|
||||
#if defined(HAVE_PRINTSTACK)
|
||||
|
||||
/* Use Solaris' symbolic stack trace routine. */
|
||||
#include <ucontext.h>
|
||||
|
||||
void my_print_stacktrace(uchar* stack_bottom __attribute__((unused)),
|
||||
ulong thread_stack __attribute__((unused)))
|
||||
{
|
||||
if (printstack(fileno(stderr)) == -1)
|
||||
fprintf(stderr, "Error when traversing the stack, stack appears corrupt.\n");
|
||||
else
|
||||
fprintf(stderr,
|
||||
"Please read "
|
||||
"http://dev.mysql.com/doc/refman/5.1/en/resolve-stack-dump.html\n"
|
||||
"and follow instructions on how to resolve the stack trace.\n"
|
||||
"Resolved stack trace is much more helpful in diagnosing the\n"
|
||||
"problem, so please do resolve it\n");
|
||||
}
|
||||
|
||||
#elif HAVE_BACKTRACE && (HAVE_BACKTRACE_SYMBOLS || HAVE_BACKTRACE_SYMBOLS_FD)
|
||||
|
||||
#if BACKTRACE_DEMANGLE
|
||||
|
||||
|
|
Loading…
Reference in a new issue