forked from qt-creator/qt-creator
Debugger: Make DebuggerEngine::runCommand() virtual.
Allows default implementation of e.g. stack retrieval in the base class. Change-Id: I96460b19aa31347b2c863736b4ce2b5046eb4de6 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -212,9 +212,8 @@ void GdbCoreEngine::setupInferior()
|
||||
// Do that first, otherwise no symbols are loaded.
|
||||
QFileInfo fi(m_executable);
|
||||
QByteArray path = fi.absoluteFilePath().toLocal8Bit();
|
||||
DebuggerCommand cmd("-file-exec-and-symbols \"" + path + '"');
|
||||
cmd.callback = CB(handleFileExecAndSymbols);
|
||||
runCommand(cmd);
|
||||
runCommand({"-file-exec-and-symbols \"" + path + '"', NoFlags,
|
||||
CB(handleFileExecAndSymbols)});
|
||||
}
|
||||
|
||||
void GdbCoreEngine::handleFileExecAndSymbols(const DebuggerResponse &response)
|
||||
@@ -237,9 +236,8 @@ void GdbCoreEngine::handleFileExecAndSymbols(const DebuggerResponse &response)
|
||||
void GdbCoreEngine::runEngine()
|
||||
{
|
||||
CHECK_STATE(EngineRunRequested);
|
||||
DebuggerCommand cmd("target core " + coreFileName().toLocal8Bit());
|
||||
cmd.callback = CB(handleTargetCore);
|
||||
runCommand(cmd);
|
||||
runCommand({"target core " + coreFileName().toLocal8Bit(), NoFlags,
|
||||
CB(handleTargetCore)});
|
||||
}
|
||||
|
||||
void GdbCoreEngine::handleTargetCore(const DebuggerResponse &response)
|
||||
@@ -252,7 +250,7 @@ void GdbCoreEngine::handleTargetCore(const DebuggerResponse &response)
|
||||
// symbols yet. Load them in order of importance.
|
||||
reloadStack();
|
||||
reloadModulesInternal();
|
||||
runCommand("p 5", CB(handleRoundTrip));
|
||||
runCommand({"p 5", NoFlags, CB(handleRoundTrip)});
|
||||
return;
|
||||
}
|
||||
showStatusMessage(tr("Attach to core \"%1\" failed:").arg(runParameters().coreFile)
|
||||
|
||||
Reference in New Issue
Block a user