mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
log filename of faulty module
This commit is contained in:
parent
f83d8f7bad
commit
68faa57a1f
18
src/debug.c
18
src/debug.c
@ -48,10 +48,22 @@ int dbg_exception_handler(EXCEPTION_POINTERS* exception)
|
|||||||
|
|
||||||
if (exception && exception->ExceptionRecord)
|
if (exception && exception->ExceptionRecord)
|
||||||
{
|
{
|
||||||
TRACE(
|
HMODULE mod = NULL;
|
||||||
"Exception at %p (%08X)\n",
|
char filename[MAX_PATH] = { 0 };
|
||||||
|
|
||||||
|
if (GetModuleHandleExA(
|
||||||
|
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
|
||||||
exception->ExceptionRecord->ExceptionAddress,
|
exception->ExceptionRecord->ExceptionAddress,
|
||||||
exception->ExceptionRecord->ExceptionCode);
|
&mod))
|
||||||
|
{
|
||||||
|
GetModuleFileNameA(mod, filename, sizeof(filename) - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
TRACE(
|
||||||
|
"Exception at %p (%08X) %s\n",
|
||||||
|
exception->ExceptionRecord->ExceptionAddress,
|
||||||
|
exception->ExceptionRecord->ExceptionCode,
|
||||||
|
filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
return EXCEPTION_EXECUTE_HANDLER;
|
return EXCEPTION_EXECUTE_HANDLER;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user