forked from qt-creator/qt-creator
GDB: Do not skip detach for core inferior shutdown
Another attempt for87c00b86db. This section was added in3b5ecac238, which was a refactoring commit, not sure why. It causes state discrepancy, because only on quit the "thread-exited" messages are processed, and when the thread list is clear, the engine considers it as InferiorShutdownFinished and triggers engine shutdown again, which is wrong, because it quits twice and can no longer write to the process, which is already dead at this point. Change-Id: Ic5cfced672b640865e701ac96b6fcea34d748211 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
425262ce7e
commit
4d2b448541
@@ -1624,10 +1624,6 @@ QString GdbEngine::cleanupFullName(const QString &fileName)
|
||||
void GdbEngine::shutdownInferior()
|
||||
{
|
||||
CHECK_STATE(InferiorShutdownRequested);
|
||||
if (runParameters().startMode == AttachToCore) {
|
||||
notifyInferiorShutdownFinished();
|
||||
return;
|
||||
}
|
||||
DebuggerCommand cmd;
|
||||
cmd.function = QLatin1String(runParameters().closeMode == DetachAtClose ? "detach " : "kill ");
|
||||
cmd.callback = CB(handleInferiorShutdown);
|
||||
|
||||
Reference in New Issue
Block a user