Debugger: Merge GdbEngine's {run,post,flush}Command

Since we don't keep a local queue anymore, the distinction is
no more needed. Also, this is close to the LLDB side now.

Also move remaining uses of DebuggerCommand::flags to
GdbEngine, since that's the only user.

Change-Id: I61ae0f4e5294e306ab0b202e80f27fb3e3f7a7d7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
hjk
2015-09-11 11:28:55 +02:00
parent 25bb8411a4
commit 150af7af4c
8 changed files with 428 additions and 489 deletions

View File

@@ -75,8 +75,9 @@ void GdbAttachEngine::runEngine()
{
QTC_ASSERT(state() == EngineRunRequested, qDebug() << state());
const qint64 pid = runParameters().attachPID;
postCommand("attach " + QByteArray::number(pid), NoFlags,
[this](const DebuggerResponse &r) { handleAttach(r); });
DebuggerCommand cmd("attach " + QByteArray::number(pid));
cmd.callback = [this](const DebuggerResponse &r) { handleAttach(r); };
runCommand(cmd);
showStatusMessage(tr("Attached to process %1.").arg(inferiorPid()));
}