[kde] [Bug 368603] crash when starting an lldb debug session

RJVB via KDE Bugzilla bugzilla_noreply at kde.org
Sun Sep 11 20:44:57 BST 2016


https://bugs.kde.org/show_bug.cgi?id=368603

--- Comment #2 from RJVB <rjvbertin at gmail.com> ---
I think this happens because/when DebugSession::handleVersion() is called with
an empty QStringList argument.

Why that would happen I have no idea, possible it's related to commit
102f673c6ff1afe5b1ca9cb6faa0503663b96e16 ("LLDB plugin: check LLDB version
rather than lldb-mi version, which doesn't change frequently"). If that does
what I think it does it tries to invoke lldb, which may not be in the path.

Either way, returning early from handleVersion() works around the crash and
allows the debugger to function:

```
diff --git a/debuggers/lldb/debugsession.cpp b/debuggers/lldb/debugsession.cpp
index 448d3ea..e4e5c22 100644
--- a/debuggers/lldb/debugsession.cpp
+++ b/debuggers/lldb/debugsession.cpp
@@ -381,6 +381,10 @@ void DebugSession::handleCoreFile(const QStringList &s)

 void DebugSession::handleVersion(const QStringList& s)
 {
+    if (s.isEmpty()) {
+        // silently do nothing if s is empty
+        return;
+    }
     qCDebug(DEBUGGERLLDB) << s.first();

     QRegularExpression rx("^lldb version: (\\d+).(\\d+).(\\d+)\\b",
QRegularExpression::MultilineOption);
```

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Unassigned-bugs mailing list