forked from qt-creator/qt-creator
Debugger: reenable 32 bit cdb detection
The 64 bit cdb has unfortunately limited 32 bit debugging capabilities and there are still a bunch of users that still need to work with 32 bit MSVC builds. Also add functionality to reset the 64 bit cdb in kits with a 32 bit toolchain. This reverts commit9a06e1f65c
. This reverts commit421210e609
. Task-number: QTCREATORBUG-31345 Change-Id: I072353b8ab6a2b93594dd4f11ecd17ca031ab6ec Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -434,11 +434,8 @@ static DebuggerItem::MatchLevel matchSingle(const Abi &debuggerAbi, const Abi &t
|
||||
return matchOnMultiarch;
|
||||
}
|
||||
|
||||
if (debuggerAbi.wordWidth() == 64 && targetAbi.wordWidth() == 32) {
|
||||
return HostOsInfo::isWindowsHost() && engineType == CdbEngineType
|
||||
? DebuggerItem::MatchesPerfectly
|
||||
: DebuggerItem::MatchesSomewhat;
|
||||
}
|
||||
if (debuggerAbi.wordWidth() == 64 && targetAbi.wordWidth() == 32)
|
||||
return DebuggerItem::MatchesSomewhat;
|
||||
if (debuggerAbi.wordWidth() != 0 && debuggerAbi.wordWidth() != targetAbi.wordWidth())
|
||||
return matchOnMultiarch;
|
||||
|
||||
|
@@ -549,7 +549,7 @@ void DebuggerItemModel::autoDetectCdbDebuggers()
|
||||
|
||||
for (const QFileInfo &kitFolderFi : kitFolders) {
|
||||
const QString path = kitFolderFi.absoluteFilePath();
|
||||
QStringList abis = {"x64"};
|
||||
QStringList abis = {"x86", "x64"};
|
||||
if (HostOsInfo::hostArchitecture() == Utils::OsArchArm64)
|
||||
abis << "arm64";
|
||||
for (const QString &abi: abis) {
|
||||
@@ -783,12 +783,6 @@ 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.")
|
||||
|
@@ -391,10 +391,21 @@ public:
|
||||
void fix(Kit *k) override
|
||||
{
|
||||
const QVariant id = k->value(DebuggerKitAspect::id());
|
||||
if (Utils::anyOf(DebuggerItemManager::debuggers(), Utils::equal(&DebuggerItem::id, id)))
|
||||
const DebuggerItem debugger = Utils::findOrDefault(
|
||||
DebuggerItemManager::debuggers(), Utils::equal(&DebuggerItem::id, id));
|
||||
if (debugger.isValid() && debugger.engineType() == CdbEngineType) {
|
||||
const int tcWordWidth = ToolchainKitAspect::targetAbi(k).wordWidth();
|
||||
if (Utils::anyOf(debugger.abis(), Utils::equal(&Abi::wordWidth, tcWordWidth)))
|
||||
return;
|
||||
k->removeKeySilently(DebuggerKitAspect::id());
|
||||
setup(k);
|
||||
|
||||
for (const DebuggerItem &item : DebuggerItemManager::debuggers()) {
|
||||
if (item.engineType() == CdbEngineType
|
||||
&& Utils::anyOf(item.abis(), Utils::equal(&Abi::wordWidth, tcWordWidth))) {
|
||||
k->setValue(DebuggerKitAspect::id(), item.id());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
KitAspect *createKitAspect(Kit *k) const override
|
||||
|
Reference in New Issue
Block a user