Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2008-06-05 22:41:36 +0000
committereutarass2008-06-05 22:41:36 +0000
commit81d6d2bfffbc7b2ab33cf9d6dc3938dfdd99f597 (patch)
treec0cad43ffba1462902dfdd18a0f8352229e52e65 /plugins/org.eclipse.tm.tcf.debug
parent72cddcac552c4ae7d945157e34bd5d737d6e801d (diff)
downloadorg.eclipse.tcf-81d6d2bfffbc7b2ab33cf9d6dc3938dfdd99f597.tar.gz
org.eclipse.tcf-81d6d2bfffbc7b2ab33cf9d6dc3938dfdd99f597.tar.xz
org.eclipse.tcf-81d6d2bfffbc7b2ab33cf9d6dc3938dfdd99f597.zip
1. Java and agent code updated to match latest Breakpoints service specifications.
2. Breakpoint status is implemented
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/model/TCFBreakpoint.java2
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsModel.java6
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java15
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java2
4 files changed, 14 insertions, 11 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java
index c86c9c635..387fb170a 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpoint.java
@@ -86,7 +86,7 @@ public class TCFBreakpoint extends Breakpoint {
if (marker == null) return null;
StringBuffer bf = new StringBuffer();
String address = marker.getAttribute(
- ITCFConstants.ID_TCF_DEBUG_MODEL + '.' + IBreakpoints.PROP_ADDRESS, null);
+ ITCFConstants.ID_TCF_DEBUG_MODEL + '.' + IBreakpoints.PROP_LOCATION, null);
if (address != null && address.length() > 0) {
bf.append("PC = ");
BigInteger n = new BigInteger(address, 10);
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 a38779f98..904358a3a 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
@@ -65,7 +65,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana
return true;
}
- private String getBreakpointID(IBreakpoint bp) throws CoreException {
+ public String getBreakpointID(IBreakpoint bp) throws CoreException {
IMarker marker = bp.getMarker();
String id = (String)marker.getAttributes().get(ITCFConstants.ID_TCF_DEBUG_MODEL + '.' + IBreakpoints.PROP_ID);
if (id != null) return id;
@@ -331,7 +331,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana
m.put(IBreakpoint.PERSISTED, Boolean.TRUE);
m.put(IBreakpoint.ID, ITCFConstants.ID_TCF_DEBUG_MODEL);
String msg = "";
- if (p.get(IBreakpoints.PROP_ADDRESS) != null) msg += p.get(IBreakpoints.PROP_ADDRESS);
+ if (p.get(IBreakpoints.PROP_LOCATION) != null) msg += p.get(IBreakpoints.PROP_LOCATION);
m.put(IMarker.MESSAGE, "Breakpoint: " + msg);
Number line = (Number)p.get(IBreakpoints.PROP_LINE);
if (line != null) {
@@ -378,7 +378,7 @@ public class TCFBreakpointsModel implements IBreakpointListener, IBreakpointMana
String condition = (String)p.get("org.eclipse.cdt.debug.core.condition");
if (condition != null && condition.length() > 0) m.put(IBreakpoints.PROP_CONDITION, condition);
Integer skip_count = (Integer)p.get("org.eclipse.cdt.debug.core.ignoreCount");
- if (skip_count != null && skip_count.intValue() > 0) m.put(IBreakpoints.PROP_SKIP_COUNT, skip_count);
+ if (skip_count != null && skip_count.intValue() > 0) m.put(IBreakpoints.PROP_IGNORECOUNT, skip_count);
return m;
}
}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java
index 0785e2050..35797a85a 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFBreakpointsStatus.java
@@ -16,7 +16,7 @@ import java.util.Iterator;
import java.util.Map;
import java.util.Set;
-import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.tm.tcf.protocol.Protocol;
import org.eclipse.tm.tcf.services.IBreakpoints;
@@ -83,11 +83,14 @@ public class TCFBreakpointsStatus {
}
public Map<String,Object> getStatus(IBreakpoint bp) {
- if (!bp.getModelIdentifier().equals(ITCFConstants.ID_TCF_DEBUG_MODEL)) return status_not_supported;
- IMarker marker = bp.getMarker();
- if (marker == null) return null;
- return getStatus(marker.getAttribute(
- ITCFConstants.ID_TCF_DEBUG_MODEL + '.' + IBreakpoints.PROP_ID, null));
+ try {
+ String id = TCFBreakpointsModel.getBreakpointsModel().getBreakpointID(bp);
+ if (id == null) return status_not_supported;
+ return getStatus(id);
+ }
+ catch (CoreException e) {
+ return status_not_supported;
+ }
}
public void addListener(ITCFBreakpointListener listener) {
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 7bee2287c..3fd7701c3 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
@@ -79,10 +79,10 @@ public class TCFLaunch extends Launch {
}
};
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
+ breakpoints_status = new TCFBreakpointsStatus(this);
Activator.getBreakpointsModel().downloadBreakpoints(channel, new Runnable() {
public void run() {
if (channel.getState() != IChannel.STATE_OPEN) return;
- breakpoints_status = new TCFBreakpointsStatus(TCFLaunch.this);
runLaunchSequence(done);
}
});

Back to the top