summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_riscv64.cpp
AgeCommit message (Collapse)Author
2024-09-04[lldb][RISCV] Support optionally disabled FPR for riscv64 (#104547)Alexey Merzlyakov
The PR adds the support optionally enabled/disabled FP-registers to LLDB `RegisterInfoPOSIX_riscv64`. This situation might take place for RISC-V builds having no FP-registers, like RV64IMAC or RV64IMACV. To aim this, patch adds `opt_regsets` flags mechanism. It re-works RegisterInfo class to work with flexibly allocated (depending on `opt_regsets` flag) `m_register_sets` and `m_register_infos` vectors instead of statically defined structures. The registration of regsets is being arranged by `m_per_regset_regnum_range` map. The patch flows are spread to `NativeRegisterContextLinux_riscv64` and `RegisterContextCorePOSIX_riscv64` classes, that were tested on: - x86_64 host working with coredumps - RV64GC and RV64IMAC targets working with coredumps and natively in run-time with binaries `EmulateInstructionRISCV` is out of scope of this patch, and its behavior did not change, using maximum set of registers. According testcase built for RV64IMAC (no-FPR) was added to `TestLinuxCore.py`.
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.
2022-10-25[LLDB] Fix RISCV buildEmmmer
After https://reviews.llvm.org/D135670 Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D136674
2022-08-11[LLDB][RISCV] Fix risc-v target buildEmmmer
Fixed an inconsistency between D130985 and D130342 This should be a follow-up of D130985 Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D131667
2022-08-11[LLDB][RISCV] Add riscv register definition and read/writeEmmmer
This patch is based on the minimal extract of D128250. What is implemented: - Use the same register layout as Linux kernel and mock read/write for `x0` register (the always zero register). - Refactor some duplicate code, and delete unused register definitions. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D130342