Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2012-09-06 16:47:39 +0000
committerPawel Piech2012-09-06 16:47:39 +0000
commitc52102b962a7056aff1ded8be06252e56c40a212 (patch)
treea0c3a64bcdedb5e747bd96b7323af94de21b10e7 /plugins/org.eclipse.tcf.cdt.ui
parent9dda24ebb26812d0237b74acac8860e09bf1206b (diff)
downloadorg.eclipse.tcf-c52102b962a7056aff1ded8be06252e56c40a212.tar.gz
org.eclipse.tcf-c52102b962a7056aff1ded8be06252e56c40a212.tar.xz
org.eclipse.tcf-c52102b962a7056aff1ded8be06252e56c40a212.zip
Bug 388973 - Guard against ISymbols.Symbol.getAddress() returning null.
Diffstat (limited to 'plugins/org.eclipse.tcf.cdt.ui')
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/disassembly/TCFDisassemblyBackend.java5
1 files changed, 4 insertions, 1 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 dbde49a71..73f7a7b93 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
@@ -598,7 +598,9 @@ public class TCFDisassemblyBackend extends AbstractDisassemblyBackend {
public void doneGetContext(IToken token, Exception error, ISymbols.Symbol context) {
BigInteger nextAddress = null;
if (error == null && context != null) {
- if (context.getTypeClass().equals(ISymbols.TypeClass.function)) {
+ if (context.getTypeClass().equals(ISymbols.TypeClass.function) &&
+ context.getAddress() != null && context.getSize() >= 0)
+ {
symbolList.add(context);
nextAddress = JSON.toBigInteger(context.getAddress()).add(BigInteger.valueOf(context.getSize()));
}
@@ -800,6 +802,7 @@ public class TCFDisassemblyBackend extends AbstractDisassemblyBackend {
private FunctionOffset getFunctionOffset(BigInteger address, ISymbols.Symbol[] symbols) {
if (symbols != null) {
for (ISymbols.Symbol symbol : symbols) {
+ if (symbol.getAddress() == null) continue;
BigInteger symbolAddress = JSON.toBigInteger(symbol.getAddress());
BigInteger offset = address.subtract(symbolAddress);
switch (offset.compareTo(BigInteger.ZERO)) {

Back to the top