Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2012-11-06 22:54:29 +0000
committerEugene Tarassov2012-11-07 16:52:49 +0000
commit7335ed8d26592cd499b7fb607eace4502f8e71e1 (patch)
tree39945d80746b360f105c827e4f3602815ca701b2 /plugins
parent79506b78e36d7223653d4bae92bdca43e66c6db3 (diff)
downloadorg.eclipse.tcf-7335ed8d26592cd499b7fb607eace4502f8e71e1.tar.gz
org.eclipse.tcf-7335ed8d26592cd499b7fb607eace4502f8e71e1.tar.xz
org.eclipse.tcf-7335ed8d26592cd499b7fb607eace4502f8e71e1.zip
TCF Debugger: fixed wrong stack trace data for a function that never returns
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeStackFrame.java20
1 files changed, 5 insertions, 15 deletions
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 8c45984bc..2eeb39ca3 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
@@ -100,20 +100,7 @@ public class TCFNodeStackFrame extends TCFNode implements ITCFStackFrame {
set(null, address.getError(), null);
return true;
}
- if (frame_no > 0) {
- boolean func_start = false;
- if (!func_info.validate(this)) return false;
- TCFFunctionRef ref = func_info.getData();
- if (ref != null && ref.symbol_id != null) {
- 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 (!func_start) n = n.subtract(BigInteger.valueOf(1));
- }
+ if (frame_no > 0) n = n.subtract(BigInteger.valueOf(1));
TCFDataCache<TCFNodeExecContext> mem_cache = ((TCFNodeExecContext)parent).getMemoryNode();
if (!mem_cache.validate(this)) return false;
if (mem_cache.getError() != null || mem_cache.getData() == null) {
@@ -139,6 +126,7 @@ public class TCFNodeStackFrame extends TCFNode implements ITCFStackFrame {
set(null, address.getError(), null);
return true;
}
+ if (frame_no > 0) n = n.subtract(BigInteger.valueOf(1));
TCFDataCache<TCFNodeExecContext> mem_cache = ((TCFNodeExecContext)parent).getMemoryNode();
if (!mem_cache.validate(this)) return false;
if (mem_cache.getError() != null || mem_cache.getData() == null) {
@@ -338,9 +326,11 @@ public class TCFNodeStackFrame extends TCFNode implements ITCFStackFrame {
if (!map_dc.validate(done)) return false;
TCFNodeExecContext.MemoryRegion[] map = map_dc.getData();
if (map != null) {
+ BigInteger n = addr;
+ if (frame_no > 0) n = n.subtract(BigInteger.valueOf(1));
for (TCFNodeExecContext.MemoryRegion r : map) {
String fnm = r.region.getFileName();
- if (fnm != null && r.contains(addr)) {
+ if (fnm != null && r.contains(n)) {
fnm = fnm.replace('\\', '/');
int x = fnm.lastIndexOf('/');
if (x >= 0) fnm = fnm.substring(x + 1);

Back to the top