From 16e723fd99965311d1e6608b446e904d971349f6 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Mon, 4 Feb 2019 22:20:06 -0500 Subject: [PATCH] Enable stack trace on Mac --- src/system.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/system.cpp b/src/system.cpp index 7ad24ad3..33874382 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -4,7 +4,7 @@ #include #include -#if defined ARCH_LIN +#if defined ARCH_LIN || defined ARCH_MAC #include #include #include // for backtrace and backtrace_symbols @@ -119,7 +119,7 @@ std::string getStackTrace() { void *stack[stackLen]; std::string s; -#if defined ARCH_LIN +#if defined ARCH_LIN || defined ARCH_MAC stackLen = backtrace(stack, stackLen); char **strings = backtrace_symbols(stack, stackLen); @@ -127,8 +127,6 @@ std::string getStackTrace() { s += string::f("%d: %s\n", stackLen - i - 1, strings[i]); } free(strings); -#elif defined ARCH_MAC - // TODO #elif defined ARCH_WIN HANDLE process = GetCurrentProcess(); SymInitialize(process, NULL, true);