[Lldb-commits] [lldb] [LLDB] Add a way to avoid manual stepping over breakpoints when resuming (PR #165760)

via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 30 11:23:49 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 origin/main HEAD --extensions h,cpp -- lldb/include/lldb/Host/common/NativeProcessProtocol.h lldb/include/lldb/Target/Process.h lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h lldb/source/Target/ThreadList.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/source/Target/ThreadList.cpp b/lldb/source/Target/ThreadList.cpp
index 1a00e5f48..910adb03b 100644
--- a/lldb/source/Target/ThreadList.cpp
+++ b/lldb/source/Target/ThreadList.cpp
@@ -568,11 +568,11 @@ bool ThreadList::WillResume(RunDirection &direction) {
     // others, only call setup on the threads that request StopOthers...
     if (thread_to_run != nullptr) {
       // See if any thread wants to run stopping others.  If it does, then we
-      // won't setup the other threads for resume, since they aren't going to get
-      // a chance to run.  This is necessary because the SetupForResume might add
-      // "StopOthers" plans which would then get to be part of the who-gets-to-run
-      // negotiation, but they're coming in after the fact, and the threads that
-      // are already set up should take priority.
+      // won't setup the other threads for resume, since they aren't going to
+      // get a chance to run.  This is necessary because the SetupForResume
+      // might add "StopOthers" plans which would then get to be part of the
+      // who-gets-to-run negotiation, but they're coming in after the fact, and
+      // the threads that are already set up should take priority.
       if (thread_to_run->SetupToStepOverBreakpointIfNeeded(direction)) {
         // We only need to step over breakpoints when running forward, and the
         // step-over-breakpoint plan itself wants to run forward, so this
@@ -587,11 +587,12 @@ bool ThreadList::WillResume(RunDirection &direction) {
               !thread_sp->GetBackingThread())
             continue;
           if (thread_sp->SetupToStepOverBreakpointIfNeeded(direction)) {
-            // We only need to step over breakpoints when running forward, and the
-            // step-over-breakpoint plan itself wants to run forward, so this
-            // keeps our desired direction.
+            // We only need to step over breakpoints when running forward, and
+            // the step-over-breakpoint plan itself wants to run forward, so
+            // this keeps our desired direction.
             assert(thread_sp->GetCurrentPlan()->GetDirection() == direction);
-            // You can't say "stop others" and also want yourself to be suspended.
+            // You can't say "stop others" and also want yourself to be
+            // suspended.
             assert(thread_sp->GetCurrentPlan()->RunState() != eStateSuspended);
             thread_to_run = thread_sp;
             if (thread_sp->ShouldRunBeforePublicStop()) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/165760


More information about the lldb-commits mailing list