[Lldb-commits] [lldb] [lldb] Make SBProcess thread related actions listen to StopLocker (PR #134339)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 11 10:20:54 PDT 2025
================
@@ -870,6 +870,16 @@ llvm::json::Value CreateThread(lldb::SBThread &thread, lldb::SBFormat &format) {
return llvm::json::Value(std::move(object));
}
+llvm::json::Array GetThreads(lldb::SBProcess process, lldb::SBFormat &format) {
+ llvm::json::Array threads;
+ const uint32_t num_threads = process.GetNumThreads();
+ for (uint32_t thread_idx = 0; thread_idx < num_threads; ++thread_idx) {
+ lldb::SBThread thread = process.GetThreadAtIndex(thread_idx);
+ threads.emplace_back(CreateThread(thread, format));
+ }
+ return threads;
----------------
clayborg wrote:
(we don't need to add the API for this patch, I was just mentioning this). The API lock fix will work here nicely.
https://github.com/llvm/llvm-project/pull/134339
More information about the lldb-commits
mailing list