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

Method testBreakOnReadBreakpoint

plugins/debuggercommon/tests/debuggertestbase.cpp:732–755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

730}
731
732void 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

Callers

nothing calls this directly

Calls 3

currentMiLineFunction · 0.85
addReadWatchpointMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected