forked from qt-creator/qt-creator
debugger: small rework of the modules handler
Use new elfreader, also slimmer interface. Change-Id: Ie6387ff14bdefd109768d1ce4c395a17211da77d Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -3505,24 +3505,18 @@ void GdbEngine::handleModulesList(const GdbResponse &response)
|
||||
modulesHandler()->setModules(modules);
|
||||
}
|
||||
|
||||
|
||||
void GdbEngine::examineModules()
|
||||
{
|
||||
foreach (Module module, modulesHandler()->modules()) {
|
||||
ModulesHandler *handler = modulesHandler();
|
||||
foreach (Module module, handler->modules()) {
|
||||
if (module.symbolsType == Module::UnknownType) {
|
||||
QProcess proc;
|
||||
qDebug() << _("objdump -h \"%1\"").arg(module.modulePath);
|
||||
proc.start(_("objdump -h \"%1\"").arg(module.modulePath));
|
||||
if (!proc.waitForStarted())
|
||||
continue;
|
||||
if (!proc.waitForFinished())
|
||||
continue;
|
||||
QByteArray ba = proc.readAllStandardOutput();
|
||||
if (ba.contains(".gdb_index"))
|
||||
Utils::ElfReader reader(module.modulePath);
|
||||
QList<QByteArray> names = reader.sectionNames();
|
||||
if (names.contains(".gdb_index"))
|
||||
module.symbolsType = Module::FastSymbols;
|
||||
else
|
||||
module.symbolsType = Module::PlainSymbols;
|
||||
modulesHandler()->updateModule(module.modulePath, module);
|
||||
handler->updateModule(module);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user