Commit 3b263156 authored by Ole Christian Eidheim's avatar Ole Christian Eidheim
Browse files

Fixed debug stop status message for newer liblldb versions

parent 64205e2e
Pipeline #261631611 passed with stages
in 16 minutes and 27 seconds
......@@ -437,9 +437,9 @@ void Project::LLDB::debug_start() {
if(state == lldb::StateType::eStateStopped) {
char buffer[100];
auto thread = process.GetSelectedThread();
auto n = thread.GetStopDescription(buffer, 100);
auto n = thread.GetStopDescription(buffer, 100); // Returns number of bytes read. Might include null termination... Although maybe on newer versions only.
if(n > 0)
status += " (" + std::string(buffer, n <= 100 ? n : 100) + ")";
status += " (" + std::string(buffer, n <= 100 ? (buffer[n - 1] == '\0' ? n - 1 : n) : 100) + ")";
auto line_entry = thread.GetSelectedFrame().GetLineEntry();
if(line_entry.IsValid()) {
lldb::SBStream stream;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment