aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2015-09-17 11:11:24 +0200
committerhjk <hjk@theqtcompany.com>2015-09-28 06:13:29 +0000
commit97e9f113879ca23d20ab0a5f124aaff9066ffb55 (patch)
tree8372bc5b7d73c5aa0a21a599fdff4e644edadd12
parentac98023275dc881eeec23d62049a988fcb37426e (diff)
Debugger: Allow LLDB-MI to be used as debugger
That's LLDB's "compatibility" mode faking a GDB 7.4 interface. This is not directly needed given Qt Creator's native LLDB support but might be a useful fallback in some setups. Change-Id: Ia2c1c731de46b8c668bb0c822f1438fe203aa9c5 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
-rw-r--r--src/plugins/debugger/debuggeritem.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp
index 338449ee51..6195c6734f 100644
--- a/src/plugins/debugger/debuggeritem.cpp
+++ b/src/plugins/debugger/debuggeritem.cpp
@@ -110,10 +110,15 @@ void DebuggerItem::createId()
void DebuggerItem::reinitializeFromFile()
{
- QProcess proc;
// CDB only understands the single-dash -version, whereas GDB and LLDB are
- // happy with both -version and --version. So use the "working" -version.
- proc.start(m_command.toString(), QStringList() << QLatin1String("-version"));
+ // happy with both -version and --version. So use the "working" -version
+ // except for the experimental LLDB-MI which insists on --version.
+ const char *version = "-version";
+ if (m_command.toFileInfo().baseName().toLower().contains(QLatin1String("lldb-mi")))
+ version = "--version";
+
+ QProcess proc;
+ proc.start(m_command.toString(), QStringList({ QLatin1String(version) }));
if (!proc.waitForStarted() || !proc.waitForFinished()) {
m_engineType = NoEngineType;
return;