diff options
author | hjk <hjk@theqtcompany.com> | 2015-11-03 12:01:57 +0100 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2015-11-04 11:48:05 +0000 |
commit | 2b16b97f19a93e9dc9b1465e196be1de34cdd4fa (patch) | |
tree | b23388e94f2c154651cc27a1d561991a3756bfd7 /src/plugins/debugger/gdb/remotegdbserveradapter.cpp | |
parent | 3febe4e7a256af6a328135270a716961ed9f6c27 (diff) |
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>
Diffstat (limited to 'src/plugins/debugger/gdb/remotegdbserveradapter.cpp')
-rw-r--r-- | src/plugins/debugger/gdb/remotegdbserveradapter.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp index 75d7f9b633..98488d1a04 100644 --- a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp +++ b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp @@ -183,10 +183,10 @@ void GdbRemoteServerEngine::setupInferior() // postCommand("set architecture " + remoteArch); const QString solibSearchPath = rp.solibSearchPath.join(HostOsInfo::pathListSeparator()); if (!solibSearchPath.isEmpty()) - runCommand("set solib-search-path " + solibSearchPath.toLocal8Bit()); + runCommand({"set solib-search-path " + solibSearchPath.toLocal8Bit(), NoFlags}); if (!args.isEmpty()) - runCommand("-exec-arguments " + args.toLocal8Bit()); + runCommand({"-exec-arguments " + args.toLocal8Bit(), NoFlags}); setEnvironmentVariables(); @@ -210,7 +210,7 @@ void GdbRemoteServerEngine::setupInferior() // mi_execute_async_cli_command: Assertion `is_running (inferior_ptid)' // failed.\nA problem internal to GDB has been detected,[...] if (boolSetting(TargetAsync)) - runCommand("set target-async on", CB(handleSetTargetAsync)); + runCommand({"set target-async on", NoFlags, CB(handleSetTargetAsync)}); if (executableFileName.isEmpty()) { showMessage(tr("No symbol file given."), StatusBar); @@ -219,8 +219,8 @@ void GdbRemoteServerEngine::setupInferior() } if (!executableFileName.isEmpty()) { - runCommand("-file-exec-and-symbols \"" + executableFileName.toLocal8Bit() + '"', - CB(handleFileExecAndSymbols)); + runCommand({"-file-exec-and-symbols \"" + executableFileName.toLocal8Bit() + '"', + NoFlags, CB(handleFileExecAndSymbols)}); } } @@ -270,11 +270,11 @@ void GdbRemoteServerEngine::callTargetRemote() } if (m_isQnxGdb) - runCommand("target qnx " + channel, CB(handleTargetQnx)); + runCommand({"target qnx " + channel, NoFlags, CB(handleTargetQnx)}); else if (runParameters().multiProcess) - runCommand("target extended-remote " + channel, CB(handleTargetExtendedRemote)); + runCommand({"target extended-remote " + channel, NoFlags, CB(handleTargetExtendedRemote)}); else - runCommand("target remote " + channel, CB(handleTargetRemote)); + runCommand({"target remote " + channel, NoFlags, CB(handleTargetRemote)}); } void GdbRemoteServerEngine::handleTargetRemote(const DebuggerResponse &response) @@ -287,7 +287,7 @@ void GdbRemoteServerEngine::handleTargetRemote(const DebuggerResponse &response) QString postAttachCommands = stringSetting(GdbPostAttachCommands); if (!postAttachCommands.isEmpty()) { foreach (const QString &cmd, postAttachCommands.split(QLatin1Char('\n'))) - runCommand(cmd.toLatin1()); + runCommand({cmd.toLatin1(), NoFlags}); } handleInferiorPrepared(); } else { @@ -307,15 +307,15 @@ void GdbRemoteServerEngine::handleTargetExtendedRemote(const DebuggerResponse &r QString postAttachCommands = stringSetting(GdbPostAttachCommands); if (!postAttachCommands.isEmpty()) { foreach (const QString &cmd, postAttachCommands.split(QLatin1Char('\n'))) - runCommand(cmd.toLatin1()); + runCommand({cmd.toLatin1(), NoFlags}); } if (runParameters().attachPID > 0) { // attach to pid if valid // gdb server will stop the remote application itself. - runCommand("attach " + QByteArray::number(runParameters().attachPID), - CB(handleTargetExtendedAttach)); + runCommand({"attach " + QByteArray::number(runParameters().attachPID), + NoFlags, CB(handleTargetExtendedAttach)}); } else { - runCommand("-gdb-set remote exec-file " + runParameters().remoteExecutable.toLatin1(), - CB(handleTargetExtendedAttach)); + runCommand({"-gdb-set remote exec-file " + runParameters().remoteExecutable.toLatin1(), + NoFlags, CB(handleTargetExtendedAttach)}); } } else { QString msg = msgConnectRemoteServerFailed( @@ -349,9 +349,9 @@ void GdbRemoteServerEngine::handleTargetQnx(const DebuggerResponse &response) const qint64 pid = isMasterEngine() ? runParameters().attachPID : masterEngine()->runParameters().attachPID; const QString remoteExecutable = isMasterEngine() ? runParameters().remoteExecutable : masterEngine()->runParameters().remoteExecutable; if (pid > -1) - runCommand("attach " + QByteArray::number(pid), CB(handleAttach)); + runCommand({"attach " + QByteArray::number(pid), NoFlags, CB(handleAttach)}); else if (!remoteExecutable.isEmpty()) - runCommand("set nto-executable " + remoteExecutable.toLatin1(), CB(handleSetNtoExecutable)); + runCommand({"set nto-executable " + remoteExecutable.toLatin1(), NoFlags, CB(handleSetNtoExecutable)}); else handleInferiorPrepared(); } else { @@ -409,7 +409,7 @@ void GdbRemoteServerEngine::runEngine() const QString remoteExecutable = runParameters().remoteExecutable; if (!remoteExecutable.isEmpty()) { - runCommand("-exec-run", CB(handleExecRun), RunRequest); + runCommand({"-exec-run", RunRequest, CB(handleExecRun)}); } else { notifyEngineRunAndInferiorStopOk(); continueInferiorInternal(); @@ -434,7 +434,7 @@ void GdbRemoteServerEngine::interruptInferior2() { QTC_ASSERT(state() == InferiorStopRequested, qDebug() << state()); if (boolSetting(TargetAsync)) { - runCommand("-exec-interrupt", CB(handleInterruptInferior)); + runCommand({"-exec-interrupt", NoFlags, CB(handleInterruptInferior)}); } else if (m_isQnxGdb && HostOsInfo::isWindowsHost()) { m_gdbProc.interrupt(); } else { |