1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Bug 370376: [remote] Remote non-attach should not have a console for the inferior

This commit is contained in:
Marc Khouzam 2012-02-02 06:14:56 -05:00
parent 4592315011
commit ce342ee755
2 changed files with 16 additions and 0 deletions

View file

@ -505,6 +505,13 @@ public class GDBProcesses extends MIProcesses implements IGDBProcesses {
* @since 4.0
*/
protected void createConsole(final IContainerDMContext containerDmc, final boolean restart, final RequestMonitor rm) {
if (fBackend.getSessionType() == SessionType.REMOTE || fBackend.getIsAttachSession()) {
// Remote or attach sessions shouldn't have a console, since the inferior is not started
// by eclipse but by gdbserver
rm.done();
return;
}
initializeInputOutput(containerDmc, new ImmediateRequestMonitor(rm) {
@Override
protected void handleSuccess() {

View file

@ -295,6 +295,15 @@ public class StartOrRestartProcessSequence_7_0 extends ReflectionSequence {
*/
@Execute
public void stepCreateConsole(final RequestMonitor rm) {
if (fBackend.getSessionType() == SessionType.REMOTE && !fBackend.getIsAttachSession()) {
// Remote non-attach sessions don't support multi-process and therefore will not
// start new processes. Those sessions will only start the one process, which should
// not have a console, because it's output is handled by GDB server. Therefore,
// no need to create an inferior process and add it to the launch
rm.done();
return;
}
Process inferiorProcess;
if (fPty == null) {
inferiorProcess = new MIInferiorProcess(fContainerDmc, fBackend.getMIOutputStream());