forked from qt-creator/qt-creator
Debugger: prefer 64 bit cdb and remove auto detected 32 bit cdb
Change-Id: I57a4b0cb25a6d33478bc7a5cde9a427cfc5214c6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -440,8 +440,11 @@ static DebuggerItem::MatchLevel matchSingle(const Abi &debuggerAbi, const Abi &t
|
||||
return matchOnMultiarch;
|
||||
}
|
||||
|
||||
if (debuggerAbi.wordWidth() == 64 && targetAbi.wordWidth() == 32)
|
||||
return DebuggerItem::MatchesSomewhat;
|
||||
if (debuggerAbi.wordWidth() == 64 && targetAbi.wordWidth() == 32) {
|
||||
return HostOsInfo::isWindowsHost() && engineType == CdbEngineType
|
||||
? DebuggerItem::MatchesPerfectly
|
||||
: DebuggerItem::MatchesSomewhat;
|
||||
}
|
||||
if (debuggerAbi.wordWidth() != 0 && debuggerAbi.wordWidth() != targetAbi.wordWidth())
|
||||
return matchOnMultiarch;
|
||||
|
||||
|
@@ -783,6 +783,12 @@ void DebuggerItemModel::readDebuggers(const FilePath &fileName, bool isSystem)
|
||||
.arg(item.command().toUserOutput(), item.id().toString(), fileName.toUserOutput());
|
||||
continue;
|
||||
}
|
||||
if (item.engineType() == CdbEngineType
|
||||
&& Abi::abisOfBinary(item.command()).value(0).wordWidth() == 32) {
|
||||
qWarning() << QString("32 bit CDB \"%1\" (%2) read from \"%3\" dropped since it is not supported anymore.")
|
||||
.arg(item.command().toUserOutput(), item.id().toString(), fileName.toUserOutput());
|
||||
continue;
|
||||
}
|
||||
// FIXME: During startup, devices are not yet available, so we cannot check if the file still exists.
|
||||
if (!item.command().needsDevice() && !item.command().isExecutableFile()) {
|
||||
qWarning() << QString("DebuggerItem \"%1\" (%2) read from \"%3\" dropped since the command is not executable.")
|
||||
|
@@ -388,6 +388,15 @@ public:
|
||||
k->setValue(DebuggerKitAspect::id(), bestLevel != DebuggerItem::DoesNotMatch ? bestItem.id() : QVariant());
|
||||
}
|
||||
|
||||
void fix(Kit *k) override
|
||||
{
|
||||
const QVariant id = k->value(DebuggerKitAspect::id());
|
||||
if (Utils::anyOf(DebuggerItemManager::debuggers(), Utils::equal(&DebuggerItem::id, id)))
|
||||
return;
|
||||
k->removeKeySilently(DebuggerKitAspect::id());
|
||||
setup(k);
|
||||
}
|
||||
|
||||
KitAspect *createKitAspect(Kit *k) const override
|
||||
{
|
||||
return new Internal::DebuggerKitAspectImpl(k, this);
|
||||
|
Reference in New Issue
Block a user