mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 533766 - Deadlock at IDE shutdown with active debug session
When shutting down eclipse and there is an active debug session, eclipse might deadlock if it can't destroy the debug session and would normally leave a zombie process for the eclipse instance. This fix allows eclipse to properly shutdown if the debug session is destroyed in less than 1 minute, else the IDE will simply be terminated. Change-Id: Icb9b019c7ff2ec9cdc9870a392a657fe0dfde81b Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
This commit is contained in:
parent
bb5f2d7f78
commit
72a51e79d9
1 changed files with 6 additions and 1 deletions
|
@ -10,11 +10,14 @@
|
||||||
* Abeer Bagul (Tensilica) - Updated error message (Bug 339048)
|
* Abeer Bagul (Tensilica) - Updated error message (Bug 339048)
|
||||||
* Jason Litton (Sage Electronic Engineering, LLC) - Added support for dynamic tracing option (Bug 379169)
|
* Jason Litton (Sage Electronic Engineering, LLC) - Added support for dynamic tracing option (Bug 379169)
|
||||||
* Alvaro Sanchez-Leon (Ericsson AB) - Each memory context needs a different MemoryRetrieval (Bug 250323)
|
* Alvaro Sanchez-Leon (Ericsson AB) - Each memory context needs a different MemoryRetrieval (Bug 250323)
|
||||||
|
* Torbjörn Svensson (STMicroelectronics) - Bug 533766
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.dsf.gdb.internal;
|
package org.eclipse.cdt.dsf.gdb.internal;
|
||||||
|
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.RejectedExecutionException;
|
import java.util.concurrent.RejectedExecutionException;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.concurrent.TimeoutException;
|
||||||
|
|
||||||
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
|
import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor;
|
||||||
import org.eclipse.cdt.dsf.concurrent.Query;
|
import org.eclipse.cdt.dsf.concurrent.Query;
|
||||||
|
@ -133,11 +136,13 @@ public class GdbPlugin extends Plugin {
|
||||||
// The Query.get() method is a synchronous call which blocks until the
|
// The Query.get() method is a synchronous call which blocks until the
|
||||||
// query completes.
|
// query completes.
|
||||||
try {
|
try {
|
||||||
launchShutdownQuery.get();
|
launchShutdownQuery.get(1, TimeUnit.MINUTES);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, "InterruptedException while shutting down launch " + gdbLaunch, e.getCause())); //$NON-NLS-1$
|
getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, "InterruptedException while shutting down launch " + gdbLaunch, e.getCause())); //$NON-NLS-1$
|
||||||
} catch (ExecutionException e) {
|
} catch (ExecutionException e) {
|
||||||
getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, "Exception while shutting down launch " + gdbLaunch, e.getCause())); //$NON-NLS-1$
|
getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, "Exception while shutting down launch " + gdbLaunch, e.getCause())); //$NON-NLS-1$
|
||||||
|
} catch (TimeoutException e) {
|
||||||
|
getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, "TimeoutException while shutting down launch " + gdbLaunch, e.getCause())); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue