From 9816763b0116a09cb1a8e64d015b384ce34c4223 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Fri, 18 Oct 2013 11:25:07 +0200 Subject: [PATCH] Debugger: Make ABI matching a bit more fuzzy The debugger ABI might not be fully defined, so ignore any field that is undefined in the debugger ABI. Change-Id: Idf57b76efff12d4ab4c21f18721a02970efbf217 Reviewed-by: Tobias Hunger --- src/plugins/debugger/debuggerkitinformation.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp index 2bd4492dec6..fc01bf2e6a7 100644 --- a/src/plugins/debugger/debuggerkitinformation.cpp +++ b/src/plugins/debugger/debuggerkitinformation.cpp @@ -187,16 +187,19 @@ void DebuggerItem::setAbi(const Abi &abi) static DebuggerItem::MatchLevel matchSingle(const Abi &debuggerAbi, const Abi &targetAbi) { - if (debuggerAbi.architecture() != targetAbi.architecture()) + if (debuggerAbi.architecture() != Abi::UnknownArchitecture + && debuggerAbi.architecture() != targetAbi.architecture()) return DebuggerItem::DoesNotMatch; - if (debuggerAbi.os() != targetAbi.os()) + if (debuggerAbi.os() != Abi::UnknownOS + && debuggerAbi.os() != targetAbi.os()) return DebuggerItem::DoesNotMatch; - if (debuggerAbi.binaryFormat() != targetAbi.binaryFormat()) + if (debuggerAbi.binaryFormat() != Abi::UnknownFormat + && debuggerAbi.binaryFormat() != targetAbi.binaryFormat()) return DebuggerItem::DoesNotMatch; - if (debuggerAbi.wordWidth() != targetAbi.wordWidth()) + if (debuggerAbi.wordWidth() != 0 && debuggerAbi.wordWidth() != targetAbi.wordWidth()) return DebuggerItem::DoesNotMatch; if (debuggerAbi.os() == Abi::WindowsOS) {