23std::unique_ptr<RegisterContextCorePOSIX_arm64>
26 llvm::ArrayRef<CoreNote> notes) {
72 auto register_info_up =
73 std::make_unique<RegisterInfoPOSIX_arm64>(arch, opt_regsets);
74 return std::unique_ptr<RegisterContextCorePOSIX_arm64>(
80 Thread &thread, std::unique_ptr<RegisterInfoPOSIX_arm64> register_info,
81 const DataExtractor &gpregset, llvm::ArrayRef<CoreNote> notes)
88 if ((os == llvm::Triple::Linux) || (os == llvm::Triple::FreeBSD)) {
90 std::optional<uint64_t> auxv_at_hwcap = aux_vec.
GetAuxValue(
93 std::optional<uint64_t> auxv_at_hwcap2 =
97 auxv_at_hwcap2.value_or(0));
106 const llvm::Triple &target_triple =
164 uint64_t sve_header_field_offset = 8;
168 sve_header_field_offset = 12;
169 uint16_t sve_header_flags_field =
222 return sve_reg_offset;
234 return error.Success();
249 return error.Success();
283 }
else if (
IsSVE(reg)) {
290 case SVEState::FPSIMD: {
294 uint64_t byte_size = 1;
296 const uint8_t *src = &zeros;
307 case SVEState::Streaming:
314 case SVEState::Disabled:
323 }
else if (
IsTLS(reg)) {
328 }
else if (
IsMTE(reg)) {
333 }
else if (
IsSME(reg)) {
354 const uint8_t *src =
nullptr;
355 std::vector<uint8_t> disabled_za_data;
360 disabled_za_data.resize(za_note_size);
361 std::fill(disabled_za_data.begin(), disabled_za_data.end(), 0);
362 src = disabled_za_data.data();
389 return error.Success();
static llvm::raw_ostream & error(Stream &strm)
@ AUXV_FREEBSD_AT_HWCAP
FreeBSD specific AT_HWCAP value.
@ AUXV_AT_HWCAP2
Extension of AT_HWCAP.
@ AUXV_AT_HWCAP
Machine dependent hints about processor capabilities.
std::optional< uint64_t > GetAuxValue(enum EntryType entry_type) const
lldb_private::DataExtractor GetAuxvData() override
lldb_private::ArchSpec GetArchitecture()
lldb_private::DataExtractor m_gpr_data
static std::unique_ptr< RegisterContextCorePOSIX_arm64 > Create(lldb_private::Thread &thread, const lldb_private::ArchSpec &arch, const lldb_private::DataExtractor &gpregset, llvm::ArrayRef< lldb_private::CoreNote > notes)
~RegisterContextCorePOSIX_arm64() override
struct sme_pseudo_regs m_sme_pseudo_regs
RegisterContextCorePOSIX_arm64(lldb_private::Thread &thread, std::unique_ptr< RegisterInfoPOSIX_arm64 > register_info, const lldb_private::DataExtractor &gpregset, llvm::ArrayRef< lldb_private::CoreNote > notes)
bool HardwareSingleStep(bool enable) override
lldb_private::DataExtractor m_pac_data
lldb_private::DataExtractor m_fpr_data
uint32_t CalculateSVEOffset(const lldb_private::RegisterInfo *reg_info)
lldb_private::DataExtractor m_tls_data
lldb_private::Arm64RegisterFlagsDetector m_register_flags_detector
bool ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override
const uint8_t * GetSVEBuffer(uint64_t offset=0)
lldb_private::DataExtractor m_zt_data
bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override
lldb_private::DataExtractor m_za_data
bool WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value) override
lldb_private::DataExtractor m_fpmr_data
uint16_t m_sve_vector_length
lldb_private::DataExtractor m_mte_data
bool ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value) override
lldb_private::DataExtractor m_sve_data
void ConfigureRegisterContext()
uint32_t GetRegNumFPSR() const
uint32_t GetRegNumSVEZ0() const
bool IsFPMR(unsigned reg) const
virtual const lldb_private::RegisterInfo * GetRegisterInfo()
const lldb_private::RegisterInfo * GetRegisterInfoAtIndex(size_t reg) override
std::unique_ptr< RegisterInfoPOSIX_arm64 > m_register_info_up
virtual size_t GetGPRSize()
bool IsSVEZ(unsigned reg) const
bool IsPAuth(unsigned reg) const
bool IsMTE(unsigned reg) const
bool IsSME(unsigned reg) const
bool IsTLS(unsigned reg) const
size_t GetRegisterCount() override
bool IsSVE(unsigned reg) const
bool IsSVEVG(unsigned reg) const
uint32_t GetRegNumFPCR() const
An architecture specification class.
llvm::Triple & GetTriple()
Architecture triple accessor.
void UpdateRegisterInfo(const RegisterInfo *reg_info, uint32_t num_regs)
Add the field information of any registers named in this class, to the relevant RegisterInfo instance...
void DetectFields(uint64_t hwcap, uint64_t hwcap2)
For the registers listed in this class, detect which fields are present.
ValueType Set(ValueType mask)
Set one or more flags by logical OR'ing mask with the current flags.
uint32_t SetFromMemoryData(const RegisterInfo ®_info, const void *src, uint32_t src_len, lldb::ByteOrder src_byte_order, Status &error)
lldb::ProcessSP GetProcess() const
#define LLDB_INVALID_INDEX32
#define LLDB_INVALID_REGNUM
lldb::ByteOrder InlHostByteOrder()
uint16_t vq_from_vl(uint16_t vl)
const uint32_t ptrace_fpsimd_offset
uint32_t PTraceFPSROffset(uint16_t vq)
uint32_t PTraceFPCROffset(uint16_t vq)
const uint16_t ptrace_regs_mask
const uint16_t ptrace_regs_sve
uint16_t vl_valid(uint16_t vl)
const uint16_t ptrace_regs_fpsimd
user_sve_header user_za_header
A class that represents a running process on the host machine.
DataExtractor getRegset(llvm::ArrayRef< CoreNote > Notes, const llvm::Triple &Triple, llvm::ArrayRef< RegsetDesc > RegsetDescs)
constexpr RegsetDesc AARCH64_TLS_Desc[]
constexpr RegsetDesc AARCH64_FPMR_Desc[]
constexpr RegsetDesc AARCH64_ZT_Desc[]
constexpr RegsetDesc AARCH64_SSVE_Desc[]
constexpr RegsetDesc FPR_Desc[]
constexpr RegsetDesc AARCH64_MTE_Desc[]
constexpr RegsetDesc AARCH64_SVE_Desc[]
constexpr RegsetDesc AARCH64_PAC_Desc[]
constexpr RegsetDesc AARCH64_ZA_Desc[]
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP
@ eRegisterKindLLDB
lldb's internal register numbers
Every register is described in detail including its name, alternate name (optional),...
uint32_t * value_regs
List of registers (terminated with LLDB_INVALID_REGNUM).
uint32_t byte_offset
The byte offset in the register context data where this register's value is found.
uint32_t byte_size
Size in bytes of the register.
uint32_t kinds[lldb::kNumRegisterKinds]
Holds all of the various register numbers for all register kinds.