diff options
| author | hjk <hjk@theqtcompany.com> | 2015-10-08 16:19:57 +0200 |
|---|---|---|
| committer | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-10-09 05:19:45 +0000 |
| commit | 525c33f9991766342b41a0518b534836dc60ed69 (patch) | |
| tree | 33f0bb24beeae02eb71e85c46e08943a033f0133 /src/plugins/debugger/stackhandler.cpp | |
| parent | ea39476ef2c0017f54021693ba545117ad53afa6 (diff) | |
| download | qt-creator-525c33f9991766342b41a0518b534836dc60ed69.tar.gz | |
Debugger: Infrastructure for reworked native mixed debugging
- Remove old experimental native mixed approach.
- Move some common stack parsing to Stackhandler.
- Mark gdbbridge.py debug output explicitly to remove it
from actual reponse handling
New native mixed needs QtDeclarative changes and
QTC_DEBUGGER_NATIVE_MIXED=1 for now.
Change-Id: I09eed1da51cea878636d36756015b7bfaed34203
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'src/plugins/debugger/stackhandler.cpp')
| -rw-r--r-- | src/plugins/debugger/stackhandler.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp index ec5fe96641..39bbae9a20 100644 --- a/src/plugins/debugger/stackhandler.cpp +++ b/src/plugins/debugger/stackhandler.cpp @@ -32,6 +32,7 @@ #include "debuggeractions.h" #include "debuggercore.h" +#include "debuggerengine.h" #include "simplifytype.h" #include <utils/fileutils.h> @@ -55,8 +56,9 @@ namespace Internal { QTreeView. */ -StackHandler::StackHandler() - : m_positionIcon(QIcon(QLatin1String(":/debugger/images/location_16.png"))), +StackHandler::StackHandler(DebuggerEngine *engine) + : m_engine(engine), + m_positionIcon(QIcon(QLatin1String(":/debugger/images/location_16.png"))), m_emptyIcon(QIcon(QLatin1String(":/debugger/images/debugger_empty_14.png"))) { setObjectName(QLatin1String("StackModel")); @@ -103,11 +105,11 @@ QVariant StackHandler::data(const QModelIndex &index, int role) const if (role == Qt::DisplayRole) { switch (index.column()) { case StackLevelColumn: - return QString::number(frame.level); + return QString::number(index.row() + 1); case StackFunctionNameColumn: return simplifyType(frame.function); case StackFileNameColumn: - return frame.file.isEmpty() ? frame.from : Utils::FileName::fromString(frame.file).fileName(); + return frame.file.isEmpty() ? frame.module : Utils::FileName::fromString(frame.file).fileName(); case StackLineNumberColumn: return frame.line > 0 ? QVariant(frame.line) : QVariant(); case StackAddressColumn: @@ -166,6 +168,12 @@ StackFrame StackHandler::currentFrame() const return m_stackFrames.at(m_currentIndex); } +void StackHandler::setAllFrames(const GdbMi &frames, bool canExpand) +{ + action(ExpandStack)->setEnabled(canExpand); + setFrames(StackFrame::parseFrames(frames, m_engine->runParameters()), canExpand); +} + void StackHandler::setCurrentIndex(int level) { if (level == -1 || level == m_currentIndex) |
