Fixup choice of easylogging++ vs libunwind stack trace code

This commit is contained in:
moneromooo-monero 2017-02-12 12:03:01 +00:00
parent cb54eeaa31
commit 422ecc98e4
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
3 changed files with 7 additions and 3 deletions

View File

@ -51,8 +51,9 @@
#define ELPP_THREAD_SAFE #define ELPP_THREAD_SAFE
#define ELPP_DEFAULT_LOG_FILE "" #define ELPP_DEFAULT_LOG_FILE ""
#ifndef __ANDROID__ #if !defined __GNUC__ || defined __MINGW32__ || defined __MINGW64__ || defined __ANDROID__
#define ELPP_STACKTRACE_ON_CRASH 0 #else
#define ELPP_STACKTRACE_ON_CRASH 1
#endif #endif
#define ELPP_DISABLE_DEFAULT_CRASH_HANDLING #define ELPP_DISABLE_DEFAULT_CRASH_HANDLING
#define ELPP_FEATURE_CRASH_LOG 1 #define ELPP_FEATURE_CRASH_LOG 1

View File

@ -198,12 +198,15 @@ ELPP_INTERNAL_DEBUGGING_OUT_INFO << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStre
# if (ELPP_COMPILER_GCC && !ELPP_MINGW) # if (ELPP_COMPILER_GCC && !ELPP_MINGW)
# define ELPP_STACKTRACE 1 # define ELPP_STACKTRACE 1
# else # else
# define ELPP_STACKTRACE 0
# if ELPP_COMPILER_MSVC # if ELPP_COMPILER_MSVC
# pragma message("Stack trace not available for this compiler") # pragma message("Stack trace not available for this compiler")
# else # else
# warning "Stack trace not available for this compiler"; # warning "Stack trace not available for this compiler";
# endif // ELPP_COMPILER_MSVC # endif // ELPP_COMPILER_MSVC
# endif // ELPP_COMPILER_GCC # endif // ELPP_COMPILER_GCC
#else
# define ELPP_STACKTRACE 0
#endif // (defined(ELPP_STACKTRACE_ON_CRASH)) #endif // (defined(ELPP_STACKTRACE_ON_CRASH))
// Miscellaneous macros // Miscellaneous macros
#define ELPP_UNUSED(x) (void)x #define ELPP_UNUSED(x) (void)x

View File

@ -26,7 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#if !defined __GNUC__ || defined __MINGW32__ || defined __MINGW64__ #if !defined __GNUC__ || defined __MINGW32__ || defined __MINGW64__ || defined __ANDROID__
#define USE_UNWIND #define USE_UNWIND
#endif #endif