Commit 20308d42 authored by hjk's avatar hjk
Browse files

debugger: list "details" field in thread view



Change-Id: I86437498d05f90f80e154248ddf959d9a990aacd
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 174eb7c2
...@@ -58,6 +58,7 @@ struct ThreadData ...@@ -58,6 +58,7 @@ struct ThreadData
StateColumn, StateColumn,
NameColumn, NameColumn,
TargetIdColumn, TargetIdColumn,
DetailsColumn,
CoreColumn, CoreColumn,
ComboNameColumn, ComboNameColumn,
ColumnCount = CoreColumn ColumnCount = CoreColumn
...@@ -84,6 +85,7 @@ struct ThreadData ...@@ -84,6 +85,7 @@ struct ThreadData
QString function; QString function;
QString module; QString module;
QString fileName; QString fileName;
QString details;
QString state; QString state;
qint32 lineNumber; qint32 lineNumber;
QString name; QString name;
......
...@@ -154,6 +154,8 @@ QVariant ThreadsHandler::data(const QModelIndex &index, int role) const ...@@ -154,6 +154,8 @@ QVariant ThreadsHandler::data(const QModelIndex &index, int role) const
return thread.targetId; return thread.targetId;
case ThreadData::NameColumn: case ThreadData::NameColumn:
return thread.name; return thread.name;
case ThreadData::DetailsColumn:
return thread.details;
case ThreadData::ComboNameColumn: case ThreadData::ComboNameColumn:
return QString::fromLatin1("#%1 %2").arg(thread.id).arg(thread.name); return QString::fromLatin1("#%1 %2").arg(thread.id).arg(thread.name);
} }
...@@ -192,6 +194,8 @@ QVariant ThreadsHandler::headerData ...@@ -192,6 +194,8 @@ QVariant ThreadsHandler::headerData
return tr("State"); return tr("State");
case ThreadData::TargetIdColumn: case ThreadData::TargetIdColumn:
return tr("Target ID"); return tr("Target ID");
case ThreadData::DetailsColumn:
return tr("Details");
case ThreadData::NameColumn: case ThreadData::NameColumn:
return tr("Name"); return tr("Name");
} }
...@@ -310,6 +314,7 @@ Threads ThreadsHandler::parseGdbmiThreads(const GdbMi &data, int *currentThread) ...@@ -310,6 +314,7 @@ Threads ThreadsHandler::parseGdbmiThreads(const GdbMi &data, int *currentThread)
ThreadData thread; ThreadData thread;
thread.id = item.findChild("id").data().toInt(); thread.id = item.findChild("id").data().toInt();
thread.targetId = QString::fromLatin1(item.findChild("target-id").data()); thread.targetId = QString::fromLatin1(item.findChild("target-id").data());
thread.details = QString::fromLatin1(item.findChild("details").data());
thread.core = QString::fromLatin1(item.findChild("core").data()); thread.core = QString::fromLatin1(item.findChild("core").data());
thread.state = QString::fromLatin1(item.findChild("state").data()); thread.state = QString::fromLatin1(item.findChild("state").data());
thread.address = frame.findChild("addr").data().toULongLong(&ok, 0); thread.address = frame.findChild("addr").data().toULongLong(&ok, 0);
......
...@@ -64,6 +64,7 @@ void ThreadsTreeView::setModel(QAbstractItemModel *model) ...@@ -64,6 +64,7 @@ void ThreadsTreeView::setModel(QAbstractItemModel *model)
resizeColumnToContents(ThreadData::NameColumn); resizeColumnToContents(ThreadData::NameColumn);
resizeColumnToContents(ThreadData::StateColumn); resizeColumnToContents(ThreadData::StateColumn);
resizeColumnToContents(ThreadData::TargetIdColumn); resizeColumnToContents(ThreadData::TargetIdColumn);
resizeColumnToContents(ThreadData::DetailsColumn);
} }
void ThreadsTreeView::contextMenuEvent(QContextMenuEvent *ev) void ThreadsTreeView::contextMenuEvent(QContextMenuEvent *ev)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment