Changeset View
Changeset View
Standalone View
Standalone View
debuggers/gdb/unittests/test_gdb.cpp
Show First 20 Lines • Show All 1745 Lines • ▼ Show 20 Line(s) | 1739 | { | |||
---|---|---|---|---|---|
1746 | 1746 | | |||
1747 | session->startDebugging(&cfg, m_iface); | 1747 | session->startDebugging(&cfg, m_iface); | ||
1748 | WAIT_FOR_STATE(session, DebugSession::PausedState); | 1748 | WAIT_FOR_STATE(session, DebugSession::PausedState); | ||
1749 | QTest::qWait(1000); | 1749 | QTest::qWait(1000); | ||
1750 | TestFrameStackModel* fsModel = session->frameStackModel(); | 1750 | TestFrameStackModel* fsModel = session->frameStackModel(); | ||
1751 | QCOMPARE(fsModel->currentFrame(), 0); | 1751 | QCOMPARE(fsModel->currentFrame(), 0); | ||
1752 | QCOMPARE(session->line(), 29); | 1752 | QCOMPARE(session->line(), 29); | ||
1753 | 1753 | | |||
1754 | session->addCommand(new MI::MICommand(MI::NonMI, "catch throw")); | 1754 | session->addCommand(MI::NonMI, "catch throw"); | ||
1755 | session->run(); | 1755 | session->run(); | ||
1756 | WAIT_FOR_STATE(session, DebugSession::PausedState); | 1756 | WAIT_FOR_STATE(session, DebugSession::PausedState); | ||
1757 | QTest::qWait(1000); | 1757 | QTest::qWait(1000); | ||
1758 | 1758 | | |||
1759 | const QList<KDevelop::FrameStackModel::FrameItem> frames = fsModel->frames(fsModel->currentThread()); | 1759 | const QList<KDevelop::FrameStackModel::FrameItem> frames = fsModel->frames(fsModel->currentThread()); | ||
1760 | QVERIFY(frames.size() >= 2); | 1760 | QVERIFY(frames.size() >= 2); | ||
1761 | // frame 0 is somewhere inside libstdc++ | 1761 | // frame 0 is somewhere inside libstdc++ | ||
1762 | QCOMPARE(frames[1].file, QUrl::fromLocalFile(findSourceFile("debugeeexception.cpp"))); | 1762 | QCOMPARE(frames[1].file, QUrl::fromLocalFile(findSourceFile("debugeeexception.cpp"))); | ||
▲ Show 20 Lines • Show All 142 Lines • ▼ Show 20 Line(s) | |||||
1905 | void GdbTest::testRegularExpressionBreakpoint() | 1905 | void GdbTest::testRegularExpressionBreakpoint() | ||
1906 | { | 1906 | { | ||
1907 | TestDebugSession *session = new TestDebugSession; | 1907 | TestDebugSession *session = new TestDebugSession; | ||
1908 | 1908 | | |||
1909 | TestLaunchConfiguration c(findExecutable("debugeemultilocbreakpoint")); | 1909 | TestLaunchConfiguration c(findExecutable("debugeemultilocbreakpoint")); | ||
1910 | breakpoints()->addCodeBreakpoint("main"); | 1910 | breakpoints()->addCodeBreakpoint("main"); | ||
1911 | session->startDebugging(&c, m_iface); | 1911 | session->startDebugging(&c, m_iface); | ||
1912 | WAIT_FOR_STATE(session, DebugSession::PausedState); | 1912 | WAIT_FOR_STATE(session, DebugSession::PausedState); | ||
1913 | session->addCommand(new MI::MICommand(MI::NonMI, "rbreak .*aPl.*B")); | 1913 | session->addCommand(MI::NonMI, "rbreak .*aPl.*B"); | ||
1914 | QTest::qWait(100); | 1914 | QTest::qWait(100); | ||
1915 | session->run(); | 1915 | session->run(); | ||
1916 | WAIT_FOR_STATE(session, DebugSession::PausedState); | 1916 | WAIT_FOR_STATE(session, DebugSession::PausedState); | ||
1917 | QCOMPARE(breakpoints()->breakpoints().count(), 3); | 1917 | QCOMPARE(breakpoints()->breakpoints().count(), 3); | ||
1918 | 1918 | | |||
1919 | session->addCommand(new MI::MICommand(MI::BreakDelete, "")); | 1919 | session->addCommand(MI::BreakDelete, ""); | ||
1920 | session->run(); | 1920 | session->run(); | ||
1921 | WAIT_FOR_STATE(session, DebugSession::EndedState); | 1921 | WAIT_FOR_STATE(session, DebugSession::EndedState); | ||
1922 | } | 1922 | } | ||
1923 | 1923 | | |||
1924 | void GdbTest::testChangeBreakpointWhileRunning() { | 1924 | void GdbTest::testChangeBreakpointWhileRunning() { | ||
1925 | 1925 | | |||
1926 | TestDebugSession *session = new TestDebugSession; | 1926 | TestDebugSession *session = new TestDebugSession; | ||
1927 | 1927 | | |||
▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines |