[PATCH 7/9] programs/winedbg: use debuggee pointer size when extracting typed value

Eric Pouech eric.pouech at gmail.com
Fri Nov 26 10:30:46 CST 2021


Signed-off-by: Eric Pouech <eric.pouech at gmail.com>

---
 programs/winedbg/types.c   |    3 ++-
 programs/winedbg/winedbg.c |    1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/programs/winedbg/types.c b/programs/winedbg/types.c
index 354c97e5d70..5e9188ccc6e 100644
--- a/programs/winedbg/types.c
+++ b/programs/winedbg/types.c
@@ -105,7 +105,8 @@ LONGLONG types_extract_as_longlong(const struct dbg_lvalue* lvalue,
         if (issigned) *issigned = s;
         break;
     case SymTagPointerType:
-        if (!dbg_curr_process->be_cpu->fetch_integer(lvalue, sizeof(void*), s = FALSE, &rtn))
+        if (!types_get_info(&type, TI_GET_LENGTH, &size) ||
+            !dbg_curr_process->be_cpu->fetch_integer(lvalue, (unsigned)size, s = FALSE, &rtn))
             RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL);
         break;
     case SymTagArrayType:
diff --git a/programs/winedbg/winedbg.c b/programs/winedbg/winedbg.c
index 0d4a38b2d83..55801536a79 100644
--- a/programs/winedbg/winedbg.c
+++ b/programs/winedbg/winedbg.c
@@ -44,7 +44,6 @@
  * - type management:
  *      + some bits of internal types are missing (like type casts and the address
  *        operator)
- *      + most of the code implies that sizeof(void*) = sizeof(int)
  *      + all computations should be made on long long
  *              o expr computations are in int:s
  *              o bitfield size is on a 4-bytes




More information about the wine-devel mailing list