[PATCH 5/6] [WineDbg]: don't assert on some lvalue's write conditions

Eric Pouech eric.pouech at orange.fr
Mon Apr 19 15:33:46 CDT 2010




A+
---

 programs/winedbg/memory.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)


diff --git a/programs/winedbg/memory.c b/programs/winedbg/memory.c
index 7aad239..30e854a 100644
--- a/programs/winedbg/memory.c
+++ b/programs/winedbg/memory.c
@@ -121,9 +121,13 @@ BOOL memory_write_value(const struct dbg_lvalue* lvalue, DWORD size, void* value
     BOOL        ret = TRUE;
     DWORD64     os;
 
-    os = ~(DWORD64)size;
-    types_get_info(&lvalue->type, TI_GET_LENGTH, &os);
-    assert(size == os);
+    if (!types_get_info(&lvalue->type, TI_GET_LENGTH, &os)) return FALSE;
+    if (size != os)
+    {
+        dbg_printf("Size mismatch in memory_write_value, got %u from type while expecting %u\n",
+                   (DWORD)os, size);
+        return FALSE;
+    }
 
     /* FIXME: only works on little endian systems */
     if (lvalue->cookie == DLV_TARGET)






More information about the wine-patches mailing list