forked from qt-creator/qt-creator
find executable relative to core location
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
|
#include <QtCore/QDir>
|
||||||
#include <QtCore/QFileInfo>
|
#include <QtCore/QFileInfo>
|
||||||
#include <QtGui/QMessageBox>
|
#include <QtGui/QMessageBox>
|
||||||
|
|
||||||
@@ -138,12 +139,16 @@ void CoreGdbAdapter::handleTargetCore(const GdbResponse &response)
|
|||||||
if (idx >= 0)
|
if (idx >= 0)
|
||||||
m_executable.truncate(idx);
|
m_executable.truncate(idx);
|
||||||
if (!m_executable.isEmpty()) {
|
if (!m_executable.isEmpty()) {
|
||||||
// Finish extra round ...
|
m_executable = QFileInfo(startParameters().coreFile).absoluteDir()
|
||||||
showStatusMessage(tr("Attached to core temporarily."));
|
.absoluteFilePath(m_executable);
|
||||||
m_engine->postCommand(_("detach"));
|
if (QFile::exists(m_executable)) {
|
||||||
// ... and retry.
|
// Finish extra round ...
|
||||||
loadExeAndSyms();
|
showStatusMessage(tr("Attached to core temporarily."));
|
||||||
return;
|
m_engine->postCommand(_("detach"));
|
||||||
|
// ... and retry.
|
||||||
|
loadExeAndSyms();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
showMessageBox(QMessageBox::Warning, tr("Error Loading Symbols"),
|
showMessageBox(QMessageBox::Warning, tr("Error Loading Symbols"),
|
||||||
|
Reference in New Issue
Block a user