[PATCH] ntdll: When an exception happens in DllMain(), print the code.
Chip Davis
cdavis at codeweavers.com
Mon Aug 20 13:42:54 CDT 2018
Also print exceptions from TLS callbacks.
Useful for debugging exceptions that prevent DLLs from loading.
Signed-off-by: Chip Davis <cdavis at codeweavers.com>
---
dlls/ntdll/loader.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 8d18af8b86..26b2431047 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -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
--
2.18.0
More information about the wine-devel
mailing list