diff options
author | Pawel Piech | 2012-09-06 16:47:39 +0000 |
---|---|---|
committer | Pawel Piech | 2012-09-06 16:47:39 +0000 |
commit | c52102b962a7056aff1ded8be06252e56c40a212 (patch) | |
tree | a0c3a64bcdedb5e747bd96b7323af94de21b10e7 /plugins | |
parent | 9dda24ebb26812d0237b74acac8860e09bf1206b (diff) | |
download | org.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')
2 files changed, 7 insertions, 2 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)) { diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeStackFrame.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeStackFrame.java index 904051e0a..4f1c865df 100644 --- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeStackFrame.java +++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeStackFrame.java @@ -108,7 +108,9 @@ public class TCFNodeStackFrame extends TCFNode implements ITCFStackFrame { TCFDataCache<ISymbols.Symbol> sym_cache = model.getSymbolInfoCache(ref.symbol_id); if (!sym_cache.validate(this)) return false; ISymbols.Symbol sym_data = sym_cache.getData(); - if (sym_data != null) func_start = n.equals(JSON.toBigInteger(sym_data.getAddress())); + if (sym_data != null && sym_data.getAddress() != null) { + func_start = n.equals(JSON.toBigInteger(sym_data.getAddress())); + } } if (!func_start) n = n.subtract(BigInteger.valueOf(1)); } |