| 730 | } |
| 731 | |
| 732 | void DebuggerTestBase::testBreakOnReadBreakpoint() |
| 733 | { |
| 734 | if (isLldb()) { |
| 735 | QSKIP("Skipping... LLDB-MI does not have proper watchpoint support"); |
| 736 | } |
| 737 | auto* const session = createTestDebugSession(); |
| 738 | TestLaunchConfiguration cfg; |
| 739 | |
| 740 | breakpoints()->addReadWatchpoint("foo::i"); |
| 741 | |
| 742 | ActiveStateSessionSpy sessionSpy(session); |
| 743 | START_DEBUGGING_E(session, cfg); |
| 744 | |
| 745 | for (int fooCall = 0; fooCall < 2; ++fooCall) { |
| 746 | WAIT_FOR_PAUSED_STATE(session, sessionSpy); |
| 747 | QCOMPARE(currentMiLine(session), 23); // ++i; |
| 748 | |
| 749 | CONTINUE_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy); |
| 750 | QCOMPARE(currentMiLine(session), 23); // int j = i; |
| 751 | |
| 752 | session->run(); |
| 753 | } |
| 754 | WAIT_FOR_STATE(session, IDebugSession::EndedState); |
| 755 | } |
| 756 | |
| 757 | // This test adds a read watchpoint during a debug session rather than before it in order to |
| 758 | // work around the (already fixed) GDB bug http://sourceware.org/bugzilla/show_bug.cgi?id=10136 |
nothing calls this directly
no test coverage detected