diff options
| author | Eike Ziller <[email protected]> | 2013-05-27 17:21:01 +0200 |
|---|---|---|
| committer | Eike Ziller <[email protected]> | 2013-05-27 17:21:01 +0200 |
| commit | d08ad0038df2366a0e9b6561e526dd846be9c5a1 (patch) | |
| tree | ae641fbc2dc9056d2603bfe9b350516310943620 /src/plugins/debugger | |
| parent | 1c34b266fb86a591eb9d7ef406780073e0d6a647 (diff) | |
| parent | 5b648d8b6eb0fe9f2690a587116d71c71c9b4d96 (diff) | |
Merge remote-tracking branch 'origin/2.8'
Diffstat (limited to 'src/plugins/debugger')
| -rw-r--r-- | src/plugins/debugger/debugger.qbs | 2 | ||||
| -rw-r--r-- | src/plugins/debugger/debuggercore.h | 1 | ||||
| -rw-r--r-- | src/plugins/debugger/debuggerplugin.cpp | 12 | ||||
| -rw-r--r-- | src/plugins/debugger/debuggerrunner.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/debugger/debuggerstartparameters.h | 2 | ||||
| -rw-r--r-- | src/plugins/debugger/gdb/gdbengine.cpp | 2 | ||||
| -rw-r--r-- | src/plugins/debugger/images/qml/app-on-top.png | bin | 2902 -> 178 bytes | |||
| -rw-r--r-- | src/plugins/debugger/images/qml/apply-on-save.png | bin | 3205 -> 426 bytes | |||
| -rw-r--r-- | src/plugins/debugger/images/qml/select.png | bin | 3308 -> 568 bytes | |||
| -rw-r--r-- | src/plugins/debugger/images/qml/zoom.png | bin | 3252 -> 537 bytes | |||
| -rw-r--r-- | src/plugins/debugger/lldb/lldbengine.cpp | 86 | ||||
| -rw-r--r-- | src/plugins/debugger/lldb/lldbengine.h | 3 | ||||
| -rw-r--r-- | src/plugins/debugger/loadcoredialog.cpp | 1 | ||||
| -rw-r--r-- | src/plugins/debugger/procinterrupt.cpp | 1 |
14 files changed, 106 insertions, 8 deletions
diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs index 77cedce2d96..688805e2141 100644 --- a/src/plugins/debugger/debugger.qbs +++ b/src/plugins/debugger/debugger.qbs @@ -303,7 +303,7 @@ QtcPlugin { ] } - ProductModule { + Export { Depends { name: "cpp" } Depends { name: "QtcSsh" } cpp.includePaths: ["."] diff --git a/src/plugins/debugger/debuggercore.h b/src/plugins/debugger/debuggercore.h index ec5bd3c4f39..18787baa8bb 100644 --- a/src/plugins/debugger/debuggercore.h +++ b/src/plugins/debugger/debuggercore.h @@ -123,6 +123,7 @@ public: virtual Utils::SavedAction *action(int code) const = 0; virtual bool boolSetting(int code) const = 0; virtual QString stringSetting(int code) const = 0; + virtual QStringList stringListSetting(int code) const = 0; virtual void setThreads(const QStringList &list, int index) = 0; virtual DebuggerToolTipManager *toolTipManager() const = 0; diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 36079eb1ee1..f90354e2b78 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -604,7 +604,7 @@ private: const char m_wordWidth; }; -bool fillParameters(DebuggerStartParameters *sp, const Kit *kit /* = 0 */, QString *errorMessage /* = 0 */) +bool fillParameters(DebuggerStartParameters *sp, const Kit *kit, QString *errorMessage /* = 0 */) { if (!kit) { // This code can only be reached when starting via the command line @@ -667,7 +667,9 @@ bool fillParameters(DebuggerStartParameters *sp, const Kit *kit /* = 0 */, QStri IDevice::ConstPtr device = DeviceKitInformation::device(kit); if (device) { sp->connParams = device->sshParameters(); - sp->remoteChannel = sp->connParams.host + QLatin1Char(':') + QString::number(sp->connParams.port); + // Could have been set from command line. + if (sp->remoteChannel.isEmpty()) + sp->remoteChannel = sp->connParams.host + QLatin1Char(':') + QString::number(sp->connParams.port); } return true; } @@ -1191,6 +1193,7 @@ public slots: SavedAction *action(int code) const; bool boolSetting(int code) const; QString stringSetting(int code) const; + QStringList stringListSetting(int code) const; void showModuleSymbols(const QString &moduleName, const Symbols &symbols); void showModuleSections(const QString &moduleName, const Sections §ions); @@ -3307,6 +3310,11 @@ QString DebuggerPluginPrivate::stringSetting(int code) const return m_debuggerSettings->item(code)->value().toString(); } +QStringList DebuggerPluginPrivate::stringListSetting(int code) const +{ + return m_debuggerSettings->item(code)->value().toStringList(); +} + void DebuggerPluginPrivate::showModuleSymbols(const QString &moduleName, const Symbols &symbols) { diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index 9f18893ff5d..1e45604c9ab 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -444,8 +444,8 @@ static bool fixupEngineTypes(DebuggerStartParameters &sp, RunConfiguration *rc, if (const Target *target = rc->target()) if (!fillParameters(&sp, target->kit(), errorMessage)) return false; - const bool useCppDebugger = aspect->useCppDebugger(); - const bool useQmlDebugger = aspect->useQmlDebugger(); + const bool useCppDebugger = aspect->useCppDebugger() && (sp.languages & CppLanguage); + const bool useQmlDebugger = aspect->useQmlDebugger() && (sp.languages & QmlLanguage); if (useQmlDebugger) { if (useCppDebugger) { sp.masterEngineType = QmlCppEngineType; diff --git a/src/plugins/debugger/debuggerstartparameters.h b/src/plugins/debugger/debuggerstartparameters.h index f492dbd3962..0e5f818f763 100644 --- a/src/plugins/debugger/debuggerstartparameters.h +++ b/src/plugins/debugger/debuggerstartparameters.h @@ -141,7 +141,7 @@ public: namespace Internal { -bool fillParameters(DebuggerStartParameters *sp, const ProjectExplorer::Kit *kit = 0, QString *errorMessage = 0); +bool fillParameters(DebuggerStartParameters *sp, const ProjectExplorer::Kit *kit, QString *errorMessage = 0); } // namespace Internal } // namespace Debugger diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 2b8e213d1ce..b9ce9a083ab 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -1592,7 +1592,7 @@ void GdbEngine::handleStop1(const GdbMi &data) if (!m_systemDumpersLoaded) { m_systemDumpersLoaded = true; - if (debuggerCore()->boolSetting(LoadGdbDumpers)) + if (m_gdbVersion >= 70400 && debuggerCore()->boolSetting(LoadGdbDumpers)) postCommand("importPlainDumpers"); } diff --git a/src/plugins/debugger/images/qml/app-on-top.png b/src/plugins/debugger/images/qml/app-on-top.png Binary files differindex ddec5400c69..e89026d1943 100644 --- a/src/plugins/debugger/images/qml/app-on-top.png +++ b/src/plugins/debugger/images/qml/app-on-top.png diff --git a/src/plugins/debugger/images/qml/apply-on-save.png b/src/plugins/debugger/images/qml/apply-on-save.png Binary files differindex 666382c06dd..19e75ab66d0 100644 --- a/src/plugins/debugger/images/qml/apply-on-save.png +++ b/src/plugins/debugger/images/qml/apply-on-save.png diff --git a/src/plugins/debugger/images/qml/select.png b/src/plugins/debugger/images/qml/select.png Binary files differindex 672285582b5..b120f79024d 100644 --- a/src/plugins/debugger/images/qml/select.png +++ b/src/plugins/debugger/images/qml/select.png diff --git a/src/plugins/debugger/images/qml/zoom.png b/src/plugins/debugger/images/qml/zoom.png Binary files differindex ebae877310c..7f54ec11911 100644 --- a/src/plugins/debugger/images/qml/zoom.png +++ b/src/plugins/debugger/images/qml/zoom.png diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 5786fda6d13..119382b8781 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -664,7 +664,67 @@ void LldbEngine::updateWatchData(const WatchData &data, const WatchUpdateFlags & Q_UNUSED(data); Q_UNUSED(flags); WatchHandler *handler = watchHandler(); - runCommand(Command("updateData").arg("expanded", handler->expansionRequests())); + + Command cmd("updateData"); + cmd.arg("expanded", handler->expansionRequests()); + cmd.arg("typeformats", handler->typeFormatRequests()); + cmd.arg("formats", handler->individualFormatRequests()); + + QList<QByteArray> watcherData; +// const QString fileName = stackHandler()->currentFrame().file; +// if (!fileName.isEmpty()) { +// const QString function = stackHandler()->currentFrame().function; +// typedef DebuggerToolTipManager::ExpressionInamePair ExpressionInamePair; +// typedef DebuggerToolTipManager::ExpressionInamePairs ExpressionInamePairs; + +// // Re-create tooltip items that are not filters on existing local variables in +// // the tooltip model. +// ExpressionInamePairs toolTips = DebuggerToolTipManager::instance() +// ->treeWidgetExpressions(fileName, objectName(), function); + +// const QString currentExpression = tooltipExpression(); +// if (!currentExpression.isEmpty()) { +// int currentIndex = -1; +// for (int i = 0; i < toolTips.size(); ++i) { +// if (toolTips.at(i).first == currentExpression) { +// currentIndex = i; +// break; +// } +// } +// if (currentIndex < 0) +// toolTips.push_back(ExpressionInamePair(currentExpression, tooltipIName(currentExpression))); +// } + +// foreach (const ExpressionInamePair &p, toolTips) { +// if (p.second.startsWith("tooltip")) { +// QHash<QByteArray, QByteArray> hash; +// hash["exp"] = p.first.toLatin1(); +// hash["id"] = p.second; +// watcherData.append(Command::toData(hash)); +// } +// } +// } + + QHashIterator<QByteArray, int> it(handler->watcherNames()); + while (it.hasNext()) { + it.next(); + QHash<QByteArray, QByteArray> hash; + hash["exp"] = '\'' + it.key() + '\''; + hash["id"] = "'watch." + QByteArray::number(it.value()) + '\''; + watcherData.append(Command::toData(hash)); + } + cmd.args.append("'watchers':" + Command::toData(watcherData) + ','); + + const static bool alwaysVerbose = !qgetenv("QTC_DEBUGGER_PYTHON_VERBOSE").isEmpty(); + cmd.arg("passexeptions", alwaysVerbose); + cmd.arg("fancy", debuggerCore()->boolSetting(UseDebuggingHelpers)); + cmd.arg("autoderef", debuggerCore()->boolSetting(AutoDerefPointers)); + cmd.arg("dyntype", debuggerCore()->boolSetting(UseDynamicType)); + //cmd.arg("partial", ??) + //cmd.arg("tooltipOnly", ??) + //cmd.arg("resultvarname", m_resultVarName); + + runCommand(cmd); } void LldbEngine::handleLldbError(QProcess::ProcessError error) @@ -1047,6 +1107,30 @@ const LldbEngine::Command &LldbEngine::Command::argHelper(const char *name, cons return *this; } +QByteArray LldbEngine::Command::toData(const QList<QByteArray> &value) +{ + QByteArray res; + foreach (const QByteArray &item, value) { + if (!res.isEmpty()) + res.append(','); + res += item; + } + return '[' + res + ']'; +} + +QByteArray LldbEngine::Command::toData(const QHash<QByteArray, QByteArray> &value) +{ + QByteArray res; + QHashIterator<QByteArray, QByteArray> it(value); + while (it.hasNext()) { + it.next(); + if (!res.isEmpty()) + res.append(','); + res += '\'' + it.key() + "':" + it.value(); + } + return '{' + res + '}'; +} + const LldbEngine::Command &LldbEngine::Command::arg(const char *name, int value) const { return argHelper(name, QByteArray::number(value)); diff --git a/src/plugins/debugger/lldb/lldbengine.h b/src/plugins/debugger/lldb/lldbengine.h index 71ff6681790..818ee91ca64 100644 --- a/src/plugins/debugger/lldb/lldbengine.h +++ b/src/plugins/debugger/lldb/lldbengine.h @@ -78,6 +78,9 @@ private: const Command &beginGroup(const char *name = 0) const; void endGroup() const; + static QByteArray toData(const QList<QByteArray> &value); + static QByteArray toData(const QHash<QByteArray, QByteArray> &value); + QByteArray function; mutable QByteArray args; private: diff --git a/src/plugins/debugger/loadcoredialog.cpp b/src/plugins/debugger/loadcoredialog.cpp index 283d490b957..8d4a4879da5 100644 --- a/src/plugins/debugger/loadcoredialog.cpp +++ b/src/plugins/debugger/loadcoredialog.cpp @@ -289,6 +289,7 @@ int AttachCoreDialog::exec() { connect(d->selectRemoteCoreButton, SIGNAL(clicked()), SLOT(selectRemoteCoreFile())); connect(d->remoteCoreFileName, SIGNAL(textChanged(QString)), SLOT(changed())); + connect(d->localExecFileName, SIGNAL(changed(QString)), SLOT(changed())); connect(d->localCoreFileName, SIGNAL(changed(QString)), SLOT(changed())); connect(d->forceLocalCheckBox, SIGNAL(stateChanged(int)), SLOT(changed())); connect(d->kitChooser, SIGNAL(activated(int)), SLOT(changed())); diff --git a/src/plugins/debugger/procinterrupt.cpp b/src/plugins/debugger/procinterrupt.cpp index e93b3260146..0ad32373af7 100644 --- a/src/plugins/debugger/procinterrupt.cpp +++ b/src/plugins/debugger/procinterrupt.cpp @@ -103,6 +103,7 @@ bool Debugger::Internal::interruptProcess(int pID, int engineType, QString *erro // GDB: not supported const bool useDebugBreakApi= true; Q_UNUSED(engineExecutableIs64Bit) + Q_UNUSED(engineType) #else // Qt-Creator compiled 32 bit: |
