forked from qt-creator/qt-creator
Debugger: Avoid warnings about wrong cmd line option to CDB on startup
Task-number: QTCREATORBUG-14100 Change-Id: I88775b51587120a765cdfcde798b0ac7313ec7ab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
@@ -111,7 +111,9 @@ void DebuggerItem::createId()
|
||||
void DebuggerItem::reinitializeFromFile()
|
||||
{
|
||||
QProcess proc;
|
||||
proc.start(m_command.toString(), QStringList() << QLatin1String("--version"));
|
||||
// CDB only understands the single-dash -version, whereas GDB and LLDB are
|
||||
// happy with both -version and --version. So use the "working" -version.
|
||||
proc.start(m_command.toString(), QStringList() << QLatin1String("-version"));
|
||||
if (!proc.waitForStarted() || !proc.waitForFinished()) {
|
||||
m_engineType = NoEngineType;
|
||||
return;
|
||||
@@ -162,23 +164,17 @@ void DebuggerItem::reinitializeFromFile()
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (ba.startsWith("cdb")) {
|
||||
// "cdb version 6.2.9200.16384"
|
||||
m_engineType = CdbEngineType;
|
||||
m_abis = Abi::abisOfBinary(m_command);
|
||||
m_version = QString::fromLatin1(ba).section(QLatin1Char(' '), 2);
|
||||
return;
|
||||
}
|
||||
if (ba.startsWith("Python")) {
|
||||
m_engineType = PdbEngineType;
|
||||
return;
|
||||
}
|
||||
if (ba.isEmpty()) {
|
||||
proc.start(m_command.toString(), QStringList() << QLatin1String("-version"));
|
||||
if (!proc.waitForStarted() || !proc.waitForFinished()) {
|
||||
m_engineType = NoEngineType;
|
||||
return;
|
||||
}
|
||||
ba = proc.readAll();
|
||||
if (ba.startsWith("cdb")) {
|
||||
m_engineType = CdbEngineType;
|
||||
m_abis = Abi::abisOfBinary(m_command);
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_engineType = NoEngineType;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user