Debugger: Fix MSVC detection.

Trigger AttachCore for MSVC flavours only.
Handle .dmp files on the command line.

Change-Id: I65be1ad7aef36db157a84499ff5e10d9f1e8fb97
Reviewed-on: http://codereview.qt.nokia.com/2766
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Friedemann Kleint
2011-08-09 10:38:30 +02:00
parent 197c60e928
commit 795d4506e6
2 changed files with 15 additions and 8 deletions

View File

@@ -1213,8 +1213,11 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
sp.toolChainAbi = anyAbiOfBinary(sp.executable);
} else {
// Fixme: Distinguish between core-file and executable by argument syntax?
// (default up to 2.2 was core-file).
if (Abi::hostAbi().os() == Abi::WindowsOS || QFileInfo(*it).isExecutable()) {
// (default up to 2.2 was core-file (".dmp on Windows)).
const bool isExecutable = Abi::hostAbi().os() == Abi::WindowsOS ?
!it->endsWith(QLatin1String(".dmp"), Qt::CaseInsensitive) :
QFileInfo(*it).isExecutable();
if (isExecutable) {
sp.startMode = StartExternal;
sp.executable = *it;
sp.displayName = tr("Executable file \"%1\"").arg(sp.executable);