Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions rts/System/Platform/Mac/CrashHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static void TranslateStackTrace(StackTrace& stacktrace, const int logLevel)
stackFrame.path = "";
}

LOG_L(L_DEBUG, "\tsymbol = \"%s\", path = \"%s\", addr = 0x%lx", stackFrame.symbol.c_str(), path, stackFrame.ip);
LOG_L(L_DEBUG, "\tsymbol = \"%s\", path = \"%s\", addr = %p", stackFrame.symbol.c_str(), path, stackFrame.ip);
}

LOG_L(L_DEBUG, "[%s][2]", __func__);
Expand Down Expand Up @@ -116,7 +116,14 @@ static void TranslateStackTrace(StackTrace& stacktrace, const int logLevel)
execCommandString.clear();
stackFrameIndices.clear();

execCommandBuffer << ADDR2LINE << " -o " << modulePath << " -arch x86_64 -l " << std::hex << addrPathPair.first;
#if defined(__x86_64__) || defined(__amd64__) || defined(_M_X64) || defined(_M_AMD64)
constexpr const char* atosArch = "x86_64";
#elif defined(__aarch64__) || defined(_M_ARM64)
constexpr const char* atosArch = "arm64";
#else
#error "Unsupported architecture"
#endif
execCommandBuffer << ADDR2LINE << " -o " << modulePath << " -arch " << atosArch << " -l " << std::hex << addrPathPair.first;

// insert requested addresses that should be translated by atos
int i = 0;
Expand Down
Loading