Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2015-03-31 23:41:41 -0400
committerEugene Tarassov2015-03-31 23:41:41 -0400
commitcee5c0bea9eb333fa984b8c399f9b0f40cf6baff (patch)
tree24f82a47bf85b8e74cbfd8b8c541a927888815d2 /plugins
parent1d8bbfd5561cc0900a1334dce3766ea691703e9a (diff)
downloadorg.eclipse.tcf-cee5c0bea9eb333fa984b8c399f9b0f40cf6baff.tar.gz
org.eclipse.tcf-cee5c0bea9eb333fa984b8c399f9b0f40cf6baff.tar.xz
org.eclipse.tcf-cee5c0bea9eb333fa984b8c399f9b0f40cf6baff.zip
TCF Debugger: fixed: the Debug view briefly shows bogus stack frame during rapid stepping
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/StackTraceProxy.java6
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeStackFrame.java13
3 files changed, 10 insertions, 11 deletions
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/StackTraceProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/StackTraceProxy.java
index 95286d4ec..6129d675d 100644
--- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/StackTraceProxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/StackTraceProxy.java
@@ -11,7 +11,6 @@
package org.eclipse.tcf.internal.services.remote;
import java.util.Collection;
-import java.util.HashMap;
import java.util.Map;
import org.eclipse.tcf.core.Command;
@@ -31,7 +30,6 @@ public class StackTraceProxy implements IStackTrace {
private final Map<String,Object> props;
Context(Map<String,Object> props) {
- if (props == null) props = new HashMap<String,Object>();
this.props = props;
}
@@ -144,7 +142,9 @@ public class StackTraceProxy implements IStackTrace {
Collection<Map<String,Object>> c = (Collection<Map<String,Object>>)o;
int n = 0;
StackTraceContext[] ctx = new StackTraceContext[c.size()];
- for (Map<String,Object> m : c) ctx[n++] = new Context(m);
+ for (Map<String,Object> m : c) {
+ ctx[n++] = m != null ? new Context(m) : null;
+ }
return ctx;
}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java
index 2e9c12641..15c29a692 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java
@@ -358,7 +358,7 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner, ITCFExe
set(null, state.getError(), null);
return true;
}
- if (s.suspend_pc == null) {
+ if (!s.is_suspended || s.suspend_pc == null) {
set(null, null, null);
return true;
}
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 ba22967c0..ef89ece11 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
@@ -149,12 +149,6 @@ public class TCFNodeStackFrame extends TCFNode implements ITCFStackFrame {
func_info = new TCFData<TCFFunctionRef>(channel) {
@Override
protected boolean startDataRetrieval() {
- if (!address.validate(this)) return false;
- BigInteger n = address.getData();
- if (n == null) {
- set(null, address.getError(), null);
- return true;
- }
if (!stack_trace_context.validate(this)) return false;
IStackTrace.StackTraceContext ctx = stack_trace_context.getData();
if (ctx == null) {
@@ -181,12 +175,17 @@ public class TCFNodeStackFrame extends TCFNode implements ITCFStackFrame {
ref.context_id = mem_ctx_data.getID();
ref.address_size = mem_ctx_data.getAddressSize();
}
- ref.address = n;
ref.symbol_id = func_id;
set(null, null, ref);
}
else {
assert parent.getStackTrace().isValid();
+ if (!address.validate(this)) return false;
+ BigInteger n = address.getData();
+ if (n == null) {
+ set(null, address.getError(), null);
+ return true;
+ }
if (frame_no > 0) n = n.subtract(BigInteger.valueOf(1));
TCFDataCache<TCFFunctionRef> info_cache = mem_node.getFuncInfo(n);
if (info_cache == null) {

Back to the top