Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2009-09-10 22:13:06 +0000
committereutarass2009-09-10 22:13:06 +0000
commit816936662df7b0627ac35b07ea7b789fabb9fcc9 (patch)
tree45ec3a05616854633081078e6909d52fa4df30ce /plugins/org.eclipse.tm.tcf.debug
parent221852c7957385b8d2ecb42bbc356b0e4cfac353 (diff)
downloadorg.eclipse.tcf-816936662df7b0627ac35b07ea7b789fabb9fcc9.tar.gz
org.eclipse.tcf-816936662df7b0627ac35b07ea7b789fabb9fcc9.tar.xz
org.eclipse.tcf-816936662df7b0627ac35b07ea7b789fabb9fcc9.zip
TCF Debugger:
1. implemented highlighting of changes in expressions and registers views 2. fixed bugs that would prevent views from refreshing properly 3. implemented lazy refresh during step actions
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java4
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java2
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java3
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java3
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java3
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java37
6 files changed, 18 insertions, 34 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java
index 5c2d956b8..960fc98c7 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFAction.java
@@ -38,8 +38,8 @@ public abstract class TCFAction implements Runnable {
launch.addContextAction(this, context_id);
}
- protected void done() {
+ protected void done(String reason) {
assert Protocol.isDispatchThread();
- launch.removeContextAction(this, context_id);
+ launch.removeContextAction(this, context_id, reason);
}
}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java
index 26e48c26d..bd96f0df2 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepInto.java
@@ -154,7 +154,7 @@ public abstract class TCFActionStepInto extends TCFAction implements IRunControl
if (exited) return;
rc.removeListener(this);
exited = true;
- done();
+ done("Step");
}
public void containerResumed(String[] context_ids) {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java
index 962d913ea..070502a34 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOut.java
@@ -75,7 +75,6 @@ public abstract class TCFActionStepOut extends TCFAction implements IRunControl.
return;
}
String id = "Step." + ctx.getID();
- launch.addContextActionBreakpoint(id, "Step");
bp = new HashMap<String,Object>();
bp.put(IBreakpoints.PROP_ID, id);
bp.put(IBreakpoints.PROP_LOCATION, addr.toString());
@@ -108,7 +107,7 @@ public abstract class TCFActionStepOut extends TCFAction implements IRunControl.
}
rc.removeListener(this);
exited = true;
- done();
+ done("Step");
}
public void containerResumed(String[] context_ids) {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java
index d66383cd1..42017502d 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/actions/TCFActionStepOver.java
@@ -114,7 +114,6 @@ public abstract class TCFActionStepOver extends TCFAction implements IRunControl
return;
}
String id = "Step." + ctx.getID();
- launch.addContextActionBreakpoint(id, "Step");
bp = new HashMap<String,Object>();
bp.put(IBreakpoints.PROP_ID, id);
bp.put(IBreakpoints.PROP_LOCATION, addr.toString());
@@ -201,7 +200,7 @@ public abstract class TCFActionStepOver extends TCFAction implements IRunControl
}
rc.removeListener(this);
exited = true;
- done();
+ done("Step");
}
public void containerResumed(String[] context_ids) {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java
index 8064d13ec..607bf0b0d 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java
@@ -249,10 +249,11 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana
@SuppressWarnings("unchecked")
private Set<String> calcMarkerDeltaKeys(IMarker marker, IMarkerDelta delta) throws CoreException {
+ Set<String> keys = new HashSet<String>();
+ if (delta == null) return keys;
assert delta.getKind() == IResourceDelta.CHANGED;
Map<String,Object> m0 = delta.getAttributes();
Map<String,Object> m1 = marker.getAttributes();
- Set<String> keys = new HashSet<String>();
if (m0 != null) keys.addAll(m0.keySet());
if (m1 != null) keys.addAll(m1.keySet());
for (Iterator<String> i = keys.iterator(); i.hasNext();) {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java
index 113354bea..e3eac626a 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java
@@ -59,9 +59,9 @@ public class TCFLaunch extends Launch {
public void onDisconnected(TCFLaunch launch);
- public void onContextActionsStart(TCFLaunch launch);
+ public void onContextActionsStart(TCFLaunch launch, String ctx_id);
- public void onContextActionsDone(TCFLaunch launch);
+ public void onContextActionsDone(TCFLaunch launch, String ctx_id, String result);
public void onProcessOutput(TCFLaunch launch, String process_id, int stream_id, byte[] data);
}
@@ -81,9 +81,7 @@ public class TCFLaunch extends Launch {
private String process_input_stream_id;
private int process_exit_code;
- private int context_action_cnt;
private final HashMap<String,LinkedList<Runnable>> context_action_queue = new HashMap<String,LinkedList<Runnable>>();
- private final HashMap<String,String> context_action_bps = new HashMap<String,String>();
private HashMap<String,String> stream_ids = new HashMap<String,String>();
@@ -645,44 +643,31 @@ public class TCFLaunch extends Launch {
context_action_queue.put(context_id, list);
}
list.add(action);
- context_action_cnt++;
- if (context_action_cnt == 1) {
- for (Listener l : listeners) l.onContextActionsStart(this);
+ if (list.getFirst() == action) {
+ Protocol.invokeLater(action);
+ for (Listener l : listeners) l.onContextActionsStart(this, context_id);
}
- if (list.getFirst() == action) Protocol.invokeLater(action);
}
- public void removeContextAction(TCFAction action, String context_id) {
+ public void removeContextAction(TCFAction action, String context_id, String result) {
assert Protocol.isDispatchThread();
LinkedList<Runnable> list = context_action_queue.get(context_id);
if (list == null) return;
assert list.getFirst() == action;
list.removeFirst();
- context_action_cnt--;
if (!list.isEmpty()) {
- assert context_action_cnt > 0;
Protocol.invokeLater(list.getFirst());
}
- else if (context_action_cnt == 0) {
- for (Listener l : listeners) l.onContextActionsDone(this);
+ else {
+ for (Listener l : listeners) l.onContextActionsDone(this, context_id, result);
}
}
- public void removeContextActions(String context_id) {
+ public void removeContextActions(String context_id, String result) {
assert Protocol.isDispatchThread();
LinkedList<Runnable> list = context_action_queue.remove(context_id);
- if (list == null) return;
- context_action_cnt -= list.size();
- if (context_action_cnt == 0) {
- for (Listener l : listeners) l.onContextActionsDone(this);
+ if (list != null && list.size() > 0) {
+ for (Listener l : listeners) l.onContextActionsDone(this, context_id, result);
}
}
-
- public void addContextActionBreakpoint(String id, String type) {
- context_action_bps.put(id, type);
- }
-
- public String getContextActionBreakpoint(String id) {
- return context_action_bps.get(id);
- }
}

Back to the top