Module: wine
Branch: master
Commit: c8006d07eb3211981411cc98c79428b31bc7b506
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c8006d07eb3211981411cc98…
Author: Eric Pouech <eric.pouech(a)gmail.com>
Date: Fri Nov 26 17:30:46 2021 +0100
winedbg: Use debuggee pointer size when extracting typed value.
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
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