aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/moduleshandler.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2012-06-06 16:08:59 +0200
committerhjk <[email protected]>2012-06-08 12:40:08 +0200
commit92c7dce14f4ba1ffd5f5c63f5268238a4cf57a5a (patch)
tree53761a7007e4f74d0bff40002e6979106e4cad59 /src/plugins/debugger/moduleshandler.cpp
parent79de09f2663f818bb07c24752e6520b19b28e6ec (diff)
debugger: more elf shuffling
Also distinguish between debuglink and buildid. Change-Id: I1b55d1df42576c004050d319f46fb8c2ced9c85f Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/debugger/moduleshandler.cpp')
-rw-r--r--src/plugins/debugger/moduleshandler.cpp28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/plugins/debugger/moduleshandler.cpp b/src/plugins/debugger/moduleshandler.cpp
index 794472b1e91..a4e9c1eba02 100644
--- a/src/plugins/debugger/moduleshandler.cpp
+++ b/src/plugins/debugger/moduleshandler.cpp
@@ -113,6 +113,14 @@ QVariant ModulesModel::data(const QModelIndex &index, int role) const
case 1:
if (role == Qt::DisplayRole)
return module.modulePath;
+ if (role == Qt::ToolTipRole) {
+ QString msg;
+ if (!module.elfData.buildId.isEmpty())
+ msg += QString::fromLatin1("Build Id: " + module.elfData.buildId);
+ if (!module.elfData.debugLink.isEmpty())
+ msg += QString::fromLatin1("Debug Link: " + module.elfData.debugLink);
+ return msg;
+ }
break;
case 2:
if (role == Qt::DisplayRole)
@@ -124,7 +132,7 @@ QVariant ModulesModel::data(const QModelIndex &index, int role) const
break;
case 3:
if (role == Qt::DisplayRole)
- switch (module.sections.symbolsType) {
+ switch (module.elfData.symbolsType) {
case UnknownSymbols:
return ModulesHandler::tr("unknown");
case NoSymbols:
@@ -133,11 +141,13 @@ QVariant ModulesModel::data(const QModelIndex &index, int role) const
return ModulesHandler::tr("plain");
case FastSymbols:
return ModulesHandler::tr("fast");
- case SeparateSymbols:
- return ModulesHandler::tr("separate");
+ case LinkedSymbols:
+ return ModulesHandler::tr("debuglnk");
+ case BuildIdSymbols:
+ return ModulesHandler::tr("buildid");
}
else if (role == Qt::ToolTipRole)
- switch (module.sections.symbolsType) {
+ switch (module.elfData.symbolsType) {
case UnknownSymbols:
return ModulesHandler::tr(
"It is unknown whether this module contains debug "
@@ -158,7 +168,8 @@ QVariant ModulesModel::data(const QModelIndex &index, int role) const
"This module contains debug information.\nStepping "
"into the module or setting breakpoints by file and "
"is expected to work.");
- case SeparateSymbols:
+ case LinkedSymbols:
+ case BuildIdSymbols:
return ModulesHandler::tr(
"This module does not contains debug information "
"itself, but contains a reference to external "
@@ -220,16 +231,17 @@ void ModulesModel::updateModule(const Module &module)
{
const int row = indexOfModule(module.modulePath);
ElfReader reader(module.modulePath);
- ElfHeaders sections = reader.readHeaders();
+ ElfData elfData = reader.readHeaders();
+
if (row == -1) {
const int n = m_modules.size();
beginInsertRows(QModelIndex(), n, n);
m_modules.push_back(module);
- m_modules.back().sections = sections;
+ m_modules.back().elfData = elfData;
endInsertRows();
} else {
m_modules[row] = module;
- m_modules[row].sections = sections;
+ m_modules[row].elfData = elfData;
dataChanged(index(row, 0, QModelIndex()), index(row, 4, QModelIndex()));
}
}