ntdll: When an exception happens in DllMain(), print the code.

Also print exceptions from TLS callbacks.
Useful for debugging exceptions that prevent DLLs from loading.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Chip Davis 2018-08-20 13:42:54 -05:00 committed by Alexandre Julliard
parent d4e0f0a12f
commit e6c6874ec3
1 changed files with 4 additions and 4 deletions

View File

@ -1175,8 +1175,8 @@ static void call_tls_callbacks( HMODULE module, UINT reason )
}
__EXCEPT_ALL
{
TRACE_(relay)("\1exception in TLS callback (proc=%p,module=%p,reason=%s,reserved=0)\n",
callback, module, reason_names[reason] );
TRACE_(relay)("\1exception %08x in TLS callback (proc=%p,module=%p,reason=%s,reserved=0)\n",
GetExceptionCode(), callback, module, reason_names[reason] );
return;
}
__ENDTRY
@ -1222,9 +1222,9 @@ static NTSTATUS MODULE_InitDLL( WINE_MODREF *wm, UINT reason, LPVOID lpReserved
}
__EXCEPT_ALL
{
TRACE_(relay)("\1exception in PE entry point (proc=%p,module=%p,reason=%s,res=%p)\n",
entry, module, reason_names[reason], lpReserved );
status = GetExceptionCode();
TRACE_(relay)("\1exception %08x in PE entry point (proc=%p,module=%p,reason=%s,res=%p)\n",
status, entry, module, reason_names[reason], lpReserved );
}
__ENDTRY