Changeset View
Changeset View
Standalone View
Standalone View
debuggers/gdb/unittests/test_gdb.cpp
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | |||||
52 | #include <QtTest/QTest> | 52 | #include <QtTest/QTest> | ||
53 | #include <QTemporaryFile> | 53 | #include <QTemporaryFile> | ||
54 | 54 | | |||
55 | using KDevelop::AutoTestShell; | 55 | using KDevelop::AutoTestShell; | ||
56 | 56 | | |||
57 | namespace KDevMI { namespace GDB { | 57 | namespace KDevMI { namespace GDB { | ||
58 | 58 | | |||
59 | QUrl findExecutable(const QString& name) | 59 | QUrl findExecutable(const QString& name) | ||
60 | | ||||
61 | { | 60 | { | ||
62 | QFileInfo info(qApp->applicationDirPath() + "/unittests/" + name); | 61 | QFileInfo info(qApp->applicationDirPath() + "/unittests/" + name); | ||
63 | Q_ASSERT(info.exists()); | 62 | Q_ASSERT(info.exists()); | ||
64 | Q_ASSERT(info.isExecutable()); | 63 | Q_ASSERT(info.isExecutable()); | ||
65 | return QUrl::fromLocalFile(info.canonicalFilePath()); | 64 | return QUrl::fromLocalFile(info.canonicalFilePath()); | ||
66 | } | 65 | } | ||
67 | 66 | | |||
68 | QString findSourceFile(const QString& name) | 67 | QString findSourceFile(const QString& name) | ||
▲ Show 20 Lines • Show All 108 Lines • ▼ Show 20 Line(s) | |||||
177 | 176 | | |||
178 | class TestDebugSession : public DebugSession | 177 | class TestDebugSession : public DebugSession | ||
179 | { | 178 | { | ||
180 | Q_OBJECT | 179 | Q_OBJECT | ||
181 | public: | 180 | public: | ||
182 | TestDebugSession() : DebugSession() | 181 | TestDebugSession() : DebugSession() | ||
183 | { | 182 | { | ||
184 | setSourceInitFile(false); | 183 | setSourceInitFile(false); | ||
184 | setAutoDisableASLR(false); | ||||
185 | m_frameStackModel = new TestFrameStackModel(this); | 185 | m_frameStackModel = new TestFrameStackModel(this); | ||
186 | KDevelop::ICore::self()->debugController()->addSession(this); | 186 | KDevelop::ICore::self()->debugController()->addSession(this); | ||
187 | } | 187 | } | ||
188 | 188 | | |||
189 | QUrl url() { return currentUrl(); } | 189 | QUrl url() { return currentUrl(); } | ||
190 | int line() { return currentLine(); } | 190 | int line() { return currentLine(); } | ||
191 | 191 | | |||
192 | TestFrameStackModel* frameStackModel() const override | 192 | TestFrameStackModel* frameStackModel() const override | ||
▲ Show 20 Lines • Show All 1851 Lines • Show Last 20 Lines |