forked from qt-creator/qt-creator
debugger: polish module symbols
This commit is contained in:
@@ -117,6 +117,7 @@
|
||||
#include <QtGui/QTextBlock>
|
||||
#include <QtGui/QTextCursor>
|
||||
#include <QtGui/QToolButton>
|
||||
#include <QtGui/QTreeWidget>
|
||||
|
||||
#include <climits>
|
||||
|
||||
@@ -848,7 +849,7 @@ static bool isDebuggable(IEditor *editor)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DebuggerPluginPrivate
|
||||
// Debugger Actions
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1284,6 +1285,8 @@ public slots:
|
||||
bool boolSetting(int code) const;
|
||||
QString stringSetting(int code) const;
|
||||
|
||||
void showModuleSymbols(const QString &moduleName, const Symbols &symbols);
|
||||
|
||||
public:
|
||||
DebuggerState m_state;
|
||||
DebuggerUISwitcher *m_uiSwitcher;
|
||||
@@ -3324,9 +3327,36 @@ QString DebuggerPluginPrivate::stringSetting(int code) const
|
||||
return m_debuggerSettings->item(code)->value().toString();
|
||||
}
|
||||
|
||||
void DebuggerPluginPrivate::showModuleSymbols(const QString &moduleName,
|
||||
const Symbols &symbols)
|
||||
{
|
||||
QTreeWidget *w = new QTreeWidget;
|
||||
w->setColumnCount(5);
|
||||
w->setRootIsDecorated(false);
|
||||
w->setAlternatingRowColors(true);
|
||||
w->setSortingEnabled(true);
|
||||
QStringList header;
|
||||
header.append(tr("Symbol"));
|
||||
header.append(tr("Address"));
|
||||
header.append(tr("Code"));
|
||||
header.append(tr("Section"));
|
||||
header.append(tr("Name"));
|
||||
w->setHeaderLabels(header);
|
||||
w->setWindowTitle(tr("Symbols in \"%1\"").arg(moduleName));
|
||||
foreach (const Symbol &s, symbols) {
|
||||
QTreeWidgetItem *it = new QTreeWidgetItem;
|
||||
it->setData(0, Qt::DisplayRole, s.name);
|
||||
it->setData(1, Qt::DisplayRole, s.address);
|
||||
it->setData(2, Qt::DisplayRole, s.state);
|
||||
it->setData(3, Qt::DisplayRole, s.section);
|
||||
it->setData(4, Qt::DisplayRole, s.demangled);
|
||||
w->addTopLevelItem(it);
|
||||
}
|
||||
createNewDock(w);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
using namespace Debugger::Internal;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -3334,6 +3364,8 @@ using namespace Debugger::Internal;
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
using namespace Debugger::Internal;
|
||||
|
||||
DebuggerPlugin::DebuggerPlugin()
|
||||
{
|
||||
theDebuggerCore = new DebuggerPluginPrivate(this);
|
||||
|
||||
Reference in New Issue
Block a user