From a8fe7f6a2733dd6061b7871837a1b7b81dbe3df7 Mon Sep 17 00:00:00 2001 From: Pawel Piech Date: Tue, 17 Jun 2008 03:46:41 +0000 Subject: [PATCH] [236765] - Additional fixes for use of command cache. --- .../dd/examples/pda/service/PDAExpressions.java | 13 ++----------- .../dd/examples/pda/service/PDARunControl.java | 6 +++--- .../eclipse/dd/examples/pda/service/PDAStack.java | 8 ++++---- .../pda/service/commands/AbstractPDACommand.java | 3 +-- .../pda/service/commands/PDADataCommand.java | 6 +++--- .../pda/service/commands/PDADropFrameCommand.java | 6 +++--- .../pda/service/commands/PDAEvalCommand.java | 6 +++--- .../pda/service/commands/PDAPopDataCommand.java | 6 +++--- .../pda/service/commands/PDAPushDataCommand.java | 6 +++--- .../pda/service/commands/PDAResumeCommand.java | 6 +++--- .../pda/service/commands/PDASetDataCommand.java | 6 +++--- .../pda/service/commands/PDASetVarCommand.java | 6 +++--- .../pda/service/commands/PDAStackCommand.java | 6 +++--- .../pda/service/commands/PDAStepCommand.java | 6 +++--- .../pda/service/commands/PDAStepReturnCommand.java | 6 +++--- .../pda/service/commands/PDASuspendCommand.java | 6 +++--- .../pda/service/commands/PDAVarCommand.java | 6 +++--- 17 files changed, 49 insertions(+), 59 deletions(-) diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDAExpressions.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDAExpressions.java index 5d6be6e8da2..83aa46c71c2 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDAExpressions.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDAExpressions.java @@ -292,11 +292,7 @@ public class PDAExpressions extends AbstractDsfService implements IExpressions { // Send the command to evaluate the variable. fCommandCache.execute( - new PDAVarCommand( - fCommandControl.getVirtualMachineDMContext(), - threadCtx.getID(), - frameId, - exprCtx.getExpression()), + new PDAVarCommand(threadCtx, frameId, exprCtx.getExpression()), new DataRequestMonitor(getExecutor(), rm) { @Override protected void handleSuccess() { @@ -331,12 +327,7 @@ public class PDAExpressions extends AbstractDsfService implements IExpressions { // Send the "write" command to PDA debugger fCommandCache.execute( - new PDASetVarCommand( - fCommandControl.getVirtualMachineDMContext(), - threadCtx.getID(), - frameId, - exprCtx.getExpression(), - exprValue), + new PDASetVarCommand( threadCtx, frameId, exprCtx.getExpression(), exprValue), new DataRequestMonitor(getExecutor(), rm) { @Override protected void handleSuccess() { diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDARunControl.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDARunControl.java index 01102212817..e2c3dc38966 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDARunControl.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDARunControl.java @@ -530,7 +530,7 @@ public class PDARunControl extends AbstractDsfService final PDAThreadDMContext threadCtx = (PDAThreadDMContext)context; fThreads.get(threadCtx.getID()).fResumePending = true; fCommandControl.queueCommand( - new PDAResumeCommand(fDMContext, threadCtx.getID()), + new PDAResumeCommand(threadCtx), new DataRequestMonitor(getExecutor(), rm) { @Override protected void handleFailure() { @@ -618,8 +618,8 @@ public class PDARunControl extends AbstractDsfService AbstractPDACommand stepCommand = stepType == StepType.STEP_RETURN - ? new PDAStepReturnCommand(fDMContext, threadCtx.getID()) - : new PDAStepCommand(fDMContext, threadCtx.getID()); + ? new PDAStepReturnCommand(threadCtx) + : new PDAStepCommand(threadCtx); fCommandControl.queueCommand( diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDAStack.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDAStack.java index 55d3371a801..4be4ee9c87e 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDAStack.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/PDAStack.java @@ -232,7 +232,7 @@ public class PDAStack extends AbstractDsfService implements IStack { // Execute the PDA stack command, or retrieve the result from cache if already available. fCommandCache.execute( - new PDAStackCommand(fCommandControl.getVirtualMachineDMContext(), threadCtx.getID()), + new PDAStackCommand(threadCtx), new DataRequestMonitor(getExecutor(), rm) { @Override protected void handleSuccess() { @@ -268,7 +268,7 @@ public class PDAStack extends AbstractDsfService implements IStack { // Execute the stack command and create the corresponding frame contexts. fCommandCache.execute( - new PDAStackCommand(fCommandControl.getVirtualMachineDMContext(), threadCtx.getID()), + new PDAStackCommand(threadCtx), new DataRequestMonitor(getExecutor(), rm) { @Override protected void handleSuccess() { @@ -300,7 +300,7 @@ public class PDAStack extends AbstractDsfService implements IStack { } fCommandCache.execute( - new PDAStackCommand(fCommandControl.getVirtualMachineDMContext(), threadCtx.getID()), + new PDAStackCommand(threadCtx), new DataRequestMonitor(getExecutor(), rm) { @Override protected void handleSuccess() { @@ -336,7 +336,7 @@ public class PDAStack extends AbstractDsfService implements IStack { // Execute stack command and return the data's size. fCommandCache.execute( - new PDAStackCommand(fCommandControl.getVirtualMachineDMContext(), threadCtx.getID()), + new PDAStackCommand(threadCtx), new DataRequestMonitor(getExecutor(), rm) { @Override protected void handleSuccess() { diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/AbstractPDACommand.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/AbstractPDACommand.java index 79206e35717..c96abedf45b 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/AbstractPDACommand.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/AbstractPDACommand.java @@ -14,7 +14,6 @@ import org.eclipse.dd.dsf.concurrent.Immutable; import org.eclipse.dd.dsf.datamodel.IDMContext; import org.eclipse.dd.dsf.debug.service.command.ICommand; import org.eclipse.dd.dsf.debug.service.command.ICommandResult; -import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; /** * Base class for PDA commands. The PDA commands consist of a text request and @@ -27,7 +26,7 @@ abstract public class AbstractPDACommand implements final private IDMContext fContext; final private String fRequest; - public AbstractPDACommand(PDAVirtualMachineDMContext context, String request) { + public AbstractPDACommand(IDMContext context, String request) { fContext = context; fRequest = request; } diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDADataCommand.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDADataCommand.java index df271216ff3..37ff5c84deb 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDADataCommand.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDADataCommand.java @@ -11,7 +11,7 @@ package org.eclipse.dd.examples.pda.service.commands; import org.eclipse.dd.dsf.concurrent.Immutable; -import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; +import org.eclipse.dd.examples.pda.service.PDAThreadDMContext; /** * Retrieves data stack information @@ -27,8 +27,8 @@ import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; @Immutable public class PDADataCommand extends AbstractPDACommand { - public PDADataCommand(PDAVirtualMachineDMContext context, int threadId) { - super(context, "data " + threadId); + public PDADataCommand(PDAThreadDMContext thread) { + super(thread, "data " + thread.getID()); } @Override diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDADropFrameCommand.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDADropFrameCommand.java index 128f7353e37..5c945a8e905 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDADropFrameCommand.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDADropFrameCommand.java @@ -11,7 +11,7 @@ package org.eclipse.dd.examples.pda.service.commands; import org.eclipse.dd.dsf.concurrent.Immutable; -import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; +import org.eclipse.dd.examples.pda.service.PDAThreadDMContext; /** * Returns from the current frame without executing the rest of instructions. @@ -36,8 +36,8 @@ import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; @Immutable public class PDADropFrameCommand extends AbstractPDACommand { - public PDADropFrameCommand(PDAVirtualMachineDMContext context, int threadId) { - super(context, "drop " + threadId); + public PDADropFrameCommand(PDAThreadDMContext thread) { + super(thread, "drop " + thread.getID()); } @Override diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAEvalCommand.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAEvalCommand.java index 3b6af5d0133..561f5adf396 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAEvalCommand.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAEvalCommand.java @@ -11,7 +11,7 @@ package org.eclipse.dd.examples.pda.service.commands; import org.eclipse.dd.dsf.concurrent.Immutable; -import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; +import org.eclipse.dd.examples.pda.service.PDAThreadDMContext; /** * Sets what events cause the execution to stop. @@ -34,8 +34,8 @@ import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; @Immutable public class PDAEvalCommand extends AbstractPDACommand { - public PDAEvalCommand(PDAVirtualMachineDMContext context, int threadId, String operation) { - super(context, "eval " + threadId + " " + operation); + public PDAEvalCommand(PDAThreadDMContext thread, String operation) { + super(thread, "eval " + thread.getID() + " " + operation); } @Override diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAPopDataCommand.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAPopDataCommand.java index 4b8b1ec92be..7a89e89b22d 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAPopDataCommand.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAPopDataCommand.java @@ -11,7 +11,7 @@ package org.eclipse.dd.examples.pda.service.commands; import org.eclipse.dd.dsf.concurrent.Immutable; -import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; +import org.eclipse.dd.examples.pda.service.PDAThreadDMContext; /** * Pops the top value from the data stack @@ -27,8 +27,8 @@ import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; @Immutable public class PDAPopDataCommand extends AbstractPDACommand { - public PDAPopDataCommand(PDAVirtualMachineDMContext context, int threadId) { - super(context, "popdata " + threadId); + public PDAPopDataCommand(PDAThreadDMContext thread) { + super(thread, "popdata " + thread.getID()); } @Override diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAPushDataCommand.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAPushDataCommand.java index d4861428270..5673bbb78e9 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAPushDataCommand.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAPushDataCommand.java @@ -11,7 +11,7 @@ package org.eclipse.dd.examples.pda.service.commands; import org.eclipse.dd.dsf.concurrent.Immutable; -import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; +import org.eclipse.dd.examples.pda.service.PDAThreadDMContext; /** * Pushes the given value on top of the data stack. @@ -27,8 +27,8 @@ import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; @Immutable public class PDAPushDataCommand extends AbstractPDACommand { - public PDAPushDataCommand(PDAVirtualMachineDMContext context, int threadId, int value) { - super(context, "pushdata " + threadId + " " + value); + public PDAPushDataCommand(PDAThreadDMContext thread, int value) { + super(thread, "pushdata " + thread.getID() + " " + value); } @Override diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAResumeCommand.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAResumeCommand.java index b49879bd45f..1278da930c0 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAResumeCommand.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAResumeCommand.java @@ -11,7 +11,7 @@ package org.eclipse.dd.examples.pda.service.commands; import org.eclipse.dd.dsf.concurrent.Immutable; -import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; +import org.eclipse.dd.examples.pda.service.PDAThreadDMContext; /** * Resumes the execution of a single thread. Can be issued only if the virtual @@ -31,8 +31,8 @@ import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; @Immutable public class PDAResumeCommand extends AbstractPDACommand { - public PDAResumeCommand(PDAVirtualMachineDMContext context, int threadId) { - super(context, "resume " + threadId); + public PDAResumeCommand(PDAThreadDMContext thread) { + super(thread, "resume " + thread.getID()); } @Override diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDASetDataCommand.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDASetDataCommand.java index 92972c47ef6..af7f650b2ad 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDASetDataCommand.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDASetDataCommand.java @@ -11,7 +11,7 @@ package org.eclipse.dd.examples.pda.service.commands; import org.eclipse.dd.dsf.concurrent.Immutable; -import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; +import org.eclipse.dd.examples.pda.service.PDAThreadDMContext; /** * Sets a data value in the data stack at the given location @@ -27,8 +27,8 @@ import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; @Immutable public class PDASetDataCommand extends AbstractPDACommand { - public PDASetDataCommand(PDAVirtualMachineDMContext context, int threadId, int index, String value) { - super(context, "setdata " + threadId + " " + index + " " + value); + public PDASetDataCommand(PDAThreadDMContext thread, int index, String value) { + super(thread, "setdata " + thread.getID() + " " + index + " " + value); } @Override diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDASetVarCommand.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDASetVarCommand.java index 5e058ecff83..7a1c3fa0525 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDASetVarCommand.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDASetVarCommand.java @@ -11,7 +11,7 @@ package org.eclipse.dd.examples.pda.service.commands; import org.eclipse.dd.dsf.concurrent.Immutable; -import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; +import org.eclipse.dd.examples.pda.service.PDAThreadDMContext; /** * Sets a variable value @@ -27,8 +27,8 @@ import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; @Immutable public class PDASetVarCommand extends AbstractPDACommand { - public PDASetVarCommand(PDAVirtualMachineDMContext context, int threadId, int frame, String variable, String value) { - super(context, "setvar " + threadId + " " + frame + " " + variable + " " + value); + public PDASetVarCommand(PDAThreadDMContext thread, int frame, String variable, String value) { + super(thread, "setvar " + thread.getID() + " " + frame + " " + variable + " " + value); } @Override diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAStackCommand.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAStackCommand.java index c99f3c32073..cb8ad707832 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAStackCommand.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAStackCommand.java @@ -11,7 +11,7 @@ package org.eclipse.dd.examples.pda.service.commands; import org.eclipse.dd.dsf.concurrent.Immutable; -import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; +import org.eclipse.dd.examples.pda.service.PDAThreadDMContext; /** * Retrieves command stack information @@ -27,8 +27,8 @@ import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; @Immutable public class PDAStackCommand extends AbstractPDACommand { - public PDAStackCommand(PDAVirtualMachineDMContext context, int threadId) { - super(context, "stack " + threadId); + public PDAStackCommand(PDAThreadDMContext thread) { + super(thread, "stack " + thread.getID()); } @Override diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAStepCommand.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAStepCommand.java index 5401c8ec11e..208a1392b03 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAStepCommand.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAStepCommand.java @@ -11,7 +11,7 @@ package org.eclipse.dd.examples.pda.service.commands; import org.eclipse.dd.dsf.concurrent.Immutable; -import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; +import org.eclipse.dd.examples.pda.service.PDAThreadDMContext; /** * Executes next instruction @@ -36,8 +36,8 @@ import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; @Immutable public class PDAStepCommand extends AbstractPDACommand { - public PDAStepCommand(PDAVirtualMachineDMContext context, int threadId) { - super(context, "step " + threadId); + public PDAStepCommand(PDAThreadDMContext thread) { + super(thread, "step " + thread.getID()); } @Override diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAStepReturnCommand.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAStepReturnCommand.java index 7a588019360..779fbaafd04 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAStepReturnCommand.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAStepReturnCommand.java @@ -11,7 +11,7 @@ package org.eclipse.dd.examples.pda.service.commands; import org.eclipse.dd.dsf.concurrent.Immutable; -import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; +import org.eclipse.dd.examples.pda.service.PDAThreadDMContext; /** * Executes instructions until the current subroutine is finished @@ -36,8 +36,8 @@ import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; @Immutable public class PDAStepReturnCommand extends AbstractPDACommand { - public PDAStepReturnCommand(PDAVirtualMachineDMContext context, int threadId) { - super(context, "stepreturn " + threadId); + public PDAStepReturnCommand(PDAThreadDMContext thread) { + super(thread, "stepreturn " + thread.getID()); } @Override diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDASuspendCommand.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDASuspendCommand.java index a3ad5bd86b3..8d118748e42 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDASuspendCommand.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDASuspendCommand.java @@ -11,7 +11,7 @@ package org.eclipse.dd.examples.pda.service.commands; import org.eclipse.dd.dsf.concurrent.Immutable; -import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; +import org.eclipse.dd.examples.pda.service.PDAThreadDMContext; /** * Suspends execution of a single thread. Can be issued only if the virtual @@ -31,8 +31,8 @@ import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; @Immutable public class PDASuspendCommand extends AbstractPDACommand { - public PDASuspendCommand(PDAVirtualMachineDMContext context, int threadId) { - super(context, "suspend " + threadId); + public PDASuspendCommand(PDAThreadDMContext thread) { + super(thread, "suspend " + thread.getID()); } @Override diff --git a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAVarCommand.java b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAVarCommand.java index 060e807bcbd..ec41136d290 100644 --- a/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAVarCommand.java +++ b/plugins/org.eclipse.dd.examples.pda/src/org/eclipse/dd/examples/pda/service/commands/PDAVarCommand.java @@ -11,7 +11,7 @@ package org.eclipse.dd.examples.pda.service.commands; import org.eclipse.dd.dsf.concurrent.Immutable; -import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; +import org.eclipse.dd.examples.pda.service.PDAThreadDMContext; /** * Retrieves variable value @@ -28,8 +28,8 @@ import org.eclipse.dd.examples.pda.service.PDAVirtualMachineDMContext; @Immutable public class PDAVarCommand extends AbstractPDACommand { - public PDAVarCommand(PDAVirtualMachineDMContext context, int threadId, int frameId, String name) { - super(context, "var " + threadId + " " + frameId + " " + name); + public PDAVarCommand(PDAThreadDMContext thread, int frameId, String name) { + super(thread, "var " + thread.getID() + " " + frameId + " " + name); } @Override