MCPcopy Create free account
hub / github.com/KDE/kdevelop / queueCmd

Method queueCmd

plugins/debuggercommon/midebugsession.cpp:839–871  ·  view source on GitHub ↗

Fairly obvious that we'll add whatever command you give me to a queue Not quite so obvious though is that if we are going to run again. then any information requests become redundant and must be removed. We also try and run whatever command happens to be at the head of the queue.

Source from the content-addressed store, hash-verified

837// We also try and run whatever command happens to be at the head of
838// the queue.
839void MIDebugSession::queueCmd(std::unique_ptr<MICommand> cmd)
840{
841 if (debuggerStateIsOn(s_dbgNotStarted)) {
842 const QString messageText =
843 i18n("<b>Gdb command sent when debugger is not running</b><br>"
844 "The command was:<br> %1", cmd->initialString());
845 auto* message = new Sublime::Message(messageText, Sublime::Message::Information);
846 ICore::self()->uiController()->postMessage(message);
847 return;
848 }
849
850 if (m_stateReloadInProgress)
851 cmd->setStateReloading(true);
852
853 qCDebug(DEBUGGERCOMMON) << "QUEUE: " << cmd->initialString()
854 << (m_stateReloadInProgress ? "(state reloading)" : "")
855 << m_commandQueue->count() << "pending";
856
857 if (cmd->needsContext()) {
858 if (cmd->thread() == -1)
859 qCDebug(DEBUGGERCOMMON) << "\t--thread will be added on execution";
860
861 if (cmd->frame() == -1)
862 qCDebug(DEBUGGERCOMMON) << "\t--frame will be added on execution";
863 }
864
865 m_commandQueue->enqueue(std::move(cmd));
866
867 setDebuggerStateOn(s_dbgBusy);
868 raiseEvent(debugger_busy);
869
870 executeCmd();
871}
872
873void MIDebugSession::executeCmd()
874{

Callers

nothing calls this directly

Calls 9

initialStringMethod · 0.80
uiControllerMethod · 0.80
setStateReloadingMethod · 0.80
needsContextMethod · 0.80
threadMethod · 0.80
enqueueMethod · 0.80
postMessageMethod · 0.45
countMethod · 0.45
frameMethod · 0.45

Tested by

no test coverage detected