From e3c41f15c5f5120168393bf96f69cc1ebf32b49f Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Tue, 17 Jun 2008 13:45:22 +0000 Subject: [PATCH] Bug 237464 MIInferiorProcess.InferiorStartedDMEvent should also be sent in the case where a startup breakpoint is not set. --- .../service/command/GDBControl.java | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java index 0481aa4c9d3..3f0fb6a19c1 100644 --- a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java +++ b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java @@ -337,9 +337,17 @@ public class GDBControl extends AbstractMIControl { return; } + final DataRequestMonitor execMonitor = new DataRequestMonitor(getExecutor(), requestMonitor) { + @Override + protected void handleSuccess() { + getSession().dispatchEvent(new InferiorStartedDMEvent(getGDBDMContext()), getProperties()); + super.handleSuccess(); + } + }; + if (!stopInMain) { // Just start the program. - queueCommand(execCommand, new DataRequestMonitor(getExecutor(), requestMonitor)); + queueCommand(execCommand, execMonitor); } else { String stopSymbol = null; try { @@ -357,16 +365,7 @@ public class GDBControl extends AbstractMIControl { @Override protected void handleSuccess() { // After the break-insert is done, execute the -exec-run or -exec-continue command. - queueCommand( - execCommand, - new DataRequestMonitor(getExecutor(), requestMonitor) { - @Override - protected void handleSuccess() { - getSession().dispatchEvent( - new InferiorStartedDMEvent(getGDBDMContext()), getProperties()); - super.handleSuccess(); - } - }); + queueCommand(execCommand, execMonitor); } }); }