|
Lines 38-44
Link Here
|
| 38 |
import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; |
38 |
import org.eclipse.dd.dsf.concurrent.IDsfStatusConstants; |
| 39 |
import org.eclipse.dd.dsf.concurrent.RequestMonitor; |
39 |
import org.eclipse.dd.dsf.concurrent.RequestMonitor; |
| 40 |
import org.eclipse.dd.dsf.concurrent.Sequence; |
40 |
import org.eclipse.dd.dsf.concurrent.Sequence; |
| 41 |
import org.eclipse.dd.dsf.datamodel.AbstractDMEvent; |
|
|
| 42 |
import org.eclipse.dd.dsf.debug.service.command.ICommandControl; |
41 |
import org.eclipse.dd.dsf.debug.service.command.ICommandControl; |
| 43 |
import org.eclipse.dd.dsf.service.DsfServiceEventHandler; |
42 |
import org.eclipse.dd.dsf.service.DsfServiceEventHandler; |
| 44 |
import org.eclipse.dd.dsf.service.DsfSession; |
43 |
import org.eclipse.dd.dsf.service.DsfSession; |
|
Lines 73-95
Link Here
|
| 73 |
*/ |
72 |
*/ |
| 74 |
public class GDBControl extends AbstractMIControl { |
73 |
public class GDBControl extends AbstractMIControl { |
| 75 |
|
74 |
|
| 76 |
/** |
|
|
| 77 |
* Event indicating that the back end process process has started. |
| 78 |
*/ |
| 79 |
public static class GDBStartedEvent extends AbstractDMEvent<GDBControlDMContext> { |
| 80 |
public GDBStartedEvent(GDBControlDMContext context) { |
| 81 |
super(context); |
| 82 |
} |
| 83 |
} |
| 84 |
|
| 85 |
/** |
| 86 |
* Event indicating that the back end process has terminated. |
| 87 |
*/ |
| 88 |
public static class GDBExitedEvent extends AbstractDMEvent<GDBControlDMContext> { |
| 89 |
public GDBExitedEvent(GDBControlDMContext context) { |
| 90 |
super(context); |
| 91 |
} |
| 92 |
} |
| 93 |
|
75 |
|
| 94 |
private static int fgInstanceCounter = 0; |
76 |
private static int fgInstanceCounter = 0; |
| 95 |
private final GDBControlDMContext fControlDmc; |
77 |
private final GDBControlDMContext fControlDmc; |
|
Lines 436-442
Link Here
|
| 436 |
} |
418 |
} |
| 437 |
|
419 |
|
| 438 |
@DsfServiceEventHandler |
420 |
@DsfServiceEventHandler |
| 439 |
public void eventDispatched(GDBExitedEvent e) { |
421 |
public void eventDispatched(BackendExitedEvent e) { |
| 440 |
// Handle our "GDB Exited" event and stop processing commands. |
422 |
// Handle our "GDB Exited" event and stop processing commands. |
| 441 |
stopCommandProcessing(); |
423 |
stopCommandProcessing(); |
| 442 |
} |
424 |
} |
|
Lines 463-469
Link Here
|
| 463 |
Thread.interrupted(); |
445 |
Thread.interrupted(); |
| 464 |
} finally { |
446 |
} finally { |
| 465 |
fExited = true; |
447 |
fExited = true; |
| 466 |
getSession().dispatchEvent(new GDBExitedEvent(fControlDmc) {}, getProperties()); |
448 |
getSession().dispatchEvent(new BackendExitedEvent(fControlDmc) {}, getProperties()); |
| 467 |
} |
449 |
} |
| 468 |
} |
450 |
} |
| 469 |
} |
451 |
} |
|
Lines 735-741
Link Here
|
| 735 |
public void initialize(final RequestMonitor requestMonitor) { |
717 |
public void initialize(final RequestMonitor requestMonitor) { |
| 736 |
getSession().addServiceEventListener(GDBControl.this, null); |
718 |
getSession().addServiceEventListener(GDBControl.this, null); |
| 737 |
register(new String[]{ ICommandControl.class.getName(), AbstractMIControl.class.getName() }, new Hashtable<String,String>()); |
719 |
register(new String[]{ ICommandControl.class.getName(), AbstractMIControl.class.getName() }, new Hashtable<String,String>()); |
| 738 |
getSession().dispatchEvent(new GDBStartedEvent(getGDBDMContext()), getProperties()); |
720 |
getSession().dispatchEvent(new BackendStartedEvent(getGDBDMContext()), getProperties()); |
| 739 |
requestMonitor.done(); |
721 |
requestMonitor.done(); |
| 740 |
} |
722 |
} |
| 741 |
|
723 |
|