LLDB  mainline
RegisterContextPOSIXCore_arm64.h
Go to the documentation of this file.
1 //===-- RegisterContextPOSIXCore_arm64.h ------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_ELF_CORE_REGISTERCONTEXTPOSIXCORE_ARM64_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_ELF_CORE_REGISTERCONTEXTPOSIXCORE_ARM64_H
11 
14 
18 
20 public:
21  static std::unique_ptr<RegisterContextCorePOSIX_arm64>
23  const lldb_private::DataExtractor &gpregset,
24  llvm::ArrayRef<lldb_private::CoreNote> notes);
25 
27 
28  bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
29  lldb_private::RegisterValue &value) override;
30 
31  bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
32  const lldb_private::RegisterValue &value) override;
33 
34  bool ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
35 
36  bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
37 
38  bool HardwareSingleStep(bool enable) override;
39 
40 protected:
42  lldb_private::Thread &thread,
43  std::unique_ptr<RegisterInfoPOSIX_arm64> register_info,
44  const lldb_private::DataExtractor &gpregset,
45  llvm::ArrayRef<lldb_private::CoreNote> notes);
46 
47  bool ReadGPR() override;
48 
49  bool ReadFPR() override;
50 
51  bool WriteGPR() override;
52 
53  bool WriteFPR() override;
54 
55 private:
60 
63 
64  const uint8_t *GetSVEBuffer(uint64_t offset = 0);
65 
67 
68  uint32_t CalculateSVEOffset(const lldb_private::RegisterInfo *reg_info);
69 
70  uint64_t GetSVERegVG() { return m_sve_vector_length / 8; }
71 };
72 
73 #endif // LLDB_SOURCE_PLUGINS_PROCESS_ELF_CORE_REGISTERCONTEXTPOSIXCORE_ARM64_H
lldb_private::ArchSpec
Definition: ArchSpec.h:33
RegisterContextCorePOSIX_arm64::m_sve_state
SVEState m_sve_state
Definition: RegisterContextPOSIXCore_arm64.h:61
lldb_private::RegisterValue
Definition: RegisterValue.h:28
RegisterContextCorePOSIX_arm64::RegisterContextCorePOSIX_arm64
RegisterContextCorePOSIX_arm64(lldb_private::Thread &thread, std::unique_ptr< RegisterInfoPOSIX_arm64 > register_info, const lldb_private::DataExtractor &gpregset, llvm::ArrayRef< lldb_private::CoreNote > notes)
Definition: RegisterContextPOSIXCore_arm64.cpp:44
RegisterContextCorePOSIX_arm64::ReadRegister
bool ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value) override
Definition: RegisterContextPOSIXCore_arm64.cpp:127
RegisterContextCorePOSIX_arm64::ReadFPR
bool ReadFPR() override
Definition: RegisterContextPOSIXCore_arm64.cpp:69
RegisterUtilities.h
RegisterContextCorePOSIX_arm64::ConfigureRegisterContext
void ConfigureRegisterContext()
Definition: RegisterContextPOSIXCore_arm64.cpp:85
RegisterContextCorePOSIX_arm64::m_pac_data
lldb_private::DataExtractor m_pac_data
Definition: RegisterContextPOSIXCore_arm64.h:59
SVEState
SVEState
Definition: RegisterInfoPOSIX_arm64.h:18
RegisterContextCorePOSIX_arm64::~RegisterContextCorePOSIX_arm64
~RegisterContextCorePOSIX_arm64() override
RegisterContextCorePOSIX_arm64::WriteFPR
bool WriteFPR() override
Definition: RegisterContextPOSIXCore_arm64.cpp:76
RegisterContextCorePOSIX_arm64::ReadAllRegisterValues
bool ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override
Definition: RegisterContextPOSIXCore_arm64.cpp:232
lldb_private::DataExtractor
Definition: DataExtractor.h:48
lldb_private::Thread
Definition: Thread.h:61
RegisterContextCorePOSIX_arm64::Create
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)
Definition: RegisterContextPOSIXCore_arm64.cpp:21
RegisterContextCorePOSIX_arm64::ReadGPR
bool ReadGPR() override
Definition: RegisterContextPOSIXCore_arm64.cpp:67
RegisterContextCorePOSIX_arm64::GetSVEBuffer
const uint8_t * GetSVEBuffer(uint64_t offset=0)
Definition: RegisterContextPOSIXCore_arm64.cpp:81
LinuxPTraceDefines_arm64sve.h
RegisterContextCorePOSIX_arm64::CalculateSVEOffset
uint32_t CalculateSVEOffset(const lldb_private::RegisterInfo *reg_info)
Definition: RegisterContextPOSIXCore_arm64.cpp:111
RegisterContextCorePOSIX_arm64::HardwareSingleStep
bool HardwareSingleStep(bool enable) override
Definition: RegisterContextPOSIXCore_arm64.cpp:247
RegisterContextCorePOSIX_arm64::WriteAllRegisterValues
bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override
Definition: RegisterContextPOSIXCore_arm64.cpp:242
uint32_t
RegisterContextCorePOSIX_arm64::m_sve_data
lldb_private::DataExtractor m_sve_data
Definition: RegisterContextPOSIXCore_arm64.h:58
RegisterContextPOSIX_arm64.h
uint16_t
DataExtractor.h
RegisterContextCorePOSIX_arm64::m_fpr_data
lldb_private::DataExtractor m_fpr_data
Definition: RegisterContextPOSIXCore_arm64.h:57
RegisterContextCorePOSIX_arm64::WriteRegister
bool WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value) override
Definition: RegisterContextPOSIXCore_arm64.cpp:237
RegisterContextCorePOSIX_arm64::WriteGPR
bool WriteGPR() override
Definition: RegisterContextPOSIXCore_arm64.cpp:71
RegisterContextCorePOSIX_arm64::GetSVERegVG
uint64_t GetSVERegVG()
Definition: RegisterContextPOSIXCore_arm64.h:70
RegisterContextCorePOSIX_arm64
Definition: RegisterContextPOSIXCore_arm64.h:19
RegisterContextCorePOSIX_arm64::m_gpr_data
lldb_private::DataExtractor m_gpr_data
Definition: RegisterContextPOSIXCore_arm64.h:56
RegisterContextCorePOSIX_arm64::m_sve_vector_length
uint16_t m_sve_vector_length
Definition: RegisterContextPOSIXCore_arm64.h:62
RegisterContextPOSIX_arm64
Definition: RegisterContextPOSIX_arm64.h:17
DataBufferHeap.h