Debugger: Fix gdb detaching

Too much cleverness in python command detection: "attach" is parsed
as possible Python command. Make it explicit that it is not.

Task-number: QTCREATORBUG-21908
Change-Id: I68444bccfb485ef1befe81b4b6b13243c2c8a500
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2019-01-31 12:31:08 +01:00
parent 0aa8a98afa
commit 18f1a8d759

View File

@@ -1736,7 +1736,7 @@ void GdbEngine::detachDebugger()
{ {
CHECK_STATE(InferiorStopOk); CHECK_STATE(InferiorStopOk);
QTC_CHECK(runParameters().startMode != AttachCore); QTC_CHECK(runParameters().startMode != AttachCore);
DebuggerCommand cmd("detach", ExitRequest); DebuggerCommand cmd("detach", NativeCommand | ExitRequest);
cmd.callback = [this](const DebuggerResponse &) { cmd.callback = [this](const DebuggerResponse &) {
CHECK_STATE(InferiorStopOk); CHECK_STATE(InferiorStopOk);
notifyInferiorExited(); notifyInferiorExited();