return psz;
}
-#ifdef _M_IX86
+
static VOID
_dump_context(PCONTEXT pc)
{
+#ifdef _M_IX86
/*
* Print out the CPU registers
*/
DbgPrint("EDX: %.8x EBP: %.8x ESI: %.8x ESP: %.8x\n", pc->Edx,
pc->Ebp, pc->Esi, pc->Esp);
DbgPrint("EDI: %.8x EFLAGS: %.8x\n", pc->Edi, pc->EFlags);
-}
+#elif defined(_M_AMD64)
+ DbgPrint("CS:EIP %x:%I64x\n", pc->SegCs&0xffff, pc->Rip );
+ DbgPrint("DS %x ES %x FS %x GS %x\n", pc->SegDs&0xffff, pc->SegEs&0xffff,
+ pc->SegFs&0xffff, pc->SegGs&0xfff);
+ DbgPrint("RAX: %I64x RBX: %I64x RCX: %I64x RDI: %I64x\n", pc->Rax, pc->Rbx, pc->Rcx, pc->Rdi);
+ DbgPrint("RDX: %I64x RBP: %I64x RSI: %I64x RSP: %I64x\n", pc->Rdx, pc->Rbp, pc->Rsi, pc->Rsp);
+ DbgPrint("R8: %I64x R9: %I64x R10: %I64x R11: %I64x\n", pc->R8, pc->R9, pc->R10, pc->R11);
+ DbgPrint("R12: %I64x R13: %I64x R14: %I64x R15: %I64x\n", pc->R12, pc->R13, pc->R14, pc->R15);
+ DbgPrint("EFLAGS: %.8x\n", pc->EFlags);
#else
#warning Unknown architecture
-static VOID
-_dump_context(PCONTEXT pc)
-{
-}
#endif
+}
static LONG
BasepCheckForReadOnlyResource(IN PVOID Ptr)
LONG RetValue;
HANDLE DebugPort = NULL;
NTSTATUS ErrCode;
- ULONG ErrorParameters[4];
+ ULONG_PTR ErrorParameters[4];
ULONG ErrorResponse;
if ((NTSTATUS)ExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_ACCESS_VIOLATION &&
if ((GetErrorMode() & SEM_NOGPFAULTERRORBOX) == 0)
{
-#ifdef _X86_
+#ifdef __i386__
PULONG Frame;
#endif
PVOID StartAddr;
ExceptionInfo->ExceptionRecord->ExceptionAddress,
_module_name_from_addr(ExceptionInfo->ExceptionRecord->ExceptionAddress, &StartAddr, szMod, sizeof(szMod)));
_dump_context ( ExceptionInfo->ContextRecord );
-#ifdef _X86_
+#ifdef __i386__
DbgPrint("Frames:\n");
_SEH2_TRY
{
/* Save exception code and address */
ErrorParameters[0] = (ULONG)ExceptionInfo->ExceptionRecord->ExceptionCode;
- ErrorParameters[1] = (ULONG)ExceptionInfo->ExceptionRecord->ExceptionAddress;
+ ErrorParameters[1] = (ULONG_PTR)ExceptionInfo->ExceptionRecord->ExceptionAddress;
if ((NTSTATUS)ExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_ACCESS_VIOLATION)
{
{
DPRINT1("Delphi Exception at address: %p\n", ExceptionRecord.ExceptionInformation[0]);
DPRINT1("Exception-Object: %p\n", ExceptionRecord.ExceptionInformation[1]);
- DPRINT1("Exception text: %s\n", ExceptionRecord.ExceptionInformation[2]);
+ DPRINT1("Exception text: %s\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 */