debugger: replace action(ExecuteCommand) be a direct function call

This commit is contained in:
hjk
2011-02-16 12:41:06 +01:00
parent e360083427
commit 0b662609a0
10 changed files with 24 additions and 36 deletions

View File

@@ -1062,17 +1062,19 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
m_commandTimer.stop();
}
bool GdbEngine::acceptsDebuggerCommands() const
{
return state() == InferiorStopOk
|| state() == InferiorUnrunnable;
}
void GdbEngine::executeDebuggerCommand(const QString &command)
{
if (state() == DebuggerNotReady) {
showMessage(_("GDB PROCESS NOT RUNNING, PLAIN CMD IGNORED: ") + command);
return;
}
QTC_ASSERT(acceptsDebuggerCommands(), /**/);
m_gdbAdapter->write(command.toLatin1() + "\r\n");
}
// Called from CoreAdapter and AttachAdapter
// This is called from CoreAdapter and AttachAdapter.
void GdbEngine::updateAll()
{
if (hasPython())