summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2014-07-14 15:04:47 +0300
committerhjk <hjk121@nokiamail.com>2014-07-14 15:58:05 +0200
commitaf8c8d4e0cf95fda58124f0bac7804212c67c8db (patch)
treece5026f3f1beedefe9f2ac7dd36345b0d65d28c1 /src
parente1650b5c46b4efe2be976039ec6ee121359eae11 (diff)
downloadqt-creator-af8c8d4e0cf95fda58124f0bac7804212c67c8db.tar.gz
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>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/debugger/loadcoredialog.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/plugins/debugger/loadcoredialog.cpp b/src/plugins/debugger/loadcoredialog.cpp
index 30f33bcf4d..0f89a87b3e 100644
--- a/src/plugins/debugger/loadcoredialog.cpp
+++ b/src/plugins/debugger/loadcoredialog.cpp
@@ -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();
}