MCPcopy Create free account
hub / github.com/KDE/kdevelop / testBreakOnAccessBreakpoint

Method testBreakOnAccessBreakpoint

plugins/debuggercommon/tests/debuggertestbase.cpp:787–816  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

785}
786
787void DebuggerTestBase::testBreakOnAccessBreakpoint()
788{
789 if (isLldb()) {
790 QSKIP("Skipping... LLDB-MI does not have proper watchpoint support");
791 }
792 auto* const session = createTestDebugSession();
793 TestLaunchConfiguration cfg;
794
795 addDebugeeBreakpoint(25);
796 ActiveStateSessionSpy sessionSpy(session);
797 START_DEBUGGING_AND_WAIT_FOR_PAUSED_STATE_E(session, cfg, sessionSpy);
798 QCOMPARE(currentMiLine(session), 25);
799
800 breakpoints()->addAccessWatchpoint("i");
801
802 CONTINUE_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy);
803 QCOMPARE(currentMiLine(session), 23); // ++i (read)
804
805 CONTINUE_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy);
806 QCOMPARE(currentMiLine(session), 23); // ++i (write)
807
808 CONTINUE_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy);
809 QCOMPARE(currentMiLine(session), 23); // int j = i (read)
810
811 CONTINUE_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy);
812 QCOMPARE(currentMiLine(session), 25);
813
814 session->run();
815 WAIT_FOR_STATE(session, IDebugSession::EndedState);
816}
817
818void DebuggerTestBase::testBreakpointErrors()
819{

Callers

nothing calls this directly

Calls 3

currentMiLineFunction · 0.85
addAccessWatchpointMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected