CVS: winex/dlls/dbghelp stack.c,1.3,1.4

[email protected] 27 Nov 2007 18:38:04 -0000
Newsgroups gmane.comp.emulators.winex.cvs
Message-ID <[email protected]>
Subject: winex/dlls/dbghelp stack.c,1.3,1.4Update of /var/lib/cvsd/cvsroot/winex/dlls/dbghelp
In directory agravaine:/tmp/cvs-serv27405/dlls/dbghelp

Modified Files:
	stack.c 
Log Message:
added better trace information when a 64-bit address is detected
trac #2298

- improved the trace for when a 64-bit address is detected during a stack trace.  

Signed-off-by: David De Pauw
Signed-off-by: Mark Adams


Index: stack.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/dlls/dbghelp/stack.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- stack.c	30 Aug 2007 14:17:01 -0000	1.3
+++ stack.c	27 Nov 2007 18:38:02 -0000	1.4
@@ -117,8 +117,19 @@
 
 static inline void addr_64to32(const ADDRESS64* addr64, ADDRESS* addr32)
 {
-    if (addr64->Offset >> 32)
-        ERR("detected a 64-bit address!\n");
+    if (addr64->Offset >> 32){
+        const char *mode = "";
+
+
+        switch (addr64->Mode){
+            case AddrMode1616: mode = "1616"; break;
+            case AddrMode1632: mode = "1632"; break;
+            case AddrModeReal: mode = "Real"; break;
+            case AddrModeFlat: mode = "Flat"; break;
+        }
+
+        ERR("detected a 64-bit address! {addr64 = <mode = %s, segment = 0x%04x, offset = 0x%016llx>}\n", mode, addr64->Segment, addr64->Offset);
+    }
 
     addr32->Offset = (ULONG)addr64->Offset;
     addr32->Segment = addr64->Segment;