Commit af8c8d4e authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk

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: default avatarThomas Otto <totto@zbh.uni-hamburg.de>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent e1650b5c
......@@ -321,12 +321,15 @@ bool AttachCoreDialog::useLocalCoreFile() const
void AttachCoreDialog::coreFileChanged(const QString &core)
{
Kit *k = d->kitChooser->currentKit();
QTC_ASSERT(k, return);
FileName cmd = DebuggerKitInformation::debuggerCommand(k);
bool isCore = false;
QString exe = readExecutableNameFromCore(cmd.toString(), core, &isCore);
d->localExecFileName->setFileName(FileName::fromString(exe));
if (!Utils::HostOsInfo::isWindowsHost()) {
Kit *k = d->kitChooser->currentKit();
QTC_ASSERT(k, return);
FileName cmd = DebuggerKitInformation::debuggerCommand(k);
bool isCore = false;
const QString exe = readExecutableNameFromCore(cmd.toString(), core, &isCore);
if (!exe.isEmpty())
d->localExecFileName->setFileName(FileName::fromString(exe));
}
changed();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment