| 112 | } |
| 113 | |
| 114 | void LldbTest::testUpdateBreakpoint() |
| 115 | { |
| 116 | // Description: user might insert breakpoints using lldb console. model should |
| 117 | // pick up the manually set breakpoint |
| 118 | auto *session = new TestDebugSession; |
| 119 | TestLaunchConfiguration cfg; |
| 120 | |
| 121 | // breakpoint 1: real line 29: foo(); |
| 122 | auto* b = breakpoints()->addCodeBreakpoint(debugeeUrl(), 28); |
| 123 | QCOMPARE(breakpoints()->rowCount(), 1); |
| 124 | |
| 125 | ActiveStateSessionSpy sessionSpy(session); |
| 126 | START_DEBUGGING_AND_WAIT_FOR_PAUSED_STATE_E(session, cfg, sessionSpy); |
| 127 | QCOMPARE(currentMiLine(session), 29); |
| 128 | |
| 129 | STEP_INTO_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy); |
| 130 | QCOMPARE(session->currentLine(), 23-1); // at the beginning of foo():23: ++i; |
| 131 | |
| 132 | session->addUserCommand(QStringLiteral("break set --file %1 --line %2").arg(debugeeFilePath()).arg(33)); |
| 133 | QTRY_COMPARE(breakpoints()->rowCount(), 2); |
| 134 | |
| 135 | b = breakpoints()->breakpoint(1); |
| 136 | QCOMPARE(b->url(), debugeeUrl()); |
| 137 | QCOMPARE(b->line(), 33-1); |
| 138 | |
| 139 | CONTINUE_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy); |
| 140 | QCOMPARE(session->currentLine(), 33-1); |
| 141 | |
| 142 | session->run(); |
| 143 | WAIT_FOR_STATE(session, DebugSession::EndedState); |
| 144 | } |
| 145 | |
| 146 | void LldbTest::testManualBreakpoint() |
| 147 | { |
nothing calls this directly
no test coverage detected