summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/Utility/NativeProcessSoftwareSingleStep.cpp
AgeCommit message (Collapse)Author
2025-06-30[lldb][RISCV] fix LR/SC atomic sequence handling in lldb-server (#146072)dlav-sc
lldb-server had limited support for single-stepping through the lr/sc atomic sequence. This patch enhances that support for all possible atomic sequences. The previous version contained an incorrect regex pattern in the test, causing the riscv-specific test to run on other platforms. This reland fixes the regex (see lldb/test/API/riscv/step/TestSoftwareStep.py)
2025-06-24Revert "[lldb][RISCV] fix LR/SC atomic sequence handling in lldb-server" ↵Jonas Devlieghere
(#145597) Reverts llvm/llvm-project#127505 because `riscv/step/TestSoftwareStep.py` is failing on the bots.
2025-06-24[lldb][RISCV] fix LR/SC atomic sequence handling in lldb-server (#127505)dlav-sc
lldb-server had limited support for single-stepping through the lr/sc atomic sequence. This patch enhances that support for all possible atomic sequences.
2024-08-27[lldb] Turn lldb_private::Status into a value type. (#106163)Adrian Prantl
This patch removes all of the Set.* methods from Status. This cleanup is part of a series of patches that make it harder use the anti-pattern of keeping a long-lives Status object around and updating it while dropping any errors it contains on the floor. This patch is largely NFC, the more interesting next steps this enables is to: 1. remove Status.Clear() 2. assert that Status::operator=() never overwrites an error 3. remove Status::operator=() Note that step (2) will bring 90% of the benefits for users, and step (3) will dramatically clean up the error handling code in various places. In the end my goal is to convert all APIs that are of the form ` ResultTy DoFoo(Status& error) ` to ` llvm::Expected<ResultTy> DoFoo() ` How to read this patch? The interesting changes are in Status.h and Status.cpp, all other changes are mostly ` perl -pi -e 's/\.SetErrorString/ = Status::FromErrorString/g' $(git grep -l SetErrorString lldb/source) ` plus the occasional manual cleanup.
2024-07-16[lldb][riscv] Fix setting breakpoint for undecoded instruction (#90075)ita-sc
This patch adds an interface GetLastInstrSize to get information about the size of last tried to be decoded instruction and uses it to set software breakpoint if the memory can be decoded as instruction. RISC-V architecture instruction format specifies the length of instruction in first bits, so we can set a breakpoint for these cases. This is needed as RISCV have a lot of extensions, that are not supported by `EmulateInstructionRISCV`.
2022-12-08[LLDB][LoongArch] Make software single stepping workHui Li
Hardware single stepping is not currently supported by the linux kernel. In order to support single step debugging, add EmulateInstructionLoongArch to implement the software Single Stepping. This patch only support the simplest single step execution of non-jump instructions. Reviewed By: SixWeining, DavidSpickett Differential Revision: https://reviews.llvm.org/D139158
2022-12-08Revert "[LLDB][LoongArch] Make software single stepping work"Weining Lu
This reverts commit 3a9e07b1e7f4718a0e117f3a732f1679c4bf2e30. Reason to revert: author name is wrong.
2022-12-08[LLDB][LoongArch] Make software single stepping workWeining Lu
Hardware single stepping is not currently supported by the linux kernel. In order to support single step debugging, add EmulateInstructionLoongArch to implement the software Single Stepping. This patch only support the simplest single step execution of non-jump instructions. Reviewed By: SixWeining, DavidSpickett Differential Revision: https://reviews.llvm.org/D139158
2022-08-16[LLDB][RISCV] Make software single stepping workEmmmer
Add: - `EmulateInstructionRISCV`, which can be used for riscv32 and riscv64. - Add unittests for EmulateInstructionRISCV. Note: Compressed instructions set (RVC) was still not supported in this patch. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D131759
2022-08-16[LLDB] Fix possible nullptr exceptionEmmmer
Some architectures do not have a flag register (like riscv). In this case, we should set it to `baton.m_register_values.end()` to avoid nullptr exception. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D131945
2021-02-08[lldb] [Process/FreeBSDRemote] Introduce mips64 supportMichał Górny
Introduce mips64 support to match the legacy FreeBSD plugin. Similarly to the legacy plugin, the code does not support FPU registers at the moment. The support for them will be submitted separately as it requires changes to the register context shared by both plugins. This also includes software single-stepping support that is moved from the Linux plugin into a common Utility class. The FreeBSD code also starts explicitly ignoring EINVAL from PT_CLEARSTEP since this is easier to implement than checking whether hardware single-stepping were used. Differential Revision: https://reviews.llvm.org/D95802