对于Windows
, Win32 APIEXCEPTION_POINTERS
被传递到Google-Breakpad
'sMinidumpCallback
中,因此可以很容易地得到这些信息。例如:
MEMORY_BASIC_INFORMATION mbi;
SIZE_T nSize = VirtualQuery (exinfo->ExceptionRecord->ExceptionAddress, &mbi, sizeof(mbi));
if (nSize)
{
auto crashAddress = (DWORD_PTR)exinfo->ExceptionRecord->ExceptionAddress - (DWORD_PTR)mbi.AllocationBase;
WCHAR szModule[MAX_PATH] = L"";
GetModuleFileName((HMODULE)mbi.AllocationBase, szModule, _countof(szModule));
}
是否可以为macOS
and执行此操作Linux
?