mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 217493.
This commit is contained in:
parent
3a0793732b
commit
468b4a4082
1 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue