9#if defined(__riscv) && __riscv_xlen == 64
11#ifndef lldb_NativeRegisterContextLinux_riscv64_h
12#define lldb_NativeRegisterContextLinux_riscv64_h
17#include <asm/ptrace.h>
20namespace process_linux {
22class NativeProcessLinux;
24class NativeRegisterContextLinux_riscv64 :
public NativeRegisterContextLinux {
26 NativeRegisterContextLinux_riscv64(
27 const ArchSpec &target_arch, NativeThreadProtocol &native_thread,
28 std::unique_ptr<RegisterInfoPOSIX_riscv64> register_info_up);
30 uint32_t GetRegisterSetCount()
const override;
32 uint32_t GetUserRegisterCount()
const override;
34 const RegisterSet *GetRegisterSet(uint32_t set_index)
const override;
36 Status ReadRegister(
const RegisterInfo *reg_info,
37 RegisterValue ®_value)
override;
39 Status WriteRegister(
const RegisterInfo *reg_info,
40 const RegisterValue ®_value)
override;
46 void InvalidateAllRegisters()
override;
49 GetExpeditedRegisters(ExpeditedRegs expType)
const override;
51 bool RegisterOffsetIsDynamic()
const override {
return true; }
56 Status WriteGPR()
override;
60 Status WriteFPR()
override;
62 void *GetGPRBuffer()
override {
return &m_gpr; }
64 void *GetFPRBuffer()
override {
return &m_fpr; }
66 size_t GetGPRSize()
const override {
return GetRegisterInfo().GetGPRSize(); }
68 size_t GetFPRSize()
override {
return GetRegisterInfo().GetFPRSize(); }
78 bool IsGPR(
unsigned reg)
const;
80 bool IsFPR(
unsigned reg)
const;
82 uint32_t CalculateFprOffset(
const RegisterInfo *reg_info)
const;
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP