mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
Bug 368597: Although we don't complete the launch, we still need to shutdown the DSF session as it was started already.
This commit is contained in:
parent
1928101334
commit
f13bdf3b33
2 changed files with 31 additions and 8 deletions
|
@ -13,11 +13,14 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.launch.remote.launching;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
|
||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
|
||||
import org.eclipse.cdt.dsf.concurrent.DsfRunnable;
|
||||
import org.eclipse.cdt.dsf.concurrent.ImmediateRequestMonitor;
|
||||
import org.eclipse.cdt.dsf.concurrent.Query;
|
||||
import org.eclipse.cdt.dsf.gdb.IGDBLaunchConfigurationConstants;
|
||||
import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch;
|
||||
import org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate;
|
||||
|
@ -178,6 +181,19 @@ public class RemoteGdbLaunchDelegate extends GdbLaunchDelegate {
|
|||
if (remoteShellProcess != null) {
|
||||
remoteShellProcess.destroy();
|
||||
}
|
||||
|
||||
// Need to shutdown the DSF launch session because it is
|
||||
// partially started already.
|
||||
try {
|
||||
l.getSession().getExecutor().execute(new DsfRunnable() {
|
||||
public void run() {
|
||||
l.shutdownSession(new ImmediateRequestMonitor());
|
||||
}
|
||||
});
|
||||
} catch (RejectedExecutionException e) {
|
||||
// Session disposed.
|
||||
}
|
||||
|
||||
RSEHelper.abort(Messages.RemoteGdbLaunchDelegate_gdbserverFailedToStartErrorMessage, null,
|
||||
ICDTLaunchConfigurationConstants.ERR_DEBUGGER_NOT_INSTALLED);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2011 Wind River Systems and others.
|
||||
* Copyright (c) 2006, 2012 Wind River Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
* Marc Khouzam (Ericsson) - Fix NPE for partial launches (Bug 368597)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.dsf.gdb.launching;
|
||||
|
||||
|
@ -256,13 +257,19 @@ public class GdbLaunch extends DsfLaunch
|
|||
fTracker = null;
|
||||
DsfSession.endSession(fSession);
|
||||
|
||||
// DsfMemoryBlockRetrieval.saveMemoryBlocks();
|
||||
fMemRetrieval.saveMemoryBlocks();
|
||||
|
||||
// Fire a terminate event for the memory retrieval object so
|
||||
// that the hosting memory views can clean up. See 255120 and
|
||||
// 283586
|
||||
DebugPlugin.getDefault().fireDebugEventSet( new DebugEvent[] { new DebugEvent(fMemRetrieval, DebugEvent.TERMINATE) });
|
||||
// The memory retrieval can be null if the launch was aborted
|
||||
// in the middle. We saw this when doing an automatic remote
|
||||
// launch with an invalid gdbserver
|
||||
// Bug 368597
|
||||
if (fMemRetrieval != null) {
|
||||
// DsfMemoryBlockRetrieval.saveMemoryBlocks();
|
||||
fMemRetrieval.saveMemoryBlocks();
|
||||
|
||||
// Fire a terminate event for the memory retrieval object so
|
||||
// that the hosting memory views can clean up. See 255120 and
|
||||
// 283586
|
||||
DebugPlugin.getDefault().fireDebugEventSet( new DebugEvent[] { new DebugEvent(fMemRetrieval, DebugEvent.TERMINATE) });
|
||||
}
|
||||
|
||||
// 'fireTerminate()' removes this launch from the list of 'DebugEvent'
|
||||
// listeners. The launch may not be terminated at this point: the inferior
|
||||
|
|
Loading…
Add table
Reference in a new issue