debugger: read file type and machine type from binary

Change-Id: I3faa92ef8add807389ca3d87197e83df948f149a
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2012-06-08 14:40:18 +02:00
committed by hjk
parent c310f1671c
commit d693df391c
3 changed files with 113 additions and 59 deletions

View File

@@ -95,7 +95,16 @@ void CoreGdbAdapter::continueAdapterStart()
if (m_executable.isEmpty()) {
// Read executable from core.
ElfReader reader(coreFileName());
m_executable = reader.readCoreName();
bool isCore = false;
m_executable = reader.readCoreName(&isCore);
if (!isCore) {
showMessageBox(QMessageBox::Warning,
tr("Error Loading Core File"),
tr("The specified file does not appear to be a core file."));
m_engine->notifyEngineSetupFailed();
return;
}
// Strip off command line arguments. FIXME: make robust.
int idx = m_executable.indexOf(QLatin1Char(' '));
@@ -104,7 +113,7 @@ void CoreGdbAdapter::continueAdapterStart()
if (m_executable.isEmpty()) {
showMessageBox(QMessageBox::Warning,
tr("Error Loading Symbols"),
tr("No executable to load symbols from specified."));
tr("No executable to load symbols from specified core."));
m_engine->notifyEngineSetupFailed();
return;
}