| 157 | }; |
| 158 | |
| 159 | void MIVariable::attachMaybe(QObject *callback, const char *callbackMethod) |
| 160 | { |
| 161 | if (!m_varobj.isEmpty()) |
| 162 | return; |
| 163 | |
| 164 | // Try find a current session and attach to it |
| 165 | if (!ICore::self()->debugController()) return; //happens on shutdown |
| 166 | m_debugSession = static_cast<MIDebugSession*>(ICore::self()->debugController()->currentSession()); |
| 167 | |
| 168 | if (sessionIsAlive()) { |
| 169 | m_debugSession->addCommand(VarCreate, |
| 170 | QStringLiteral("var%1 @ %2").arg(nextId++).arg(enquotedExpression()), |
| 171 | new CreateVarobjHandler(this, callback, callbackMethod)); |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | void MIVariable::markAsDead() |
| 176 | { |
no test coverage detected