Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Ryall2008-02-05 22:50:27 +0000
committerKen Ryall2008-02-05 22:50:27 +0000
commit468b4a408282f6479ff9c31bd80937b921f4e9dc (patch)
treea7f72541cf4e0fcbd445091bf228ce895df816b4 /debug/org.eclipse.cdt.debug.core
parent3a0793732b043c95eeac6a85b82b77ea13de7967 (diff)
downloadorg.eclipse.cdt-468b4a408282f6479ff9c31bd80937b921f4e9dc.tar.gz
org.eclipse.cdt-468b4a408282f6479ff9c31bd80937b921f4e9dc.tar.xz
org.eclipse.cdt-468b4a408282f6479ff9c31bd80937b921f4e9dc.zip
Bug 217493.
Diffstat (limited to 'debug/org.eclipse.cdt.debug.core')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java
index 45f4dd374ea..9bf6347f591 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CValue.java
@@ -8,7 +8,7 @@
* Contributors:
* QNX Software Systems - Initial API and implementation
* Mark Mitchell, CodeSourcery - Bug 136896: View variables in binary format
- * Warren Paul (Nokia) - 150860, 150864, 150862, 150863
+ * Warren Paul (Nokia) - 150860, 150864, 150862, 150863, 217493
* Ken Ryall (Nokia) - 207675
*******************************************************************************/
package org.eclipse.cdt.debug.internal.core.model;
@@ -445,7 +445,7 @@ public class CValue extends AbstractCValue {
}
else if ( CVariableFormat.BINARY.equals( format ) ) {
StringBuffer sb = new StringBuffer( "0b" ); //$NON-NLS-1$
- String stringValue = Long.toBinaryString( new Float( floatValue ).longValue() );
+ String stringValue = Long.toBinaryString( Float.floatToIntBits(floatValue) );
sb.append( (stringValue.length() > 32) ? stringValue.substring( stringValue.length() - 32 ) : stringValue );
return sb.toString();
}
@@ -474,7 +474,7 @@ public class CValue extends AbstractCValue {
}
else if ( CVariableFormat.BINARY.equals( format ) ) {
StringBuffer sb = new StringBuffer( "0b" ); //$NON-NLS-1$
- String stringValue = Long.toHexString( new Double( doubleValue ).longValue() );
+ String stringValue = Long.toBinaryString( Double.doubleToLongBits(doubleValue) );
sb.append( (stringValue.length() > 64) ? stringValue.substring( stringValue.length() - 64 ) : stringValue );
return sb.toString();
}

Back to the top