diff options
Diffstat (limited to 'include/my_stacktrace.h')
-rw-r--r-- | include/my_stacktrace.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/my_stacktrace.h b/include/my_stacktrace.h index 63e97dbc4f2..20b86f45232 100644 --- a/include/my_stacktrace.h +++ b/include/my_stacktrace.h @@ -1,5 +1,6 @@ /* Copyright (c) 2001, 2011, Oracle and/or its affiliates. + Copyright (c) 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -41,19 +42,21 @@ C_MODE_START #if defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE) -void my_init_stacktrace(int setup_handlers); void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack, my_bool silent); int my_safe_print_str(const char* val, size_t max_len); void my_write_core(int sig); -#if BACKTRACE_DEMANGLE +# if BACKTRACE_DEMANGLE char *my_demangle(const char *mangled_name, int *status); -#endif /* BACKTRACE_DEMANGLE */ -#ifdef __WIN__ +# endif /* BACKTRACE_DEMANGLE */ +# ifdef __WIN__ +# define my_setup_stacktrace() void my_set_exception_pointers(EXCEPTION_POINTERS *ep); -#endif /* __WIN__ */ +# else +void my_setup_stacktrace(void); +# endif /* __WIN__ */ #else -#define my_init_stacktrace(A) do { } while(0) +# define my_setup_stacktrace() #endif /* ! (defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE)) */ #ifndef _WIN32 |