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 <tobias.hunger@digia.com>
This commit is contained in:
Tobias Hunger
2013-10-18 11:25:07 +02:00
parent 78dafd4f1f
commit 9816763b01

View File

@@ -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) {