1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

[248141] Support for binary format in the memory service.

This commit is contained in:
Marc Khouzam 2008-09-22 14:26:10 +00:00
parent 3e3b711def
commit a8d8c8514d

View file

@ -409,12 +409,16 @@ public class DsfMemoryBlockRetrieval extends PlatformObject implements IMemoryBl
base = 16;
offset = 2;
}
// Check for "binarity"
else if (expression.startsWith("0b")) { //$NON-NLS-1$
base = 2;
offset = 2;
}
// Check for "octality"
else if (expression.startsWith("0")) { //$NON-NLS-1$
base = 8;
offset = 1;
}
// Now, try to parse the expression. If a NumberFormatException is
// thrown, then it wasn't a simple numerical expression and we go
// to plan B (attempt an expression evaluation)