float variable display in debugger

eric pouech eric.pouech at wanadoo.fr
Fri Apr 20 14:12:04 CDT 2001


this patch fixes the bug reported by Dimitry (printing of float fails)

A+
-- 
---------------
Eric Pouech (http://perso.wanadoo.fr/eric.pouech/)
"The future will be better tomorrow", Vice President Dan Quayle
-------------- next part --------------
Name: wdbg_float
ChangeLog: Fixed float variables display
GenDate: 2001/04/20 19:05:07 UTC
ModifiedFiles: debugger/types.c
AddedFiles: 
===================================================================
RCS file: /usr/share/cvs/cvsroot/wine/wine/debugger/types.c,v
retrieving revision 1.23
diff -u -u -r1.23 types.c
--- debugger/types.c	2001/02/28 05:31:02	1.23
+++ debugger/types.c	2001/04/20 18:41:04
@@ -380,6 +380,14 @@
 	  && ((rtn >> (value.type->un.basic.basic_size * 8 - 1)) != 0)) {
 	 rtn = rtn | ((-1) << (value.type->un.basic.basic_size * 8));
       }
+      /* float type has to be promoted as a double */
+      if (value.type->un.basic.basic_type == BASIC_FLT) {
+	 float f;
+	 double d;
+	 memcpy(&f, &rtn, sizeof(f));
+	 d = (double)f;
+	 memcpy(&rtn, &d, sizeof(rtn));
+      }
       if (value.type->un.basic.output_format != NULL) {
 	 def_format = value.type->un.basic.output_format;
       }


More information about the wine-patches mailing list