[Lldb-commits] [lldb] [lldb] Keep a stop private while its breakpoint actions run (PR #234789)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 22 16:00:42 PDT 2026
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/test/API/api/multithreaded/stop_reporting/stop_reporting.cpp lldb/test/API/api/multithreaded/stop_reporting/test_stop_reporting.cpp lldb/include/lldb/Target/Process.h lldb/include/lldb/Utility/Policy.h lldb/source/Interpreter/CommandInterpreter.cpp lldb/source/Target/Process.cpp lldb/source/Utility/Policy.cpp lldb/unittests/Utility/PolicyTest.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/test/API/api/multithreaded/stop_reporting/stop_reporting.cpp b/lldb/test/API/api/multithreaded/stop_reporting/stop_reporting.cpp
index ae07b1b63..e09f2675d 100644
--- a/lldb/test/API/api/multithreaded/stop_reporting/stop_reporting.cpp
+++ b/lldb/test/API/api/multithreaded/stop_reporting/stop_reporting.cpp
@@ -2,13 +2,9 @@ int bkpt_function(int input) {
return input * 10; // Set a breakpoint here:
}
-int call_me_function(int input) {
- return input * 20;
-}
+int call_me_function(int input) { return input * 20; }
-int
-main()
-{
+int main() {
int counter = 0; // Set a breakpoint in main
counter += call_me_function(5);
counter += bkpt_function(10);
diff --git a/lldb/test/API/api/multithreaded/stop_reporting/test_stop_reporting.cpp b/lldb/test/API/api/multithreaded/stop_reporting/test_stop_reporting.cpp
index addbbc3ba..0674ac358 100644
--- a/lldb/test/API/api/multithreaded/stop_reporting/test_stop_reporting.cpp
+++ b/lldb/test/API/api/multithreaded/stop_reporting/test_stop_reporting.cpp
@@ -166,8 +166,8 @@ void test(SBDebugger &dbg, std::vector<std::string> args) {
throw Exception(error_str);
// Now add our test breakpoint, and then add a callback to it:
- SBBreakpoint breakpoint = target.BreakpointCreateBySourceRegex(
- "Set a breakpoint here", main_spec);
+ SBBreakpoint breakpoint =
+ target.BreakpointCreateBySourceRegex("Set a breakpoint here", main_spec);
if (!breakpoint.IsValid() || breakpoint.GetNumLocations() == 0)
throw Exception("invalid breakpoint in bkpt_function");
SBError error;
@@ -257,9 +257,8 @@ void test(SBDebugger &dbg, std::vector<std::string> args) {
});
// Okay, our test thread is running, so continue the process:
- bool stopped =
- continue_to_breakpoint(dbg, process, main_thread, breakpoint.GetID(),
- error_str);
+ bool stopped = continue_to_breakpoint(dbg, process, main_thread,
+ breakpoint.GetID(), error_str);
test_running_thread.join();
if (!err_str.empty())
``````````
</details>
https://github.com/llvm/llvm-project/pull/234789
More information about the lldb-commits
mailing list