| 144 | } |
| 145 | |
| 146 | void LldbTest::testManualBreakpoint() |
| 147 | { |
| 148 | auto *session = new TestDebugSession; |
| 149 | TestLaunchConfiguration cfg; |
| 150 | |
| 151 | breakpoints()->addCodeBreakpoint(QStringLiteral("main")); |
| 152 | ActiveStateSessionSpy sessionSpy(session); |
| 153 | START_DEBUGGING_AND_WAIT_FOR_PAUSED_STATE_E(session, cfg, sessionSpy); |
| 154 | QCOMPARE(session->currentLine(), 27); |
| 155 | |
| 156 | breakpoints()->removeRows(0, 1); |
| 157 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); |
| 158 | QCOMPARE(breakpoints()->rowCount(), 0); |
| 159 | |
| 160 | session->addCommand(MI::NonMI, QStringLiteral("break set --file debugee.cpp --line 23")); |
| 161 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); |
| 162 | QTRY_COMPARE(breakpoints()->rowCount(), 1); |
| 163 | |
| 164 | auto b = breakpoints()->breakpoint(0); |
| 165 | QCOMPARE(b->line(), 22); |
| 166 | |
| 167 | session->addCommand(MI::NonMI, QStringLiteral("break disable 2")); |
| 168 | session->addCommand(MI::NonMI, QStringLiteral("break modify -c 'i == 1' 2")); |
| 169 | session->addCommand(MI::NonMI, QStringLiteral("break modify -i 1 2")); |
| 170 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); |
| 171 | QCOMPARE(b->enabled(), false); |
| 172 | QEXPECT_FAIL("", "LLDB 4.0 does not report condition in mi response", Continue); |
| 173 | QCOMPARE(b->condition(), QString("i == 1")); |
| 174 | QEXPECT_FAIL("", "LLDB 4.0 does not report ignore hits in mi response", Continue); |
| 175 | QCOMPARE(b->ignoreHits(), 1); |
| 176 | |
| 177 | session->addCommand(MI::NonMI, QStringLiteral("break delete 2")); |
| 178 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); |
| 179 | QEXPECT_FAIL("", "LLDB 4.0 does not report breakpoint deletion as mi notification", Continue); |
| 180 | QCOMPARE(breakpoints()->rowCount(), 0); |
| 181 | |
| 182 | session->run(); |
| 183 | WAIT_FOR_STATE(session, DebugSession::EndedState); |
| 184 | } |
| 185 | |
| 186 | void LldbTest::testBreakpointDisabledOnStart() |
| 187 | { |
nothing calls this directly
no test coverage detected