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>
This commit is contained in:
hjk
2015-10-08 16:19:57 +02:00
committed by Christian Stenger
parent ea39476ef2
commit 525c33f999
30 changed files with 568 additions and 558 deletions

View File

@@ -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)