| 1025 | } |
| 1026 | |
| 1027 | void MIDebugSession::slotDebuggerReady() |
| 1028 | { |
| 1029 | Q_ASSERT(m_debugger); |
| 1030 | |
| 1031 | m_stateReloadInProgress = false; |
| 1032 | |
| 1033 | executeCmd(); |
| 1034 | if (m_debugger->isReady()) { |
| 1035 | /* There is nothing in the command queue and no command is currently executing. */ |
| 1036 | if (debuggerStateIsOn(s_automaticContinue)) { |
| 1037 | if (!debuggerStateIsOn(s_appRunning)) { |
| 1038 | qCDebug(DEBUGGERCOMMON) << "Posting automatic continue"; |
| 1039 | addCommand(ExecContinue, QString(), CmdMaybeStartsRunning); |
| 1040 | } |
| 1041 | setDebuggerStateOff(s_automaticContinue); |
| 1042 | return; |
| 1043 | } |
| 1044 | |
| 1045 | if (m_stateReloadNeeded && !debuggerStateIsOn(s_appRunning)) { |
| 1046 | qCDebug(DEBUGGERCOMMON) << "Finishing program stop"; |
| 1047 | // Set to false right now, so that if 'actOnProgramPauseMI_part2' |
| 1048 | // sends some commands, we won't call it again when handling replies |
| 1049 | // from that commands. |
| 1050 | m_stateReloadNeeded = false; |
| 1051 | reloadProgramState(); |
| 1052 | } |
| 1053 | |
| 1054 | qCDebug(DEBUGGERCOMMON) << "No more commands"; |
| 1055 | setDebuggerStateOff(s_dbgBusy); |
| 1056 | raiseEvent(debugger_ready); |
| 1057 | } |
| 1058 | } |
| 1059 | |
| 1060 | void MIDebugSession::slotDebuggerExited(bool abnormal, const QString &msg) |
| 1061 | { |