Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2013-04-14 12:30:09 -0400
committerEugene Tarassov2013-04-14 12:30:09 -0400
commitd71cd8a9992ce8030562c53bcc3372ed91aa1b16 (patch)
tree9e580dc7f5a02fb31999e880a1a6b50e9268d15f
parent2abb5c125ecd87b64eba63da9c6921b28f4974e3 (diff)
downloadorg.eclipse.tcf-d71cd8a9992ce8030562c53bcc3372ed91aa1b16.tar.gz
org.eclipse.tcf-d71cd8a9992ce8030562c53bcc3372ed91aa1b16.tar.xz
org.eclipse.tcf-d71cd8a9992ce8030562c53bcc3372ed91aa1b16.zip
TCF Debugger: workaround for a assertion failure in the Disassembly view
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackend.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackend.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackend.java
index 37df306f7..0742c70ab 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackend.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackend.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2012 Wind River Systems, Inc. and others.
+ * Copyright (c) 2010, 2013 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -549,9 +549,8 @@ public class TCFDisassemblyBackend extends AbstractDisassemblyBackend {
addr_bits = mem.getAddressSize() * 8;
int accessSize = 0;
- BigInteger bit = new BigInteger("1");
- BigInteger mem_end = bit.shiftLeft(addr_bits);
- mem_end = mem_end.subtract(bit);
+ BigInteger mem_end = BigInteger.ONE.shiftLeft(addr_bits);
+ mem_end = mem_end.subtract(BigInteger.ONE);
final BigInteger requestedLineEndAddr = startAddress.add(BigInteger.valueOf(linesHint * mem.getAddressSize()));
@@ -824,7 +823,9 @@ public class TCFDisassemblyBackend extends AbstractDisassemblyBackend {
fCallback.lockScroller();
for (;;) {
AddressRangePosition p = fCallback.getPositionOfAddress(startAddress);
- if (!p.fValid) fCallback.getDocument().insertDisassemblyLine(p, startAddress, 1, "", " ", null, 0);
+ if (p != null && !p.fValid && p.containsAddress(startAddress)) {
+ fCallback.getDocument().insertDisassemblyLine(p, startAddress, 1, "", " ", null, 0);
+ }
startAddress = startAddress.add(BigInteger.ONE);
if (startAddress.compareTo(endAddress) >= 0) break;
}

Back to the top