Eric Pouech : winedbg: Fix minidump support on 64bit OSes (don' t clamp addresses out of 64bit minidumps).

Alexandre Julliard julliard at
Fri Apr 16 10:56:06 CDT 2010

Module: wine
Branch: master
Commit: a18fdfc07eeed55fe3d3d157cc3beaa0c38684d3

Author: Eric Pouech <eric.pouech at>
Date:   Thu Apr 15 22:17:04 2010 +0200

winedbg: Fix minidump support on 64bit OSes (don't clamp addresses out of 64bit minidumps).


 programs/winedbg/tgt_minidump.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/programs/winedbg/tgt_minidump.c b/programs/winedbg/tgt_minidump.c
index 41b6f67..f099b4e 100644
--- a/programs/winedbg/tgt_minidump.c
+++ b/programs/winedbg/tgt_minidump.c
@@ -40,9 +40,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(winedbg);
 static struct be_process_io be_process_minidump_io;
-static DWORD64  get_addr64(DWORD64 addr)
+/* we need this function on 32bit hosts to ensure we zero out the higher DWORD
+ * stored in the minidump file (sometimes it's not cleared, or the conversion from
+ * 32bit to 64bit wide integers is done as signed, which is wrong)
+ * So we clamp on 32bit CPUs (as stored in minidump information) all addresses to
+ * keep only the lower 32 bits.
+ * FIXME: as of today, since we don't support a backend CPU which is different from
+ * CPU this process is running on, casting to (DWORD_PTR) will do just fine.
+ */
+static inline DWORD64  get_addr64(DWORD64 addr)
-    return addr & 0xFFFFFFFF;
+    return (DWORD_PTR)addr;
 void minidump_write(const char* file, const EXCEPTION_RECORD* rec)

More information about the wine-cvs mailing list