forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -110,10 +110,15 @@ void DebuggerItem::createId()
|
|||||||
|
|
||||||
void DebuggerItem::reinitializeFromFile()
|
void DebuggerItem::reinitializeFromFile()
|
||||||
{
|
{
|
||||||
QProcess proc;
|
|
||||||
// CDB only understands the single-dash -version, whereas GDB and LLDB are
|
// CDB only understands the single-dash -version, whereas GDB and LLDB are
|
||||||
// happy with both -version and --version. So use the "working" -version.
|
// happy with both -version and --version. So use the "working" -version
|
||||||
proc.start(m_command.toString(), QStringList() << QLatin1String("-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()) {
|
if (!proc.waitForStarted() || !proc.waitForFinished()) {
|
||||||
m_engineType = NoEngineType;
|
m_engineType = NoEngineType;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user