[Lldb-commits] [lldb] [lldb-dap] Change the launch sequence (PR #138219)
via lldb-commits
lldb-commits at lists.llvm.org
Thu May 1 16:57:11 PDT 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 HEAD~1 HEAD --extensions h,cpp -- lldb/tools/lldb-dap/DAP.cpp lldb/tools/lldb-dap/DAP.h lldb/tools/lldb-dap/EventHelper.cpp lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp lldb/tools/lldb-dap/Handler/ConfigurationDoneRequestHandler.cpp lldb/tools/lldb-dap/Handler/InitializeRequestHandler.cpp lldb/tools/lldb-dap/Handler/LaunchRequestHandler.cpp lldb/tools/lldb-dap/Handler/RequestHandler.cpp lldb/tools/lldb-dap/Handler/RequestHandler.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp b/lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp
index 8ded3c25f..77e540070 100644
--- a/lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp
+++ b/lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp
@@ -183,7 +183,6 @@ void AttachRequestHandler::operator()(const llvm::json::Object &request) const {
// The custom commands might have created a new target so we should use the
// selected target after these commands are run.
dap.target = dap.debugger.GetSelectedTarget();
-
}
// Notify the event thread that it should ignore the next stop event.
diff --git a/lldb/tools/lldb-dap/Handler/InitializeRequestHandler.cpp b/lldb/tools/lldb-dap/Handler/InitializeRequestHandler.cpp
index 2214c7846..347ae7d83 100644
--- a/lldb/tools/lldb-dap/Handler/InitializeRequestHandler.cpp
+++ b/lldb/tools/lldb-dap/Handler/InitializeRequestHandler.cpp
@@ -160,16 +160,15 @@ static void EventThreadFunction(DAP &dap) {
break;
case lldb::eStateSuspended:
break;
- case lldb::eStateStopped:
- {
- std::unique_lock<std::mutex> lock(dap.ignore_stop_mutex);
- if (dap.ignore_next_stop) {
- DAP_LOG(dap.log, "Ignoring process stop event");
- SendThreadStoppedEvent(dap);
- dap.ignore_next_stop = false;
- continue;
- }
+ case lldb::eStateStopped: {
+ std::unique_lock<std::mutex> lock(dap.ignore_stop_mutex);
+ if (dap.ignore_next_stop) {
+ DAP_LOG(dap.log, "Ignoring process stop event");
+ SendThreadStoppedEvent(dap);
+ dap.ignore_next_stop = false;
+ continue;
}
+ }
// Only report a stopped event if the process was not
// automatically restarted.
``````````
</details>
https://github.com/llvm/llvm-project/pull/138219
More information about the lldb-commits
mailing list