Changeset View
Changeset View
Standalone View
Standalone View
debuggers/lldb/unittests/test_lldb.cpp
Show All 20 Lines | |||||
21 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 21 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | * | 22 | * | ||
23 | */ | 23 | */ | ||
24 | 24 | | |||
25 | #include "test_lldb.h" | 25 | #include "test_lldb.h" | ||
26 | 26 | | |||
27 | #include "controllers/framestackmodel.h" | 27 | #include "controllers/framestackmodel.h" | ||
28 | #include "debugsession.h" | 28 | #include "debugsession.h" | ||
29 | #include "testhelper.h" | 29 | #include "tests/debuggers-tests-config.h" | ||
30 | #include "tests/testhelper.h" | ||||
30 | 31 | | |||
31 | #include <execute/iexecuteplugin.h> | 32 | #include <execute/iexecuteplugin.h> | ||
32 | #include <debugger/breakpoint/breakpointmodel.h> | 33 | #include <debugger/breakpoint/breakpointmodel.h> | ||
33 | #include <debugger/variable/variablecollection.h> | 34 | #include <debugger/variable/variablecollection.h> | ||
34 | #include <interfaces/idebugcontroller.h> | 35 | #include <interfaces/idebugcontroller.h> | ||
35 | #include <interfaces/ilaunchconfiguration.h> | 36 | #include <interfaces/ilaunchconfiguration.h> | ||
36 | #include <interfaces/iplugincontroller.h> | 37 | #include <interfaces/iplugincontroller.h> | ||
37 | #include <tests/autotestshell.h> | 38 | #include <tests/autotestshell.h> | ||
Show All 9 Lines | |||||
47 | #include <QString> | 48 | #include <QString> | ||
48 | #include <QStringList> | 49 | #include <QStringList> | ||
49 | #include <QTest> | 50 | #include <QTest> | ||
50 | #include <QTemporaryFile> | 51 | #include <QTemporaryFile> | ||
51 | #include <QUrl> | 52 | #include <QUrl> | ||
52 | #include <QDir> | 53 | #include <QDir> | ||
53 | 54 | | |||
54 | #define WAIT_FOR_STATE(session, state) \ | 55 | #define WAIT_FOR_STATE(session, state) \ | ||
55 | do { if (!KDevMI::LLDB::waitForState((session), (state), __FILE__, __LINE__)) return; } while (0) | 56 | do { if (!KDevMI::waitForState((session), (state), __FILE__, __LINE__)) return; } while (0) | ||
56 | 57 | | |||
57 | #define WAIT_FOR_STATE_AND_IDLE(session, state) \ | 58 | #define WAIT_FOR_STATE_AND_IDLE(session, state) \ | ||
58 | do { if (!KDevMI::LLDB::waitForState((session), (state), __FILE__, __LINE__, true)) return; } while (0) | 59 | do { if (!KDevMI::waitForState((session), (state), __FILE__, __LINE__, true)) return; } while (0) | ||
59 | 60 | | |||
60 | #define WAIT_FOR_A_WHILE(session, ms) \ | 61 | #define WAIT_FOR_A_WHILE(session, ms) \ | ||
61 | do { if (!KDevMI::LLDB::waitForAWhile((session), (ms), __FILE__, __LINE__)) return; } while (0) | 62 | do { if (!KDevMI::waitForAWhile((session), (ms), __FILE__, __LINE__)) return; } while (0) | ||
62 | 63 | | |||
63 | #define WAIT_FOR(session, condition) \ | 64 | #define WAIT_FOR(session, condition) \ | ||
64 | do { \ | 65 | do { \ | ||
65 | KDevMI::LLDB::TestWaiter w((session), #condition, __FILE__, __LINE__); \ | 66 | KDevMI::TestWaiter w((session), #condition, __FILE__, __LINE__); \ | ||
66 | while (w.waitUnless((condition))) /* nothing */ ; \ | 67 | while (w.waitUnless((condition))) /* nothing */ ; \ | ||
67 | } while(0) | 68 | } while(0) | ||
68 | 69 | | |||
69 | #define COMPARE_DATA(index, expected) \ | 70 | #define COMPARE_DATA(index, expected) \ | ||
70 | do { if (!KDevMI::LLDB::compareData((index), (expected), __FILE__, __LINE__)) return; } while (0) | 71 | do { if (!KDevMI::compareData((index), (expected), __FILE__, __LINE__)) return; } while (0) | ||
71 | 72 | | |||
72 | #define SKIP_IF_ATTACH_FORBIDDEN() \ | 73 | #define SKIP_IF_ATTACH_FORBIDDEN() \ | ||
73 | do { \ | 74 | do { \ | ||
74 | if (isAttachForbidden(__FILE__, __LINE__)) \ | 75 | if (KDevMI::isAttachForbidden(__FILE__, __LINE__)) \ | ||
75 | return; \ | 76 | return; \ | ||
76 | } while(0) | 77 | } while(0) | ||
77 | 78 | | |||
78 | #define findSourceFile(name) \ | | |||
79 | findSourceFile(__FILE__, (name)) | | |||
80 | | ||||
81 | using namespace KDevelop; | 79 | using namespace KDevelop; | ||
82 | using namespace KDevMI::LLDB; | 80 | using namespace KDevMI::LLDB; | ||
81 | using KDevMI::findExecutable; | ||||
82 | using KDevMI::findSourceFile; | ||||
83 | 83 | | |||
84 | namespace { | 84 | namespace { | ||
85 | class WritableEnvironmentProfileList : public EnvironmentProfileList | 85 | class WritableEnvironmentProfileList : public EnvironmentProfileList | ||
86 | { | 86 | { | ||
87 | public: | 87 | public: | ||
88 | explicit WritableEnvironmentProfileList(KConfig* config) : EnvironmentProfileList(config) {} | 88 | explicit WritableEnvironmentProfileList(KConfig* config) : EnvironmentProfileList(config) {} | ||
89 | 89 | | |||
90 | using EnvironmentProfileList::variables; | 90 | using EnvironmentProfileList::variables; | ||
91 | using EnvironmentProfileList::saveSettings; | 91 | using EnvironmentProfileList::saveSettings; | ||
92 | using EnvironmentProfileList::removeProfile; | 92 | using EnvironmentProfileList::removeProfile; | ||
93 | }; | 93 | }; | ||
94 | 94 | | |||
95 | class TestLaunchConfiguration : public ILaunchConfiguration | 95 | class TestLaunchConfiguration : public ILaunchConfiguration | ||
96 | { | 96 | { | ||
97 | public: | 97 | public: | ||
98 | explicit TestLaunchConfiguration(const QUrl& executable = findExecutable(QStringLiteral("lldb_debugee")), | 98 | explicit TestLaunchConfiguration(const QUrl& executable = findExecutable(QStringLiteral("debuggee_debugee")), | ||
99 | const QUrl& workingDirectory = QUrl()) { | 99 | const QUrl& workingDirectory = QUrl()) { | ||
100 | qDebug() << "FIND" << executable; | 100 | qDebug() << "FIND" << executable; | ||
101 | c = new KConfig(); | 101 | c = new KConfig(); | ||
102 | c->deleteGroup("launch"); | 102 | c->deleteGroup("launch"); | ||
103 | cfg = c->group("launch"); | 103 | cfg = c->group("launch"); | ||
104 | cfg.writeEntry("isExecutable", true); | 104 | cfg.writeEntry("isExecutable", true); | ||
105 | cfg.writeEntry("Executable", executable); | 105 | cfg.writeEntry("Executable", executable); | ||
106 | cfg.writeEntry("Working Directory", workingDirectory); | 106 | cfg.writeEntry("Working Directory", workingDirectory); | ||
Show All 37 Lines | |||||
144 | }; | 144 | }; | ||
145 | 145 | | |||
146 | class TestDebugSession : public DebugSession | 146 | class TestDebugSession : public DebugSession | ||
147 | { | 147 | { | ||
148 | Q_OBJECT | 148 | Q_OBJECT | ||
149 | public: | 149 | public: | ||
150 | TestDebugSession() : DebugSession() | 150 | TestDebugSession() : DebugSession() | ||
151 | { | 151 | { | ||
152 | // explicit set formatter path to force use in-tree formatters, not the one installed in system. | ||||
153 | QFileInfo info(QFileInfo(__FILE__).path(), "../formatters/all.py"); | ||||
154 | Q_ASSERT(info.exists()); | ||||
155 | setFormatterPath(info.canonicalFilePath()); | ||||
156 | | ||||
152 | setSourceInitFile(false); | 157 | setSourceInitFile(false); | ||
153 | m_frameStackModel = new TestFrameStackModel(this); | 158 | m_frameStackModel = new TestFrameStackModel(this); | ||
154 | setFormatterPath(findSourceFile("../formatters/all.py")); | 159 | | ||
155 | KDevelop::ICore::self()->debugController()->addSession(this); | 160 | KDevelop::ICore::self()->debugController()->addSession(this); | ||
156 | } | 161 | } | ||
157 | 162 | | |||
158 | TestFrameStackModel* frameStackModel() const override | 163 | TestFrameStackModel* frameStackModel() const override | ||
159 | { | 164 | { | ||
160 | return m_frameStackModel; | 165 | return m_frameStackModel; | ||
161 | } | 166 | } | ||
162 | 167 | | |||
▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Line(s) | 241 | { | |||
253 | } | 258 | } | ||
254 | QCOMPARE(outputLines, QStringList() << "Hello, world!" | 259 | QCOMPARE(outputLines, QStringList() << "Hello, world!" | ||
255 | << "Hello"); | 260 | << "Hello"); | ||
256 | } | 261 | } | ||
257 | 262 | | |||
258 | void LldbTest::testEnvironmentSet() | 263 | void LldbTest::testEnvironmentSet() | ||
259 | { | 264 | { | ||
260 | TestDebugSession *session = new TestDebugSession; | 265 | TestDebugSession *session = new TestDebugSession; | ||
261 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("lldb_debugeeechoenv"))); | 266 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("debuggee_debugeeechoenv"))); | ||
262 | 267 | | |||
263 | cfg.config().writeEntry("EnvironmentGroup", "LldbTestGroup"); | 268 | cfg.config().writeEntry("EnvironmentGroup", "LldbTestGroup"); | ||
264 | 269 | | |||
265 | WritableEnvironmentProfileList envProfiles(cfg.rootConfig()); | 270 | WritableEnvironmentProfileList envProfiles(cfg.rootConfig()); | ||
266 | envProfiles.removeProfile(QStringLiteral("LldbTestGroup")); | 271 | envProfiles.removeProfile(QStringLiteral("LldbTestGroup")); | ||
267 | auto &envs = envProfiles.variables(QStringLiteral("LldbTestGroup")); | 272 | auto &envs = envProfiles.variables(QStringLiteral("LldbTestGroup")); | ||
268 | envs[QStringLiteral("VariableA")] = QStringLiteral("-A' \" complex --value"); | 273 | envs[QStringLiteral("VariableA")] = QStringLiteral("-A' \" complex --value"); | ||
269 | envs[QStringLiteral("VariableB")] = QStringLiteral("-B' \" complex --value"); | 274 | envs[QStringLiteral("VariableB")] = QStringLiteral("-B' \" complex --value"); | ||
▲ Show 20 Lines • Show All 399 Lines • ▼ Show 20 Line(s) | 648 | { | |||
669 | 674 | | |||
670 | session->run(); | 675 | session->run(); | ||
671 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 676 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
672 | } | 677 | } | ||
673 | 678 | | |||
674 | void LldbTest::testInsertBreakpointWhileRunning() | 679 | void LldbTest::testInsertBreakpointWhileRunning() | ||
675 | { | 680 | { | ||
676 | TestDebugSession *session = new TestDebugSession; | 681 | TestDebugSession *session = new TestDebugSession; | ||
677 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("lldb_debugeeslow"))); | 682 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("debuggee_debugeeslow"))); | ||
678 | QString fileName = findSourceFile("debugeeslow.cpp"); | 683 | QString fileName = findSourceFile("debugeeslow.cpp"); | ||
679 | 684 | | |||
680 | QVERIFY(session->startDebugging(&cfg, m_iface)); | 685 | QVERIFY(session->startDebugging(&cfg, m_iface)); | ||
681 | 686 | | |||
682 | WAIT_FOR_STATE(session, DebugSession::ActiveState); | 687 | WAIT_FOR_STATE(session, DebugSession::ActiveState); | ||
683 | WAIT_FOR_A_WHILE(session, 2000); | 688 | WAIT_FOR_A_WHILE(session, 2000); | ||
684 | 689 | | |||
685 | qDebug() << "adding breakpoint"; | 690 | qDebug() << "adding breakpoint"; | ||
686 | KDevelop::Breakpoint *b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 25); | 691 | KDevelop::Breakpoint *b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 25); | ||
687 | WAIT_FOR_A_WHILE(session, 500); | 692 | WAIT_FOR_A_WHILE(session, 500); | ||
688 | 693 | | |||
689 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 694 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
690 | WAIT_FOR_A_WHILE(session, 500); | 695 | WAIT_FOR_A_WHILE(session, 500); | ||
691 | 696 | | |||
692 | QCOMPARE(session->currentLine(), 25); | 697 | QCOMPARE(session->currentLine(), 25); | ||
693 | b->setDeleted(); | 698 | b->setDeleted(); | ||
694 | session->run(); | 699 | session->run(); | ||
695 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 700 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
696 | } | 701 | } | ||
697 | 702 | | |||
698 | void LldbTest::testInsertBreakpointWhileRunningMultiple() | 703 | void LldbTest::testInsertBreakpointWhileRunningMultiple() | ||
699 | { | 704 | { | ||
700 | TestDebugSession *session = new TestDebugSession; | 705 | TestDebugSession *session = new TestDebugSession; | ||
701 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("lldb_debugeeslow"))); | 706 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("debuggee_debugeeslow"))); | ||
702 | QString fileName = findSourceFile("debugeeslow.cpp"); | 707 | QString fileName = findSourceFile("debugeeslow.cpp"); | ||
703 | 708 | | |||
704 | QVERIFY(session->startDebugging(&cfg, m_iface)); | 709 | QVERIFY(session->startDebugging(&cfg, m_iface)); | ||
705 | 710 | | |||
706 | WAIT_FOR_STATE(session, DebugSession::ActiveState); | 711 | WAIT_FOR_STATE(session, DebugSession::ActiveState); | ||
707 | WAIT_FOR_A_WHILE(session, 2000); | 712 | WAIT_FOR_A_WHILE(session, 2000); | ||
708 | 713 | | |||
709 | qDebug() << "adding breakpoint"; | 714 | qDebug() << "adding breakpoint"; | ||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | 752 | { | |||
781 | session->run(); | 786 | session->run(); | ||
782 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 787 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
783 | } | 788 | } | ||
784 | 789 | | |||
785 | //Bug 201771 | 790 | //Bug 201771 | ||
786 | void LldbTest::testInsertAndRemoveBreakpointWhileRunning() | 791 | void LldbTest::testInsertAndRemoveBreakpointWhileRunning() | ||
787 | { | 792 | { | ||
788 | TestDebugSession *session = new TestDebugSession; | 793 | TestDebugSession *session = new TestDebugSession; | ||
789 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("lldb_debugeeslow"))); | 794 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("debuggee_debugeeslow"))); | ||
790 | 795 | | |||
791 | QString fileName = findSourceFile("debugeeslow.cpp"); | 796 | QString fileName = findSourceFile("debugeeslow.cpp"); | ||
792 | 797 | | |||
793 | QVERIFY(session->startDebugging(&cfg, m_iface)); | 798 | QVERIFY(session->startDebugging(&cfg, m_iface)); | ||
794 | WAIT_FOR_STATE(session, DebugSession::ActiveState); | 799 | WAIT_FOR_STATE(session, DebugSession::ActiveState); | ||
795 | WAIT_FOR_A_WHILE(session, 1000); | 800 | WAIT_FOR_A_WHILE(session, 1000); | ||
796 | 801 | | |||
797 | KDevelop::Breakpoint *b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 25); | 802 | KDevelop::Breakpoint *b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 25); | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 834 | { | |||
849 | 854 | | |||
850 | session->run(); | 855 | session->run(); | ||
851 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 856 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
852 | } | 857 | } | ||
853 | 858 | | |||
854 | void LldbTest::testBreakpointWithSpaceInPath() | 859 | void LldbTest::testBreakpointWithSpaceInPath() | ||
855 | { | 860 | { | ||
856 | TestDebugSession *session = new TestDebugSession; | 861 | TestDebugSession *session = new TestDebugSession; | ||
857 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("lldb_debugeespace"))); | 862 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("debuggee_debugeespace"))); | ||
858 | 863 | | |||
859 | KConfigGroup grp = cfg.config(); | 864 | KConfigGroup grp = cfg.config(); | ||
860 | QString fileName = findSourceFile("debugee space.cpp"); | 865 | QString fileName = findSourceFile("debugee space.cpp"); | ||
861 | 866 | | |||
862 | KDevelop::Breakpoint * b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 20); | 867 | KDevelop::Breakpoint * b = breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 20); | ||
863 | QCOMPARE(b->state(), KDevelop::Breakpoint::NotStartedState); | 868 | QCOMPARE(b->state(), KDevelop::Breakpoint::NotStartedState); | ||
864 | 869 | | |||
865 | QVERIFY(session->startDebugging(&cfg, m_iface)); | 870 | QVERIFY(session->startDebugging(&cfg, m_iface)); | ||
Show All 27 Lines | 879 | { | |||
893 | 898 | | |||
894 | session->run(); | 899 | session->run(); | ||
895 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 900 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
896 | } | 901 | } | ||
897 | 902 | | |||
898 | void LldbTest::testMultipleLocationsBreakpoint() | 903 | void LldbTest::testMultipleLocationsBreakpoint() | ||
899 | { | 904 | { | ||
900 | TestDebugSession *session = new TestDebugSession; | 905 | TestDebugSession *session = new TestDebugSession; | ||
901 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("lldb_debugeemultilocbreakpoint"))); | 906 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("debuggee_debugeemultilocbreakpoint"))); | ||
902 | 907 | | |||
903 | breakpoints()->addCodeBreakpoint(QStringLiteral("aPlusB")); | 908 | breakpoints()->addCodeBreakpoint(QStringLiteral("aPlusB")); | ||
904 | 909 | | |||
905 | //TODO check if the additional location breakpoint is added | 910 | //TODO check if the additional location breakpoint is added | ||
906 | 911 | | |||
907 | QVERIFY(session->startDebugging(&cfg, m_iface)); | 912 | QVERIFY(session->startDebugging(&cfg, m_iface)); | ||
908 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 913 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
909 | QCOMPARE(session->currentLine(), 19); | 914 | QCOMPARE(session->currentLine(), 19); | ||
910 | 915 | | |||
911 | session->run(); | 916 | session->run(); | ||
912 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 917 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
913 | QCOMPARE(session->currentLine(), 23); | 918 | QCOMPARE(session->currentLine(), 23); | ||
914 | 919 | | |||
915 | session->run(); | 920 | session->run(); | ||
916 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 921 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
917 | } | 922 | } | ||
918 | 923 | | |||
919 | void LldbTest::testMultipleBreakpoint() | 924 | void LldbTest::testMultipleBreakpoint() | ||
920 | { | 925 | { | ||
921 | TestDebugSession *session = new TestDebugSession; | 926 | TestDebugSession *session = new TestDebugSession; | ||
922 | 927 | | |||
923 | //there'll be about 3-4 breakpoints, but we treat it like one. | 928 | //there'll be about 3-4 breakpoints, but we treat it like one. | ||
924 | TestLaunchConfiguration c(findExecutable(QStringLiteral("lldb_debugeemultiplebreakpoint"))); | 929 | TestLaunchConfiguration c(findExecutable(QStringLiteral("debuggee_debugeemultiplebreakpoint"))); | ||
925 | auto b = breakpoints()->addCodeBreakpoint(QStringLiteral("debugeemultiplebreakpoint.cpp:52")); | 930 | auto b = breakpoints()->addCodeBreakpoint(QStringLiteral("debugeemultiplebreakpoint.cpp:52")); | ||
926 | 931 | | |||
927 | QVERIFY(session->startDebugging(&c, m_iface)); | 932 | QVERIFY(session->startDebugging(&c, m_iface)); | ||
928 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 933 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
929 | 934 | | |||
930 | QCOMPARE(breakpoints()->breakpoints().count(), 1); | 935 | QCOMPARE(breakpoints()->breakpoints().count(), 1); | ||
931 | 936 | | |||
932 | b->setData(KDevelop::Breakpoint::EnableColumn, Qt::Unchecked); | 937 | b->setData(KDevelop::Breakpoint::EnableColumn, Qt::Unchecked); | ||
933 | session->run(); | 938 | session->run(); | ||
934 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 939 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
935 | } | 940 | } | ||
936 | 941 | | |||
937 | void LldbTest::testRegularExpressionBreakpoint() | 942 | void LldbTest::testRegularExpressionBreakpoint() | ||
938 | { | 943 | { | ||
939 | QSKIP("Skipping... lldb has only one breakpoint for multiple locations" | 944 | QSKIP("Skipping... lldb has only one breakpoint for multiple locations" | ||
940 | " (and lldb-mi returns the first one), not support this yet"); | 945 | " (and lldb-mi returns the first one), not support this yet"); | ||
941 | TestDebugSession *session = new TestDebugSession; | 946 | TestDebugSession *session = new TestDebugSession; | ||
942 | TestLaunchConfiguration c(findExecutable(QStringLiteral("lldb_debugeemultilocbreakpoint"))); | 947 | TestLaunchConfiguration c(findExecutable(QStringLiteral("debuggee_debugeemultilocbreakpoint"))); | ||
943 | 948 | | |||
944 | breakpoints()->addCodeBreakpoint(QStringLiteral("main")); | 949 | breakpoints()->addCodeBreakpoint(QStringLiteral("main")); | ||
945 | QVERIFY(session->startDebugging(&c, m_iface)); | 950 | QVERIFY(session->startDebugging(&c, m_iface)); | ||
946 | 951 | | |||
947 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 952 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
948 | 953 | | |||
949 | session->addCommand(MI::NonMI, QStringLiteral("break set --func-regex .*aPl.*B")); | 954 | session->addCommand(MI::NonMI, QStringLiteral("break set --func-regex .*aPl.*B")); | ||
950 | session->run(); | 955 | session->run(); | ||
951 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 956 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
952 | 957 | | |||
953 | QCOMPARE(breakpoints()->breakpoints().count(), 3); | 958 | QCOMPARE(breakpoints()->breakpoints().count(), 3); | ||
954 | 959 | | |||
955 | session->addCommand(MI::BreakDelete, QLatin1String("")); | 960 | session->addCommand(MI::BreakDelete, QLatin1String("")); | ||
956 | session->run(); | 961 | session->run(); | ||
957 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 962 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
958 | } | 963 | } | ||
959 | 964 | | |||
960 | void LldbTest::testChangeBreakpointWhileRunning() | 965 | void LldbTest::testChangeBreakpointWhileRunning() | ||
961 | { | 966 | { | ||
962 | QSKIP("Skipping... lldb-mi command -break-enable doesn't enable breakpoint"); | 967 | QSKIP("Skipping... lldb-mi command -break-enable doesn't enable breakpoint"); | ||
963 | TestDebugSession *session = new TestDebugSession; | 968 | TestDebugSession *session = new TestDebugSession; | ||
964 | TestLaunchConfiguration c(findExecutable(QStringLiteral("lldb_debugeeslow"))); | 969 | TestLaunchConfiguration c(findExecutable(QStringLiteral("debuggee_debugeeslow"))); | ||
965 | 970 | | |||
966 | KDevelop::Breakpoint* b = breakpoints()->addCodeBreakpoint(QStringLiteral("debugeeslow.cpp:25")); | 971 | KDevelop::Breakpoint* b = breakpoints()->addCodeBreakpoint(QStringLiteral("debugeeslow.cpp:25")); | ||
967 | QVERIFY(session->startDebugging(&c, m_iface)); | 972 | QVERIFY(session->startDebugging(&c, m_iface)); | ||
968 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 973 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
969 | 974 | | |||
970 | QVERIFY(session->currentLine() >= 24 && session->currentLine() <= 26 ); | 975 | QVERIFY(session->currentLine() >= 24 && session->currentLine() <= 26 ); | ||
971 | 976 | | |||
972 | session->run(); | 977 | session->run(); | ||
Show All 16 Lines | |||||
989 | 994 | | |||
990 | session->run(); | 995 | session->run(); | ||
991 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 996 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
992 | } | 997 | } | ||
993 | 998 | | |||
994 | void LldbTest::testCatchpoint() | 999 | void LldbTest::testCatchpoint() | ||
995 | { | 1000 | { | ||
996 | TestDebugSession *session = new TestDebugSession; | 1001 | TestDebugSession *session = new TestDebugSession; | ||
997 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("lldb_debugeeexception"))); | 1002 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("debuggee_debugeeexception"))); | ||
998 | 1003 | | |||
999 | session->variableController()->setAutoUpdate(KDevelop::IVariableController::UpdateLocals); | 1004 | session->variableController()->setAutoUpdate(KDevelop::IVariableController::UpdateLocals); | ||
1000 | TestFrameStackModel* fsModel = session->frameStackModel(); | 1005 | TestFrameStackModel* fsModel = session->frameStackModel(); | ||
1001 | 1006 | | |||
1002 | breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(findSourceFile("debugeeexception.cpp")), 29); | 1007 | breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(findSourceFile("debugeeexception.cpp")), 29); | ||
1003 | 1008 | | |||
1004 | QVERIFY(session->startDebugging(&cfg, m_iface)); | 1009 | QVERIFY(session->startDebugging(&cfg, m_iface)); | ||
1005 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 1010 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Line(s) | 1070 | { | |||
1109 | 1114 | | |||
1110 | session->run(); | 1115 | session->run(); | ||
1111 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 1116 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
1112 | } | 1117 | } | ||
1113 | 1118 | | |||
1114 | void LldbTest::testStackFetchMore() | 1119 | void LldbTest::testStackFetchMore() | ||
1115 | { | 1120 | { | ||
1116 | TestDebugSession *session = new TestDebugSession; | 1121 | TestDebugSession *session = new TestDebugSession; | ||
1117 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("lldb_debugeerecursion"))); | 1122 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("debuggee_debugeerecursion"))); | ||
1118 | QString fileName = findSourceFile("debugeerecursion.cpp"); | 1123 | QString fileName = findSourceFile("debugeerecursion.cpp"); | ||
1119 | 1124 | | |||
1120 | TestFrameStackModel *stackModel = session->frameStackModel(); | 1125 | TestFrameStackModel *stackModel = session->frameStackModel(); | ||
1121 | 1126 | | |||
1122 | breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 25); | 1127 | breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 25); | ||
1123 | 1128 | | |||
1124 | QVERIFY(session->startDebugging(&cfg, m_iface)); | 1129 | QVERIFY(session->startDebugging(&cfg, m_iface)); | ||
1125 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 1130 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
▲ Show 20 Lines • Show All 92 Lines • ▼ Show 20 Line(s) | 1196 | { | |||
1218 | session->run(); | 1223 | session->run(); | ||
1219 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 1224 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
1220 | } | 1225 | } | ||
1221 | 1226 | | |||
1222 | void LldbTest::testStackSwitchThread() | 1227 | void LldbTest::testStackSwitchThread() | ||
1223 | { | 1228 | { | ||
1224 | QSKIP("Skipping... lldb-mi crashes when break at a location with multiple threads running"); | 1229 | QSKIP("Skipping... lldb-mi crashes when break at a location with multiple threads running"); | ||
1225 | TestDebugSession *session = new TestDebugSession; | 1230 | TestDebugSession *session = new TestDebugSession; | ||
1226 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("lldb_debugeethreads"))); | 1231 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("debuggee_debugeethreads"))); | ||
1227 | QString fileName = findSourceFile("debugeethreads.cpp"); | 1232 | QString fileName = findSourceFile("debugeethreads.cpp"); | ||
1228 | 1233 | | |||
1229 | TestFrameStackModel *stackModel = session->frameStackModel(); | 1234 | TestFrameStackModel *stackModel = session->frameStackModel(); | ||
1230 | 1235 | | |||
1231 | breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 38); | 1236 | breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 38); | ||
1232 | QVERIFY(session->startDebugging(&cfg, m_iface)); | 1237 | QVERIFY(session->startDebugging(&cfg, m_iface)); | ||
1233 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 1238 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
1234 | 1239 | | |||
Show All 19 Lines | |||||
1254 | 1259 | | |||
1255 | void LldbTest::testAttach() | 1260 | void LldbTest::testAttach() | ||
1256 | { | 1261 | { | ||
1257 | SKIP_IF_ATTACH_FORBIDDEN(); | 1262 | SKIP_IF_ATTACH_FORBIDDEN(); | ||
1258 | 1263 | | |||
1259 | QString fileName = findSourceFile("debugeeslow.cpp"); | 1264 | QString fileName = findSourceFile("debugeeslow.cpp"); | ||
1260 | 1265 | | |||
1261 | KProcess debugeeProcess; | 1266 | KProcess debugeeProcess; | ||
1262 | debugeeProcess << QStringLiteral("nice") << findExecutable(QStringLiteral("lldb_debugeeslow")).toLocalFile(); | 1267 | debugeeProcess << QStringLiteral("nice") << findExecutable(QStringLiteral("debuggee_debugeeslow")).toLocalFile(); | ||
1263 | debugeeProcess.start(); | 1268 | debugeeProcess.start(); | ||
1264 | QVERIFY(debugeeProcess.waitForStarted()); | 1269 | QVERIFY(debugeeProcess.waitForStarted()); | ||
1265 | QTest::qWait(100); | 1270 | QTest::qWait(100); | ||
1266 | 1271 | | |||
1267 | TestDebugSession *session = new TestDebugSession; | 1272 | TestDebugSession *session = new TestDebugSession; | ||
1268 | session->attachToProcess(debugeeProcess.pid()); | 1273 | session->attachToProcess(debugeeProcess.pid()); | ||
1269 | 1274 | | |||
1270 | WAIT_FOR_A_WHILE(session, 100); | 1275 | WAIT_FOR_A_WHILE(session, 100); | ||
Show All 31 Lines | 1291 | { | |||
1302 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 1307 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
1303 | 1308 | | |||
1304 | session->run(); | 1309 | session->run(); | ||
1305 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 1310 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
1306 | } | 1311 | } | ||
1307 | 1312 | | |||
1308 | void LldbTest::testCoreFile() | 1313 | void LldbTest::testCoreFile() | ||
1309 | { | 1314 | { | ||
1310 | QFile f(QStringLiteral("core")); | 1315 | QFileInfo f(QStringLiteral("core")); | ||
1311 | if (f.exists()) f.remove(); | 1316 | if (f.exists()) QFile::remove(f.canonicalFilePath()); | ||
1312 | 1317 | | |||
1313 | KProcess debugeeProcess; | 1318 | KProcess debugeeProcess; | ||
1314 | debugeeProcess.setOutputChannelMode(KProcess::MergedChannels); | 1319 | debugeeProcess.setOutputChannelMode(KProcess::MergedChannels); | ||
1315 | debugeeProcess << QStringLiteral("bash") << QStringLiteral("-c") << "ulimit -c unlimited; " + findExecutable(QStringLiteral("lldb_crash")).toLocalFile(); | 1320 | debugeeProcess << QStringLiteral("bash") << QStringLiteral("-c") | ||
1321 | << "ulimit -c unlimited; " | ||||
1322 | + findExecutable(QStringLiteral("debuggee_crash")).toLocalFile(); | ||||
1316 | debugeeProcess.start(); | 1323 | debugeeProcess.start(); | ||
1317 | debugeeProcess.waitForFinished(); | 1324 | debugeeProcess.waitForFinished(); | ||
1318 | qDebug() << debugeeProcess.readAll(); | 1325 | qDebug() << debugeeProcess.readAll(); | ||
1319 | 1326 | | |||
1320 | bool coreFileFound = QFile::exists(QStringLiteral("core")); | 1327 | bool coreFileFound = f.exists(); | ||
1321 | if (!coreFileFound) { | 1328 | if (!coreFileFound) { | ||
1322 | // Try to use coredumpctl | 1329 | // Try to use coredumpctl | ||
1323 | auto coredumpctl = QStandardPaths::findExecutable(QStringLiteral("coredumpctl")); | 1330 | auto coredumpctl = QStandardPaths::findExecutable(QStringLiteral("coredumpctl")); | ||
1324 | if (!coredumpctl.isEmpty()) { | 1331 | if (!coredumpctl.isEmpty()) { | ||
1325 | QFileInfo fi(QStringLiteral("core")); | 1332 | KProcess::execute(coredumpctl, {"-1", "-o", f.canonicalFilePath(), "dump", "debuggee_crash"}); | ||
1326 | KProcess::execute(coredumpctl, {"-1", "-o", fi.absoluteFilePath(), "dump", "lldb_crash"}); | 1333 | coreFileFound = f.exists(); | ||
1327 | coreFileFound = fi.exists(); | | |||
1328 | } | 1334 | } | ||
1329 | } | 1335 | } | ||
1330 | if (!coreFileFound) | 1336 | if (!coreFileFound) | ||
1331 | QSKIP("no core dump found, check your system configuration (see /proc/sys/kernel/core_pattern).", SkipSingle); | 1337 | QSKIP("no core dump found, check your system configuration (see /proc/sys/kernel/core_pattern).", SkipSingle); | ||
1332 | 1338 | | |||
1333 | TestDebugSession *session = new TestDebugSession; | 1339 | TestDebugSession *session = new TestDebugSession; | ||
1334 | session->examineCoreFile(findExecutable(QStringLiteral("lldb_crash")), QUrl::fromLocalFile(QDir::currentPath()+"/core")); | 1340 | session->examineCoreFile(findExecutable(QStringLiteral("debuggee_crash")), | ||
1341 | QUrl::fromLocalFile(f.canonicalFilePath())); | ||||
1335 | 1342 | | |||
1336 | TestFrameStackModel *stackModel = session->frameStackModel(); | 1343 | TestFrameStackModel *stackModel = session->frameStackModel(); | ||
1337 | 1344 | | |||
1338 | WAIT_FOR_STATE(session, DebugSession::StoppedState); | 1345 | WAIT_FOR_STATE(session, DebugSession::StoppedState); | ||
1339 | 1346 | | |||
1340 | QModelIndex tIdx = stackModel->index(0,0); | 1347 | QModelIndex tIdx = stackModel->index(0,0); | ||
1341 | QCOMPARE(stackModel->rowCount(QModelIndex()), 1); | 1348 | QCOMPARE(stackModel->rowCount(QModelIndex()), 1); | ||
1342 | QCOMPARE(stackModel->columnCount(QModelIndex()), 3); | 1349 | QCOMPARE(stackModel->columnCount(QModelIndex()), 3); | ||
▲ Show 20 Lines • Show All 354 Lines • ▼ Show 20 Line(s) | 1687 | { | |||
1697 | WAIT_FOR_A_WHILE(session, 500); | 1704 | WAIT_FOR_A_WHILE(session, 500); | ||
1698 | //currentFrame must not reset to 0; Bug 222882 | 1705 | //currentFrame must not reset to 0; Bug 222882 | ||
1699 | QCOMPARE(stackModel->currentFrame(), 1); | 1706 | QCOMPARE(stackModel->currentFrame(), 1); | ||
1700 | } | 1707 | } | ||
1701 | 1708 | | |||
1702 | void LldbTest::testSegfaultDebugee() | 1709 | void LldbTest::testSegfaultDebugee() | ||
1703 | { | 1710 | { | ||
1704 | TestDebugSession *session = new TestDebugSession; | 1711 | TestDebugSession *session = new TestDebugSession; | ||
1705 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("lldb_crash"))); | 1712 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("debuggee_crash"))); | ||
1706 | 1713 | | |||
1707 | session->variableController()->setAutoUpdate(KDevelop::IVariableController::UpdateLocals); | 1714 | session->variableController()->setAutoUpdate(KDevelop::IVariableController::UpdateLocals); | ||
1708 | 1715 | | |||
1709 | QString fileName = findSourceFile("debugeecrash.cpp"); | 1716 | QString fileName = findSourceFile("debugeecrash.cpp"); | ||
1710 | breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 23); | 1717 | breakpoints()->addCodeBreakpoint(QUrl::fromLocalFile(fileName), 23); | ||
1711 | 1718 | | |||
1712 | QVERIFY(session->startDebugging(&cfg, m_iface)); | 1719 | QVERIFY(session->startDebugging(&cfg, m_iface)); | ||
1713 | 1720 | | |||
1714 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 1721 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
1715 | QCOMPARE(session->currentLine(), 23); | 1722 | QCOMPARE(session->currentLine(), 23); | ||
1716 | session->run(); | 1723 | session->run(); | ||
1717 | 1724 | | |||
1718 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 1725 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
1719 | QCOMPARE(session->currentLine(), 24); | 1726 | QCOMPARE(session->currentLine(), 24); | ||
1720 | 1727 | | |||
1721 | session->stopDebugger(); | 1728 | session->stopDebugger(); | ||
1722 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 1729 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
1723 | } | 1730 | } | ||
1724 | 1731 | | |||
1725 | //Bug 274390 | 1732 | //Bug 274390 | ||
1726 | void LldbTest::testCommandOrderFastStepping() | 1733 | void LldbTest::testCommandOrderFastStepping() | ||
1727 | { | 1734 | { | ||
1728 | TestDebugSession *session = new TestDebugSession; | 1735 | TestDebugSession *session = new TestDebugSession; | ||
1729 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("lldb_debugeeqt"))); | 1736 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("debuggee_debugeeqt"))); | ||
1730 | 1737 | | |||
1731 | breakpoints()->addCodeBreakpoint(QStringLiteral("main")); | 1738 | breakpoints()->addCodeBreakpoint(QStringLiteral("main")); | ||
1732 | QVERIFY(session->startDebugging(&cfg, m_iface)); | 1739 | QVERIFY(session->startDebugging(&cfg, m_iface)); | ||
1733 | for(int i=0; i<20; i++) { | 1740 | for(int i=0; i<20; i++) { | ||
1734 | session->stepInto(); | 1741 | session->stepInto(); | ||
1735 | } | 1742 | } | ||
1736 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 1743 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
1737 | session->run(); | 1744 | session->run(); | ||
▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | |||||
1836 | #ifndef HAVE_PATH_WITH_SPACES_TEST | 1843 | #ifndef HAVE_PATH_WITH_SPACES_TEST | ||
1837 | QSKIP("Skipping... special path test," | 1844 | QSKIP("Skipping... special path test," | ||
1838 | " this CMake version would create a faulty build.ninja file. Upgrade to at least CMake v3.0"); | 1845 | " this CMake version would create a faulty build.ninja file. Upgrade to at least CMake v3.0"); | ||
1839 | #endif | 1846 | #endif | ||
1840 | QSKIP("Skipping... lldb-mi itself can't handle path with space in application dir"); | 1847 | QSKIP("Skipping... lldb-mi itself can't handle path with space in application dir"); | ||
1841 | 1848 | | |||
1842 | TestDebugSession* session = new TestDebugSession; | 1849 | TestDebugSession* session = new TestDebugSession; | ||
1843 | 1850 | | |||
1844 | auto debugee = findExecutable(QStringLiteral("path with space/lldb_spacedebugee")); | 1851 | auto debugee = findExecutable(QStringLiteral("path with space/debuggee_spacedebugee")); | ||
1845 | TestLaunchConfiguration c(debugee, KIO::upUrl(debugee)); | 1852 | TestLaunchConfiguration c(debugee, KIO::upUrl(debugee)); | ||
1846 | KDevelop::Breakpoint* b = breakpoints()->addCodeBreakpoint(QStringLiteral("spacedebugee.cpp:30")); | 1853 | KDevelop::Breakpoint* b = breakpoints()->addCodeBreakpoint(QStringLiteral("spacedebugee.cpp:30")); | ||
1847 | QCOMPARE(b->state(), KDevelop::Breakpoint::NotStartedState); | 1854 | QCOMPARE(b->state(), KDevelop::Breakpoint::NotStartedState); | ||
1848 | 1855 | | |||
1849 | QVERIFY(session->startDebugging(&c, m_iface)); | 1856 | QVERIFY(session->startDebugging(&c, m_iface)); | ||
1850 | 1857 | | |||
1851 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | 1858 | WAIT_FOR_STATE_AND_IDLE(session, DebugSession::PausedState); | ||
1852 | QCOMPARE(b->state(), KDevelop::Breakpoint::CleanState); | 1859 | QCOMPARE(b->state(), KDevelop::Breakpoint::CleanState); | ||
1853 | 1860 | | |||
1854 | session->run(); | 1861 | session->run(); | ||
1855 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 1862 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
1856 | } | 1863 | } | ||
1857 | 1864 | | |||
1858 | void KDevMI::LLDB::LldbTest::testEnvironmentCd() | 1865 | void KDevMI::LLDB::LldbTest::testEnvironmentCd() | ||
1859 | { | 1866 | { | ||
1860 | TestDebugSession *session = new TestDebugSession; | 1867 | TestDebugSession *session = new TestDebugSession; | ||
1861 | 1868 | | |||
1862 | QSignalSpy outputSpy(session, &TestDebugSession::inferiorStdoutLines); | 1869 | QSignalSpy outputSpy(session, &TestDebugSession::inferiorStdoutLines); | ||
1863 | 1870 | | |||
1864 | auto path = KIO::upUrl(findExecutable(QStringLiteral("path with space/lldb_spacedebugee"))); | 1871 | auto path = KIO::upUrl(findExecutable(QStringLiteral("path with space/debuggee_spacedebugee"))); | ||
1865 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("lldb_debugeepath")), path); | 1872 | TestLaunchConfiguration cfg(findExecutable(QStringLiteral("debuggee_debugeepath")), path); | ||
1866 | 1873 | | |||
1867 | QVERIFY(session->startDebugging(&cfg, m_iface)); | 1874 | QVERIFY(session->startDebugging(&cfg, m_iface)); | ||
1868 | WAIT_FOR_STATE(session, KDevelop::IDebugSession::EndedState); | 1875 | WAIT_FOR_STATE(session, KDevelop::IDebugSession::EndedState); | ||
1869 | 1876 | | |||
1870 | QVERIFY(outputSpy.count() > 0); | 1877 | QVERIFY(outputSpy.count() > 0); | ||
1871 | 1878 | | |||
1872 | QStringList outputLines; | 1879 | QStringList outputLines; | ||
1873 | while (outputSpy.count() > 0) { | 1880 | while (outputSpy.count() > 0) { | ||
Show All 11 Lines |