diff options
author | redfish <redfish@galactica.pw> | 2016-07-27 01:02:55 -0400 |
---|---|---|
committer | redfish <redfish@galactica.pw> | 2016-07-27 01:52:33 -0400 |
commit | 0f990d018357413d5eab36b361aa9236e6b8795d (patch) | |
tree | 1edefa3a7155bfae589e9bd34b9da3e4ddc444f1 /src/common/stack_trace.cpp | |
parent | Merge pull request #928 (diff) | |
download | monero-0f990d018357413d5eab36b361aa9236e6b8795d.tar.xz |
cmake,common: flag for stack trace
By default the flag is enabled whenever libunwind is found on the
system, with the exception of static build on OSX (for which we can't
install the throw hook #932 due to lack of support for --wrap in OSX
ld64 linker).
Diffstat (limited to 'src/common/stack_trace.cpp')
-rw-r--r-- | src/common/stack_trace.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/common/stack_trace.cpp b/src/common/stack_trace.cpp index 44002e2d5..4387d4ffd 100644 --- a/src/common/stack_trace.cpp +++ b/src/common/stack_trace.cpp @@ -28,10 +28,8 @@ #include "common/stack_trace.h" #include "misc_log_ex.h" -#ifdef HAVE_LIBUNWIND #define UNW_LOCAL_ONLY #include <libunwind.h> -#endif #include <cxxabi.h> #ifndef STATICLIB #include <dlfcn.h> @@ -96,7 +94,6 @@ void set_stack_trace_log(const std::string &log) void log_stack_trace(const char *msg) { -#ifdef HAVE_LIBUNWIND unw_context_t ctx; unw_cursor_t cur; unw_word_t ip, off; @@ -136,7 +133,6 @@ void log_stack_trace(const char *msg) LOG_PRINT2(log, " " << std::setw(4) << level << std::setbase(16) << std::setw(20) << "0x" << ip << " " << (!status && dsym ? dsym : sym) << " + " << "0x" << off, LOG_LEVEL_0); free(dsym); } -#endif } } // namespace tools |