forked from qt-creator/qt-creator
Debugger: Only update executable from core file when needed
Conditions: 1. Not empty. It erases the existing executable for no reason. 2. Not Windows -> Windows doesn't produce core dumps, so the path inside it is unlikely to match anything on the host. Change-Id: Ib3cd1ae278d8bc9f6ad326821319ca3deda44800 Reviewed-by: Thomas Otto <totto@zbh.uni-hamburg.de> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -321,12 +321,15 @@ bool AttachCoreDialog::useLocalCoreFile() const
|
|||||||
|
|
||||||
void AttachCoreDialog::coreFileChanged(const QString &core)
|
void AttachCoreDialog::coreFileChanged(const QString &core)
|
||||||
{
|
{
|
||||||
|
if (!Utils::HostOsInfo::isWindowsHost()) {
|
||||||
Kit *k = d->kitChooser->currentKit();
|
Kit *k = d->kitChooser->currentKit();
|
||||||
QTC_ASSERT(k, return);
|
QTC_ASSERT(k, return);
|
||||||
FileName cmd = DebuggerKitInformation::debuggerCommand(k);
|
FileName cmd = DebuggerKitInformation::debuggerCommand(k);
|
||||||
bool isCore = false;
|
bool isCore = false;
|
||||||
QString exe = readExecutableNameFromCore(cmd.toString(), core, &isCore);
|
const QString exe = readExecutableNameFromCore(cmd.toString(), core, &isCore);
|
||||||
|
if (!exe.isEmpty())
|
||||||
d->localExecFileName->setFileName(FileName::fromString(exe));
|
d->localExecFileName->setFileName(FileName::fromString(exe));
|
||||||
|
}
|
||||||
changed();
|
changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user