Debugger: Move command flags to debugger command

Also, remove the need to mark GDB Python commands, detect the
need to use MI on the presence of non-Pythonic letters in
the command (space and hyphen).

Plan is to reuse even more almost shared code between engines.

Change-Id: I4e00debb07f2482637930675a28f464666b59553
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2016-12-13 13:37:05 +01:00
parent c2eada278e
commit a61b6dfc57
11 changed files with 138 additions and 128 deletions

View File

@@ -208,7 +208,7 @@ void GdbCoreEngine::setupInferior()
// Do that first, otherwise no symbols are loaded.
QFileInfo fi(m_executable);
QString path = fi.absoluteFilePath();
runCommand({"-file-exec-and-symbols \"" + path + '"', NoFlags,
runCommand({"-file-exec-and-symbols \"" + path + '"',
CB(handleFileExecAndSymbols)});
}
@@ -232,8 +232,7 @@ void GdbCoreEngine::handleFileExecAndSymbols(const DebuggerResponse &response)
void GdbCoreEngine::runEngine()
{
CHECK_STATE(EngineRunRequested);
runCommand({"target core " + coreFileName(), NoFlags,
CB(handleTargetCore)});
runCommand({"target core " + coreFileName(), CB(handleTargetCore)});
}
void GdbCoreEngine::handleTargetCore(const DebuggerResponse &response)
@@ -253,7 +252,7 @@ void GdbCoreEngine::handleTargetCore(const DebuggerResponse &response)
// symbols yet. Load them in order of importance.
reloadStack();
reloadModulesInternal();
runCommand({"p 5", NoFlags, CB(handleRoundTrip)});
runCommand({"p 5", CB(handleRoundTrip)});
}
void GdbCoreEngine::handleRoundTrip(const DebuggerResponse &response)