forked from qt-creator/qt-creator
Debugger: Add toolchain combos to start dialogs, refactor detection.
Add combo box listing toolchains with debuggers to start external, attach and core. Another attempt at streamlining engine detection: Split in detection functions that first collect a list of available engines by preference, then remove disabled and wrongly configured engines and use the remaining best. matching. checkconfiguration is now the central place where engine detection and config check takes place. Rubber-stamped-by: hjk
This commit is contained in:
@@ -1804,9 +1804,8 @@ int GdbEngine::currentFrame() const
|
||||
return stackHandler()->currentIndex();
|
||||
}
|
||||
|
||||
QString msgNoBinaryForToolChain(const ProjectExplorer::Abi &tc)
|
||||
QString msgNoGdbBinaryForToolChain(const ProjectExplorer::Abi &tc)
|
||||
{
|
||||
using namespace ProjectExplorer;
|
||||
return GdbEngine::tr("There is no gdb binary available for binaries in format '%1'")
|
||||
.arg(tc.toString());
|
||||
}
|
||||
@@ -4217,22 +4216,13 @@ bool GdbEngine::startGdb(const QStringList &args, const QString &gdb,
|
||||
const DebuggerStartParameters &sp = startParameters();
|
||||
m_gdb = QString::fromLocal8Bit(qgetenv("QTC_DEBUGGER_PATH"));
|
||||
if (m_gdb.isEmpty() && sp.startMode != StartRemoteGdb) {
|
||||
// We want the MinGW gdb also in case we got started using
|
||||
// some compatible ABI.
|
||||
Abi abi = startParameters().toolChainAbi;
|
||||
if (abi.os() == Abi::WindowsOS) {
|
||||
if (abi.osFlavor() == Abi::UnknownFlavor
|
||||
|| abi.osFlavor() == Abi::WindowsMsvcFlavor)
|
||||
abi = Abi(abi.architecture(), abi.os(), Abi::WindowsMSysFlavor,
|
||||
abi.binaryFormat(), abi.wordWidth());
|
||||
}
|
||||
m_gdb = debuggerCore()->debuggerForAbi(abi);
|
||||
m_gdb = debuggerCore()->debuggerForAbi(startParameters().toolChainAbi, GdbEngineType);
|
||||
}
|
||||
if (m_gdb.isEmpty())
|
||||
m_gdb = gdb;
|
||||
if (m_gdb.isEmpty()) {
|
||||
handleAdapterStartFailed(
|
||||
msgNoBinaryForToolChain(sp.toolChainAbi),
|
||||
msgNoGdbBinaryForToolChain(sp.toolChainAbi),
|
||||
_(Constants::DEBUGGER_COMMON_SETTINGS_ID));
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user