From 8060479483aa04db5e78f550d5b95ab316f79a97 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 20 Oct 2009 18:13:23 +0200 Subject: [PATCH] find executable relative to core location --- src/plugins/debugger/gdb/coregdbadapter.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/plugins/debugger/gdb/coregdbadapter.cpp b/src/plugins/debugger/gdb/coregdbadapter.cpp index 8c24daa7d9a..ee0304208be 100644 --- a/src/plugins/debugger/gdb/coregdbadapter.cpp +++ b/src/plugins/debugger/gdb/coregdbadapter.cpp @@ -35,6 +35,7 @@ #include +#include #include #include @@ -138,12 +139,16 @@ void CoreGdbAdapter::handleTargetCore(const GdbResponse &response) if (idx >= 0) m_executable.truncate(idx); if (!m_executable.isEmpty()) { - // Finish extra round ... - showStatusMessage(tr("Attached to core temporarily.")); - m_engine->postCommand(_("detach")); - // ... and retry. - loadExeAndSyms(); - return; + m_executable = QFileInfo(startParameters().coreFile).absoluteDir() + .absoluteFilePath(m_executable); + if (QFile::exists(m_executable)) { + // Finish extra round ... + showStatusMessage(tr("Attached to core temporarily.")); + m_engine->postCommand(_("detach")); + // ... and retry. + loadExeAndSyms(); + return; + } } } showMessageBox(QMessageBox::Warning, tr("Error Loading Symbols"),