[RTL][KERNEL32] Move the STUB printing code to a place where it's actually called

This commit is contained in:
Mark Jansen 2021-05-22 16:33:19 +02:00
parent 1c97b84600
commit b58c3d73ca
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
2 changed files with 14 additions and 11 deletions

View file

@ -107,6 +107,13 @@ PrintStackTrace(IN PEXCEPTION_POINTERS ExceptionInfo)
DbgPrint("Faulting Address: %8x\n", ExceptionRecord->ExceptionInformation[1]);
}
/* Trace the wine special error and show the modulename and functionname */
if (ExceptionRecord->ExceptionCode == 0x80000100 /* EXCEPTION_WINE_STUB */ &&
ExceptionRecord->NumberParameters == 2)
{
DbgPrint("Missing function: %s!%s\n", (PSZ)ExceptionRecord->ExceptionInformation[0], (PSZ)ExceptionRecord->ExceptionInformation[1]);
}
_dump_context(ContextRecord);
_module_name_from_addr(ExceptionRecord->ExceptionAddress, &StartAddr, szMod, sizeof(szMod), &szModFile);
DbgPrint("Address:\n<%s:%x> (%s@%x)\n",
@ -730,17 +737,6 @@ RaiseException(IN DWORD dwExceptionCode,
DPRINT1("Exception text: %lx\n", ExceptionRecord.ExceptionInformation[2]);
}
/* Trace the wine special error and show the modulename and functionname */
if (dwExceptionCode == 0x80000100 /* EXCEPTION_WINE_STUB */)
{
/* Numbers of parameter must be equal to two */
if (ExceptionRecord.NumberParameters == 2)
{
DPRINT1("Missing function in : %s\n", ExceptionRecord.ExceptionInformation[0]);
DPRINT1("with the functionname : %s\n", ExceptionRecord.ExceptionInformation[1]);
}
}
/* Raise the exception */
RtlRaiseException(&ExceptionRecord);
}

View file

@ -251,6 +251,13 @@ static VOID
DbgPrint("Faulting Address: %8x\n", ExceptionRecord->ExceptionInformation[1]);
}
/* Trace the wine special error and show the modulename and functionname */
if (ExceptionRecord->ExceptionCode == 0x80000100 /* EXCEPTION_WINE_STUB */ &&
ExceptionRecord->NumberParameters == 2)
{
DbgPrint("Missing function: %s!%s\n", (PSZ)ExceptionRecord->ExceptionInformation[0], (PSZ)ExceptionRecord->ExceptionInformation[1]);
}
_dump_context(ContextRecord);
_module_name_from_addr(ExceptionRecord->ExceptionAddress, &StartAddr, szMod, sizeof(szMod));
DbgPrint("Address:\n %8x+%-8x %s\n",