[Lldb-commits] [lldb] [lldb] Guard SBFrame/SBThread methods against running processes (PR #152020)

via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 4 13:04:30 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 cpp,h -- lldb/include/lldb/API/SBFrame.h lldb/include/lldb/Host/ProcessRunLock.h lldb/include/lldb/Target/ExecutionContext.h lldb/source/API/SBFrame.cpp lldb/source/API/SBThread.cpp lldb/source/Target/ExecutionContext.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp
index b6fd5e7d3..023b9d7dd 100644
--- a/lldb/source/API/SBFrame.cpp
+++ b/lldb/source/API/SBFrame.cpp
@@ -619,8 +619,8 @@ SBValue SBFrame::FindValue(const char *name, ValueType value_type,
                 stop_if_block_is_inlined_function,
                 [frame](Variable *v) { return v->IsInScope(frame); },
                 &variable_list);
-          if (value_type == eValueTypeVariableGlobal
-              || value_type == eValueTypeVariableStatic) {
+          if (value_type == eValueTypeVariableGlobal ||
+              value_type == eValueTypeVariableStatic) {
             const bool get_file_globals = true;
             VariableList *frame_vars = frame->GetVariableList(get_file_globals,
                                                               nullptr);
@@ -842,9 +842,11 @@ SBValueList SBFrame::GetVariables(const lldb::SBVariablesOptions &options) {
           if (num_variables) {
             size_t num_produced = 0;
             for (const VariableSP &variable_sp : *variable_list) {
-              if (INTERRUPT_REQUESTED(dbg,
-                    "Interrupted getting frame variables with {0} of {1} "
-                    "produced.", num_produced, num_variables))
+              if (INTERRUPT_REQUESTED(
+                      dbg,
+                      "Interrupted getting frame variables with {0} of {1} "
+                      "produced.",
+                      num_produced, num_variables))
                 return {};
 
               if (variable_sp) {

``````````

</details>


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


More information about the lldb-commits mailing list