Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorAlena Laskavaia2009-03-17 17:08:53 -0400
committerAlena Laskavaia2009-03-17 17:08:53 -0400
commit5b65560b4a7f39570b11728988ca502e71db2887 (patch)
treec57d88bdda249f8e4c6cbce5f9c1a7fb0606dc0b /debug
parent62474d01f853c6d1743455a1148f8347b98a531d (diff)
downloadorg.eclipse.cdt-5b65560b4a7f39570b11728988ca502e71db2887.tar.gz
org.eclipse.cdt-5b65560b4a7f39570b11728988ca502e71db2887.tar.xz
org.eclipse.cdt-5b65560b4a7f39570b11728988ca502e71db2887.zip
[207549] - fixed NumberFormat exception too
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java
index 79ee5e924b..b9ff2d589b 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/type/ArrayValue.java
@@ -44,7 +44,7 @@ public class ArrayValue extends DerivedValue implements ICDIArrayValue, ICDIPoin
public ArrayValue(Variable v, String hexAddress) {
super(v);
if (hexAddress == null || hexAddress.trim().length()==0) {
- this.hexAddress = "0";
+ return;
} else if (hexAddress.startsWith("0x") || hexAddress.startsWith("0X")) {
this.hexAddress = hexAddress.substring(2);
} else {
@@ -102,6 +102,12 @@ public class ArrayValue extends DerivedValue implements ICDIArrayValue, ICDIPoin
* @see org.eclipse.cdt.debug.core.cdi.model.type.ICDIPointerValue#pointerValue()
*/
public BigInteger pointerValue() throws CDIException {
- return new BigInteger(hexAddress, 16);
+ if (hexAddress == null)
+ return null;
+ try {
+ return new BigInteger(hexAddress, 16);
+ } catch (NumberFormatException e) {
+ return null;
+ }
}
}

Back to the top