From e339af5e15cc9c48a500d038cc1ffbec1f51d28d Mon Sep 17 00:00:00 2001 From: Echelon9 Date: Sun, 7 Apr 2013 13:33:44 +1000 Subject: [PATCH] Implementation of RtlAssert() when triggered within emulated program --- src/CxbxKrnl/EmuKrnl.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/CxbxKrnl/EmuKrnl.cpp b/src/CxbxKrnl/EmuKrnl.cpp index 721c5e65f..e4941db70 100644 --- a/src/CxbxKrnl/EmuKrnl.cpp +++ b/src/CxbxKrnl/EmuKrnl.cpp @@ -4115,15 +4115,14 @@ XBSYSAPI EXPORTNUM(264) VOID NTAPI xboxkrnl::RtlAssert DbgPrintf("EmuKrnl (0x%X): RtlAssert\n" "(\n" - " FailedAssertion : 0x%.08X\n" - " FileName : 0x%.08X\n" - " LineNumber : 0x%.08X\n" + " FailedAssertion : 0x%.08X (\"%s\")\n" + " FileName : 0x%.08X (\"%s\")\n" + " LineNumber : 0x%.08X (\"%lu\")\n" " Message : 0x%.08X (\"%s\")\n" ");\n", - GetCurrentThreadId(), FailedAssertion, FileName, LineNumber, Message, Message); + GetCurrentThreadId(), FailedAssertion, FailedAssertion, FileName, FileName, LineNumber, LineNumber, Message, Message); - //TODO: Actually implement this. - //NTSTATUS ret = NtDll::RtlAssert((NtDll::UNICODE_STRING*)DestinationString, (NtDll::STRING*)SourceString, AllocateDestinationString); + CxbxKrnlCleanup("RtlAssert() raised by emulated program - consult Debug log"); EmuSwapFS(); // Xbox FS