From 52aa67d24d9ab0dcd5ff62180bc657ec2ef97818 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Thu, 29 Aug 2024 08:50:10 +0200 Subject: [PATCH] cdb: Match x64 target for arm64 cdb On a Windows arm64 machine "Debugging tools for Windows" only installs and arm64 and an x86 cdb. By default no x64 cdb is present there. Though it is possibble to use the arm64 cdb to debug an x64 target on these machines. Reflect that fact in our debugger matching logic. Task-number: QTCREATORBUG-30533 Change-Id: I6f3ecb7ce393c4860e2eeac286683e2b60fea7b6 Reviewed-by: David Schulz --- src/plugins/debugger/debuggeritem.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp index 455b4e39862..dfa45da6d9b 100644 --- a/src/plugins/debugger/debuggeritem.cpp +++ b/src/plugins/debugger/debuggeritem.cpp @@ -415,6 +415,12 @@ static DebuggerItem::MatchLevel matchSingle(const Abi &debuggerAbi, const Abi &t targetAbi.osFlavor() <= Abi::WindowsLastMsvcFlavor; if (!isMsvcTarget && (engineType == GdbEngineType || engineType == LldbEngineType)) matchOnMultiarch = DebuggerItem::MatchesSomewhat; + // arm64 cdb can debug x64 targets + if (isMsvcTarget && engineType == CdbEngineType + && debuggerAbi.architecture() == Abi::ArmArchitecture + && targetAbi.architecture() == Abi::X86Architecture + && debuggerAbi.wordWidth() == 64 && targetAbi.wordWidth() == 64) + return DebuggerItem::MatchesSomewhat; if (debuggerAbi.architecture() != Abi::UnknownArchitecture && debuggerAbi.architecture() != targetAbi.architecture()) return matchOnMultiarch;