https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bff6dda91dbccf5c9885626c7cf3f1ee0db77a69

commit bff6dda91dbccf5c9885626c7cf3f1ee0db77a69
Author:     Mark Jansen <[email protected]>
AuthorDate: Thu Feb 28 23:10:43 2019 +0100
Commit:     Mark Jansen <[email protected]>
CommitDate: Wed Mar 6 23:04:11 2019 +0100

    [DRWTSN32] Print some extra exception info
---
 base/applications/drwtsn32/sysinfo.cpp | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/base/applications/drwtsn32/sysinfo.cpp 
b/base/applications/drwtsn32/sysinfo.cpp
index f52c58b2cb..84bc023a53 100644
--- a/base/applications/drwtsn32/sysinfo.cpp
+++ b/base/applications/drwtsn32/sysinfo.cpp
@@ -59,8 +59,20 @@ void PrintSystemInfo(FILE* output, DumpData& data)
     xfprintf(output, "    When: %d/%d/%d @ %02d:%02d:%02d.%d" NEWLINE,
              LocalTime.wDay, LocalTime.wMonth, LocalTime.wYear,
              LocalTime.wHour, LocalTime.wMinute, LocalTime.wSecond, 
LocalTime.wMilliseconds);
-    DWORD ExceptionCode = data.ExceptionInfo.ExceptionRecord.ExceptionCode;
-    xfprintf(output, "    Exception number: 0x%8x (%s)" NEWLINE, 
ExceptionCode, Exception2Str(ExceptionCode));
+
+    xfprintf(output, "    First chance: %u" NEWLINE, 
data.ExceptionInfo.dwFirstChance);
+    EXCEPTION_RECORD& Record = data.ExceptionInfo.ExceptionRecord;
+    xfprintf(output, "    Exception number: 0x%08x (%s)" NEWLINE, 
Record.ExceptionCode, Exception2Str(Record.ExceptionCode));
+    xfprintf(output, "    Exception flags: 0x%08x" NEWLINE, 
Record.ExceptionFlags);
+    xfprintf(output, "    Exception address: %p" NEWLINE, 
Record.ExceptionAddress);
+    if (Record.NumberParameters)
+    {
+        xfprintf(output, "    Exception parameters: %u" NEWLINE, 
Record.NumberParameters);
+        for (DWORD n = 0; n < std::min<DWORD>(EXCEPTION_MAXIMUM_PARAMETERS, 
Record.NumberParameters); ++n)
+        {
+            xfprintf(output, "      Parameter %u: 0x%p" NEWLINE, n, 
Record.ExceptionInformation[n]);
+        }
+    }
 
     char Buffer[MAX_PATH];
     DWORD count = sizeof(Buffer);

Reply via email to