From 5bfb5d9c324685dcb49753b42ee9a0f87e866bc5 Mon Sep 17 00:00:00 2001
From: Tobias Hunger <tobias.hunger@nokia.com>
Date: Wed, 5 Oct 2011 12:41:27 +0000
Subject: [PATCH] CERC: Use invalid ABI

Use a invalid ABI since we have no idea what we will end up running.
Make the debugger figure out specifics when needed.

Change-Id: Ia74080887617a097a16d789dfd7f88458409a23c
Reviewed-on: http://codereview.qt-project.org/6065
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
---
 src/plugins/debugger/debuggerrunner.cpp                      | 5 +++++
 .../projectexplorer/customexecutablerunconfiguration.cpp     | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp
index 08c7fd26b8d..d6d1e04ad18 100644
--- a/src/plugins/debugger/debuggerrunner.cpp
+++ b/src/plugins/debugger/debuggerrunner.cpp
@@ -726,6 +726,11 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
     sp.executable = rc->executable();
     sp.processArgs = rc->commandLineArguments();
     sp.toolChainAbi = rc->abi();
+    if (!sp.toolChainAbi.isValid()) {
+        QList<Abi> abis = Abi::abisOfBinary(sp.executable);
+        if (!abis.isEmpty())
+            sp.toolChainAbi = abis.at(0);
+    }
     sp.useTerminal = rc->runMode() == LocalApplicationRunConfiguration::Console;
     sp.dumperLibrary = rc->dumperLibrary();
     sp.dumperLibraryLocations = rc->dumperLibraryLocations();
diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
index 8305b1e2932..345f3ffa7ce 100644
--- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
+++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
@@ -337,7 +337,7 @@ QStringList CustomExecutableRunConfiguration::dumperLibraryLocations() const
 
 ProjectExplorer::Abi CustomExecutableRunConfiguration::abi() const
 {
-    return ProjectExplorer::Abi::hostAbi();
+    return Abi(); // return an invalid ABI: We do not know what we will end up running!
 }
 
 // Factory
-- 
GitLab