[Lldb-commits] [lldb] [lldb][RISCV] Don't abort on an SC instruction outside a recognized LR/SC sequence (PR #238120)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 2 14:08:21 PST 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 cpp -- lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp lldb/unittests/Instruction/RISCV/TestRISCVEmulator.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/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
index 5b5d352ab..a19369cab 100644
--- a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
+++ b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
@@ -1245,9 +1245,9 @@ public:
// RV32A & RV64A (The standard atomic instruction extension) //
bool operator()(LR_W) { return AtomicSequence(m_emu); }
bool operator()(LR_D) { return AtomicSequence(m_emu); }
- // A well-formed LR/SC loop is consumed by AtomicSequence. An SC reached on its
- // own (a differently shaped loop, or analysis starting mid-function) cannot be
- // emulated, so report failure instead of aborting the debugger.
+ // A well-formed LR/SC loop is consumed by AtomicSequence. An SC reached on
+ // its own (a differently shaped loop, or analysis starting mid-function)
+ // cannot be emulated, so report failure instead of aborting the debugger.
bool operator()(SC_W) { return false; }
bool operator()(SC_D) { return false; }
bool operator()(AMOSWAP_W inst) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/238120
More information about the lldb-commits
mailing list