André Hentschel : winedbg: Copy the x86 implementation of fetch_integer for ARM.
Alexandre Julliard
julliard at winehq.org
Wed Apr 27 12:47:26 CDT 2011
Module: wine
Branch: master
Commit: ac3ed42601f24e9bc79629f34ee8204cb7684738
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ac3ed42601f24e9bc79629f34ee8204cb7684738
Author: André Hentschel <nerv at dawncrow.de>
Date: Tue Apr 26 23:11:06 2011 +0200
winedbg: Copy the x86 implementation of fetch_integer for ARM.
---
programs/winedbg/be_arm.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/programs/winedbg/be_arm.c b/programs/winedbg/be_arm.c
index 0379bd9..f34ecc7 100644
--- a/programs/winedbg/be_arm.c
+++ b/programs/winedbg/be_arm.c
@@ -191,8 +191,21 @@ static int be_arm_adjust_pc_for_break(CONTEXT* ctx, BOOL way)
static int be_arm_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size,
unsigned ext_sign, LONGLONG* ret)
{
- dbg_printf("be_arm_fetch_integer: not done\n");
- return FALSE;
+ if (size != 1 && size != 2 && size != 4 && size != 8) return FALSE;
+
+ memset(ret, 0, sizeof(*ret)); /* clear unread bytes */
+ /* FIXME: this assumes that debuggee and debugger use the same
+ * integral representation
+ */
+ if (!memory_read_value(lvalue, size, ret)) return FALSE;
+
+ /* propagate sign information */
+ if (ext_sign && size < 8 && (*ret >> (size * 8 - 1)) != 0)
+ {
+ ULONGLONG neg = -1;
+ *ret |= neg << (size * 8);
+ }
+ return TRUE;
}
static int be_arm_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
More information about the wine-cvs
mailing list