This test adds a read watchpoint during a debug session rather than before it in order to work around the (already fixed) GDB bug http://sourceware.org/bugzilla/show_bug.cgi?id=10136
| 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 |
| 759 | void DebuggerTestBase::testBreakOnReadBreakpoint2() |
| 760 | { |
| 761 | if (isLldb()) { |
| 762 | QSKIP("Skipping... LLDB-MI does not have proper watchpoint support"); |
| 763 | } |
| 764 | auto* const session = createTestDebugSession(); |
| 765 | TestLaunchConfiguration cfg; |
| 766 | |
| 767 | addDebugeeBreakpoint(25); |
| 768 | ActiveStateSessionSpy sessionSpy(session); |
| 769 | START_DEBUGGING_AND_WAIT_FOR_PAUSED_STATE_E(session, cfg, sessionSpy); |
| 770 | QCOMPARE(currentMiLine(session), 25); |
| 771 | |
| 772 | breakpoints()->addReadWatchpoint("i"); |
| 773 | |
| 774 | CONTINUE_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy); |
| 775 | QCOMPARE(currentMiLine(session), 23); // ++i |
| 776 | |
| 777 | CONTINUE_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy); |
| 778 | QCOMPARE(currentMiLine(session), 23); // int j = i |
| 779 | |
| 780 | CONTINUE_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy); |
| 781 | QCOMPARE(currentMiLine(session), 25); |
| 782 | |
| 783 | session->run(); |
| 784 | WAIT_FOR_STATE(session, IDebugSession::EndedState); |
| 785 | } |
| 786 | |
| 787 | void DebuggerTestBase::testBreakOnAccessBreakpoint() |
| 788 | { |
nothing calls this directly
no test coverage detected