winedbg: Use copy of be_i386_fetch_float for be_arm_fetch_float (except of long double)

André Hentschel nerv at dawncrow.de
Thu Mar 8 15:28:26 CST 2012


seems long double is double on ARM
---
 programs/winedbg/be_arm.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/programs/winedbg/be_arm.c b/programs/winedbg/be_arm.c
index 0bd5601..c39043c 100644
--- a/programs/winedbg/be_arm.c
+++ b/programs/winedbg/be_arm.c
@@ -237,8 +237,20 @@ static int be_arm_fetch_integer(const struct dbg_lvalue* lvalue, unsigned size,
 static int be_arm_fetch_float(const struct dbg_lvalue* lvalue, unsigned size,
                               long double* ret)
 {
-    dbg_printf("be_arm_fetch_float: not done\n");
-    return FALSE;
+    char        tmp[sizeof(long double)];
+
+    /* FIXME: this assumes that debuggee and debugger use the same
+     * representation for reals
+     */
+    if (!memory_read_value(lvalue, size, tmp)) return FALSE;
+
+    switch (size)
+    {
+    case sizeof(float):         *ret = *(float*)tmp;            break;
+    case sizeof(double):        *ret = *(double*)tmp;           break;
+    default:                    return FALSE;
+    }
+    return TRUE;
 }
 
 struct backend_cpu be_arm =
-- 

Best Regards, André Hentschel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Nachrichtenteil als Anhang
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120308/5da1f144/attachment.ksh>


More information about the wine-patches mailing list