Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2009-09-11 18:54:31 +0000
committerPawel Piech2009-09-11 18:54:31 +0000
commitc4038c98424e7972ac934c397f48eabf6f9222d6 (patch)
tree8e0ca2c7e562dfba64f66e49a471bd3ef98aa993 /org.eclipse.debug.examples.core/pdavm
parentb4a5f63c927fcca911789d0a42a6695eb017a5fd (diff)
downloadeclipse.platform.debug-c4038c98424e7972ac934c397f48eabf6f9222d6.tar.gz
eclipse.platform.debug-c4038c98424e7972ac934c397f48eabf6f9222d6.tar.xz
eclipse.platform.debug-c4038c98424e7972ac934c397f48eabf6f9222d6.zip
Bug 286256 - Request to move Restart icon to core debug framework
Diffstat (limited to 'org.eclipse.debug.examples.core/pdavm')
-rw-r--r--org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java23
1 files changed, 21 insertions, 2 deletions
diff --git a/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java b/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java
index 98a56ddc3..e140e1085 100644
--- a/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java
+++ b/org.eclipse.debug.examples.core/pdavm/src/org/eclipse/debug/examples/pdavm/PDAVirtualMachine.java
@@ -454,7 +454,7 @@ public class PDAVirtualMachine {
fSuspendVM = "client";
}
-
+
void run() {
int id = fNextThreadId++;
sendDebugEvent("vmstarted", false);
@@ -687,6 +687,7 @@ public class PDAVirtualMachine {
else if ("popdata".equals(command)) debugPopData(args);
else if ("pushdata".equals(command)) debugPushData(args);
else if ("registers".equals(command)) debugRegisters(args);
+ else if ("restart".equals(command)) debugRestart(args);
else if ("resume".equals(command)) debugResume(args);
else if ("set".equals(command)) debugSetBreakpoint(args);
else if ("setdata".equals(command)) debugSetData(args);
@@ -944,7 +945,25 @@ public class PDAVirtualMachine {
response.append('\n');
sendCommandResponse(response.toString());
}
-
+
+ void debugRestart(Args args) {
+ fSuspendVM = "restart";
+
+ for (Iterator itr = fThreads.keySet().iterator(); itr.hasNext();) {
+ Integer id = (Integer)itr.next();
+ sendDebugEvent("exited " + id, false);
+ }
+ fThreads.clear();
+
+ int id = fNextThreadId++;
+ fThreads.put(new Integer(id), new PDAThread(id, "main", 0));
+ sendDebugEvent("started " + id, false);
+
+ fRegisters.clear();
+
+ sendCommandResponse("ok\n");
+ }
+
void debugResume(Args args) {
PDAThread thread = args.getThreadArg();
if (thread == null) {

Back to the top