[Lldb-commits] [lldb] [lldb] Fix data race in statusline format handling (PR #142489)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 3 12:32:59 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/include/lldb/Core/Debugger.h lldb/include/lldb/Core/FormatEntity.h lldb/include/lldb/Interpreter/OptionValue.h lldb/include/lldb/Target/Language.h lldb/source/Core/Debugger.cpp lldb/source/Core/Disassembler.cpp lldb/source/Core/FormatEntity.cpp lldb/source/Core/Statusline.cpp lldb/source/Interpreter/OptionValue.cpp lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h lldb/source/Target/StackFrame.cpp lldb/source/Target/Thread.cpp lldb/source/Target/ThreadPlanTracer.cpp lldb/unittests/Core/DebuggerTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index de60d25b9..81037d3de 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -1537,7 +1537,8 @@ bool Debugger::FormatDisassemblerAddress(const FormatEntity::Entry *format,
if (format == nullptr) {
if (exe_ctx != nullptr && exe_ctx->HasTargetScope()) {
- format_entry = exe_ctx->GetTargetRef().GetDebugger().GetDisassemblyFormat();
+ format_entry =
+ exe_ctx->GetTargetRef().GetDebugger().GetDisassemblyFormat();
format = &format_entry;
}
if (format == nullptr) {
diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp
index 6ecbd1f69..833e32757 100644
--- a/lldb/source/Core/Disassembler.cpp
+++ b/lldb/source/Core/Disassembler.cpp
@@ -1037,8 +1037,7 @@ void InstructionList::Dump(Stream *s, bool show_address, bool show_bytes,
const FormatEntity::Entry *disassembly_format = nullptr;
FormatEntity::Entry format;
if (exe_ctx && exe_ctx->HasTargetScope()) {
- format =
- exe_ctx->GetTargetRef().GetDebugger().GetDisassemblyFormat();
+ format = exe_ctx->GetTargetRef().GetDebugger().GetDisassemblyFormat();
disassembly_format = &format;
} else {
FormatEntity::Parse("${addr}: ", format);
``````````
</details>
https://github.com/llvm/llvm-project/pull/142489
More information about the lldb-commits
mailing list