[Lldb-commits] [lldb] [llvm] [lldb-dap] Add multi-session support with shared debugger instances (PR #163653)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 10 12:46:04 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- lldb/tools/lldb-dap/DAPSessionManager.cpp lldb/tools/lldb-dap/DAPSessionManager.h lldb/unittests/DAP/DAPSessionManagerTest.cpp lldb/include/lldb/API/SBTarget.h lldb/include/lldb/Target/Target.h lldb/source/API/SBTarget.cpp lldb/source/Target/Target.cpp lldb/tools/lldb-dap/DAP.cpp lldb/tools/lldb-dap/DAP.h lldb/tools/lldb-dap/DAPForward.h lldb/tools/lldb-dap/EventHelper.cpp lldb/tools/lldb-dap/EventHelper.h lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp lldb/tools/lldb-dap/Handler/InitializeRequestHandler.cpp lldb/tools/lldb-dap/Handler/LaunchRequestHandler.cpp lldb/tools/lldb-dap/Protocol/ProtocolRequests.cpp lldb/tools/lldb-dap/Protocol/ProtocolRequests.h lldb/tools/lldb-dap/tool/lldb-dap.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/tools/lldb-dap/EventHelper.cpp b/lldb/tools/lldb-dap/EventHelper.cpp
index e2ec4e039..bed7e4cdc 100644
--- a/lldb/tools/lldb-dap/EventHelper.cpp
+++ b/lldb/tools/lldb-dap/EventHelper.cpp
@@ -434,8 +434,8 @@ void EventThread(lldb::SBDebugger debugger, lldb::SBBroadcaster broadcaster,
event_mask & lldb::SBTarget::eBroadcastBitModulesUnloaded;
lldb::SBMutex api_mutex = dap_instance->GetAPIMutex();
- const std::scoped_lock<lldb::SBMutex, std::mutex> guard(api_mutex,
- dap_instance->modules_mutex);
+ const std::scoped_lock<lldb::SBMutex, std::mutex> guard(
+ api_mutex, dap_instance->modules_mutex);
for (uint32_t i = 0; i < num_modules; ++i) {
lldb::SBModule module =
lldb::SBTarget::GetModuleAtIndexFromEvent(i, event);
@@ -565,11 +565,13 @@ void EventThread(lldb::SBDebugger debugger, lldb::SBBroadcaster broadcaster,
if (!thread.IsValid())
continue;
- DAP *dap_instance = DAPSessionManager::FindDAP(thread.GetProcess().GetTarget());
+ DAP *dap_instance =
+ DAPSessionManager::FindDAP(thread.GetProcess().GetTarget());
if (!dap_instance)
continue;
- SendInvalidatedEvent(*dap_instance, {protocol::InvalidatedEventBody::eAreaStacks},
+ SendInvalidatedEvent(*dap_instance,
+ {protocol::InvalidatedEventBody::eAreaStacks},
thread.GetThreadID());
}
} else if (event_mask & lldb::eBroadcastBitError ||
``````````
</details>
https://github.com/llvm/llvm-project/pull/163653
More information about the lldb-commits
mailing list