aboutsummaryrefslogtreecommitdiff
path: root/lldb/tools/lldb-dap/JSONUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/tools/lldb-dap/JSONUtils.cpp')
-rw-r--r--lldb/tools/lldb-dap/JSONUtils.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/lldb/tools/lldb-dap/JSONUtils.cpp b/lldb/tools/lldb-dap/JSONUtils.cpp
index 41ca29a..f42c502 100644
--- a/lldb/tools/lldb-dap/JSONUtils.cpp
+++ b/lldb/tools/lldb-dap/JSONUtils.cpp
@@ -654,12 +654,17 @@ llvm::json::Value CreateThreadStopped(DAP &dap, lldb::SBThread &thread,
} else {
body.try_emplace("reason", "breakpoint");
}
- lldb::break_id_t bp_id = thread.GetStopReasonDataAtIndex(0);
- lldb::break_id_t bp_loc_id = thread.GetStopReasonDataAtIndex(1);
- std::string desc_str =
- llvm::formatv("breakpoint {0}.{1}", bp_id, bp_loc_id);
- body.try_emplace("hitBreakpointIds",
- llvm::json::Array{llvm::json::Value(bp_id)});
+ std::vector<lldb::break_id_t> bp_ids;
+ std::ostringstream desc_sstream;
+ desc_sstream << "breakpoint";
+ for (size_t idx = 0; idx < thread.GetStopReasonDataCount(); idx += 2) {
+ lldb::break_id_t bp_id = thread.GetStopReasonDataAtIndex(idx);
+ lldb::break_id_t bp_loc_id = thread.GetStopReasonDataAtIndex(idx + 1);
+ bp_ids.push_back(bp_id);
+ desc_sstream << " " << bp_id << "." << bp_loc_id;
+ }
+ std::string desc_str = desc_sstream.str();
+ body.try_emplace("hitBreakpointIds", llvm::json::Array(bp_ids));
EmplaceSafeString(body, "description", desc_str);
}
} break;