diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp
index 5b86f09c323ab293a2d9cd9a2c7c366feedc0d53..f497e2b19ed86fd69762efc49aa8f15654cf487f 100644
--- a/src/plugins/debugger/debuggerkitinformation.cpp
+++ b/src/plugins/debugger/debuggerkitinformation.cpp
@@ -296,8 +296,27 @@ DebuggerKitInformation::DebuggerItem DebuggerKitInformation::variantToItem(const
     }
     QTC_ASSERT(v.type() == QVariant::Map, return result);
     const QVariantMap vmap = v.toMap();
-    result.binary = Utils::FileName::fromString(vmap.value(QLatin1String(binaryKeyC)).toString());
     result.engineType = static_cast<DebuggerEngineType>(vmap.value(QLatin1String(engineTypeKeyC)).toInt());
+    QString binary = vmap.value(QLatin1String(binaryKeyC)).toString();
+    // Check for special 'auto' entry for binary written by the sdktool during
+    // installation. Try to autodetect.
+    if (binary == QLatin1String("auto")) {
+        binary.clear();
+        switch (result.engineType) {
+        case Debugger::GdbEngineType: // Auto-detect system gdb on Unix
+            if (Abi::hostAbi().os() != Abi::WindowsOS)
+                binary = Environment::systemEnvironment().searchInPath(QLatin1String("gdb"));
+            break;
+        case Debugger::CdbEngineType: { // Auto-detect system CDB on Windows.
+             const QPair<QString, QString> cdbs = autoDetectCdbDebugger();
+             binary = cdbs.second.isEmpty() ? cdbs.first : cdbs.second;
+        }
+            break;
+        default:
+            break;
+        }
+    }
+    result.binary = Utils::FileName::fromString(binary);
     return result;
 }
 
diff --git a/src/tools/sdktool/README.txt b/src/tools/sdktool/README.txt
index be6f2225ff3844e4eca4b21712e4cd1348c186c8..9e21e73cbbdca86430aec1c4d45eefee4a42d5f8 100644
--- a/src/tools/sdktool/README.txt
+++ b/src/tools/sdktool/README.txt
@@ -119,6 +119,7 @@ Add a Kit using the newly set up tool chain and Qt version:
 Tricky parts:
   - debuggerengine is the integer used in the enum Debugger::DebuggerEngineType
     The most important type is 1 for GDB.
+  - debugger can be a absolute path or the value: 'auto'
 
   - devicetype is the string returned IDevice::type()
 
diff --git a/src/tools/sdktool/addkitoperation.cpp b/src/tools/sdktool/addkitoperation.cpp
index 3f8f659dd37ac7bdcfb8f5f34803f9643fc1afeb..4fd5104efb76da2bb61be90dbaff41e576bf2b58 100644
--- a/src/tools/sdktool/addkitoperation.cpp
+++ b/src/tools/sdktool/addkitoperation.cpp
@@ -63,6 +63,12 @@ static char TOOLCHAIN[] = "PE.Profile.ToolChain";
 static char MKSPEC[] = "QtPM4.mkSpecInformation";
 static char QT[] = "QtSupport.QtInformation";
 
+AddKitOperation::AddKitOperation()
+    : m_debuggerEngine(0)
+    , m_debugger(QLatin1String("auto"))
+{
+}
+
 QString AddKitOperation::name() const
 {
     return QLatin1String("addKit");
diff --git a/src/tools/sdktool/addkitoperation.h b/src/tools/sdktool/addkitoperation.h
index e526bcb604463aa06e86f5b16d93b55c3e7addf3..e1910674b3260d51a3710b916b47727a9b2f92c9 100644
--- a/src/tools/sdktool/addkitoperation.h
+++ b/src/tools/sdktool/addkitoperation.h
@@ -38,6 +38,8 @@
 class AddKitOperation : public Operation
 {
 public:
+    AddKitOperation();
+
     QString name() const;
     QString helpText() const;
     QString argumentsHelpText() const;