Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2010-01-05 18:51:29 -0500
committerPawel Piech2010-01-05 18:51:29 -0500
commite31d06b0030d8177aa0b456bbe5f4898e872ee7e (patch)
tree5f075a85596621de9a885a6560920bbe63cd5140 /dsf/org.eclipse.cdt.examples.dsf.pda
parent47e8b801a09e264c63bd574479f787f537ad308e (diff)
downloadorg.eclipse.cdt-e31d06b0030d8177aa0b456bbe5f4898e872ee7e.tar.gz
org.eclipse.cdt-e31d06b0030d8177aa0b456bbe5f4898e872ee7e.tar.xz
org.eclipse.cdt-e31d06b0030d8177aa0b456bbe5f4898e872ee7e.zip
[298909] - [launch] DSF suspend trigger susceptible to race conditions
Diffstat (limited to 'dsf/org.eclipse.cdt.examples.dsf.pda')
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesInitSequence.java15
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAExpressions.java1
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAStack.java1
3 files changed, 13 insertions, 4 deletions
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesInitSequence.java b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesInitSequence.java
index d993cf5427..b996c48f25 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesInitSequence.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesInitSequence.java
@@ -12,6 +12,7 @@ package org.eclipse.cdt.examples.dsf.pda.launch;
import org.eclipse.cdt.dsf.concurrent.RequestMonitor;
import org.eclipse.cdt.dsf.concurrent.Sequence;
+import org.eclipse.cdt.dsf.datamodel.DataModelInitializedEvent;
import org.eclipse.cdt.dsf.debug.service.BreakpointsMediator;
import org.eclipse.cdt.dsf.service.DsfSession;
import org.eclipse.cdt.examples.dsf.pda.service.PDABackend;
@@ -105,12 +106,18 @@ public class PDAServicesInitSequence extends Sequence {
new PDARegisters(fSession).initialize(requestMonitor);
}
},
- new Step() {
+ /*
+ * Indicate that the Data Model has been filled. This will trigger the Debug view to expand.
+ */
+ new Step() {
@Override
- public void execute(RequestMonitor requestMonitor) {
- fRunControl.resume(fCommandControl.getContext(), requestMonitor);
+ public void execute(final RequestMonitor requestMonitor) {
+ fSession.dispatchEvent(
+ new DataModelInitializedEvent(fCommandControl.getContext()),
+ fCommandControl.getProperties());
+ requestMonitor.done();
}
- },
+ }
};
// Sequence input parameters, used in initializing services.
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAExpressions.java b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAExpressions.java
index c4dc84407e..10f468723c 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAExpressions.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAExpressions.java
@@ -192,6 +192,7 @@ public class PDAExpressions extends AbstractDsfService implements ICachingServic
fCommandControl = getServicesTracker().getService(PDACommandControl.class);
fStack = getServicesTracker().getService(PDAStack.class);
fCommandCache = new CommandCache(getSession(), fCommandControl);
+ fCommandCache.setContextAvailable(fCommandControl.getContext(), true);
getSession().addServiceEventListener(this, null);
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAStack.java b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAStack.java
index 5e86e56cb3..eb09f7029b 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAStack.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAStack.java
@@ -207,6 +207,7 @@ public class PDAStack extends AbstractDsfService implements IStack, ICachingServ
// Create the commands cache
fCommandCache = new CommandCache(getSession(), fCommandControl);
+ fCommandCache.setContextAvailable(fCommandControl.getContext(), true);
// Register to listen for run control events, to clear cache accordingly.
getSession().addServiceEventListener(this, null);

Back to the top