mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 06:48:41 +00:00
build fix for msvc 2017
This commit is contained in:
@@ -110,7 +110,7 @@ win32_dialog_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, LONG_PT
|
||||
}
|
||||
|
||||
internal LONG WINAPI
|
||||
win32_exception_filter(EXCEPTION_POINTERS* exception_info)
|
||||
win32_exception_filter(EXCEPTION_POINTERS* exception_ptrs)
|
||||
{
|
||||
if(g_is_quiet)
|
||||
{
|
||||
@@ -129,7 +129,7 @@ win32_exception_filter(EXCEPTION_POINTERS* exception_info)
|
||||
WCHAR buffer[4096] = {0};
|
||||
int buflen = 0;
|
||||
|
||||
DWORD exception_code = exception_info->ExceptionRecord->ExceptionCode;
|
||||
DWORD exception_code = exception_ptrs->ExceptionRecord->ExceptionCode;
|
||||
buflen += wnsprintfW(buffer + buflen, sizeof(buffer) - buflen, L"A fatal exception (code 0x%x) occurred. The process is terminating.\n", exception_code);
|
||||
|
||||
// load dbghelp dynamically just in case if it is missing
|
||||
@@ -139,9 +139,9 @@ win32_exception_filter(EXCEPTION_POINTERS* exception_info)
|
||||
DWORD (WINAPI *dbg_SymSetOptions)(DWORD SymOptions);
|
||||
BOOL (WINAPI *dbg_SymInitializeW)(HANDLE hProcess, PCWSTR UserSearchPath, BOOL fInvadeProcess);
|
||||
BOOL (WINAPI *dbg_StackWalk64)(DWORD MachineType, HANDLE hProcess, HANDLE hThread,
|
||||
LPSTACKFRAME64 StackFrame, PVOID ContextRecord, PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine,
|
||||
PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine, PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine,
|
||||
PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress);
|
||||
LPSTACKFRAME64 StackFrame, PVOID ContextRecord, PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine,
|
||||
PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine, PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine,
|
||||
PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress);
|
||||
PVOID (WINAPI *dbg_SymFunctionTableAccess64)(HANDLE hProcess, DWORD64 AddrBase);
|
||||
DWORD64 (WINAPI *dbg_SymGetModuleBase64)(HANDLE hProcess, DWORD64 qwAddr);
|
||||
BOOL (WINAPI *dbg_SymFromAddrW)(HANDLE hProcess, DWORD64 Address, PDWORD64 Displacement, PSYMBOL_INFOW Symbol);
|
||||
@@ -161,7 +161,7 @@ win32_exception_filter(EXCEPTION_POINTERS* exception_info)
|
||||
{
|
||||
HANDLE process = GetCurrentProcess();
|
||||
HANDLE thread = GetCurrentThread();
|
||||
CONTEXT* context = exception_info->ContextRecord;
|
||||
CONTEXT* context = exception_ptrs->ContextRecord;
|
||||
|
||||
dbg_SymSetOptions(SYMOPT_EXACT_SYMBOLS | SYMOPT_FAIL_CRITICAL_ERRORS | SYMOPT_LOAD_LINES | SYMOPT_UNDNAME);
|
||||
if(dbg_SymInitializeW(process, L"", TRUE))
|
||||
@@ -180,7 +180,7 @@ win32_exception_filter(EXCEPTION_POINTERS* exception_info)
|
||||
if(!raddbg_pdb_valid)
|
||||
{
|
||||
buflen += wnsprintfW(buffer + buflen, sizeof(buffer) - buflen,
|
||||
L"\nraddbg.pdb debug file is not valid or not found. Please rebuild binary to get call stack.\n");
|
||||
L"\nraddbg.pdb debug file is not valid or not found. Please rebuild binary to get call stack.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -229,8 +229,8 @@ win32_exception_filter(EXCEPTION_POINTERS* exception_info)
|
||||
if(idx==0)
|
||||
{
|
||||
buflen += wnsprintfW(buffer + buflen, sizeof(buffer) - buflen,
|
||||
L"\nPress Ctrl+C to copy this text to clipboard, then create a new issue in\n"
|
||||
L"<a href=\"%S\">%S</a>\n\n", RADDBG_GITHUB_ISSUES, RADDBG_GITHUB_ISSUES);
|
||||
L"\nPress Ctrl+C to copy this text to clipboard, then create a new issue in\n"
|
||||
L"<a href=\"%S\">%S</a>\n\n", RADDBG_GITHUB_ISSUES, RADDBG_GITHUB_ISSUES);
|
||||
buflen += wnsprintfW(buffer + buflen, sizeof(buffer) - buflen, L"Call stack:\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user