9#if defined(__loongarch__) && __loongarch_grlen == 64
11#ifndef lldb_NativeRegisterContextLinux_loongarch64_h
12#define lldb_NativeRegisterContextLinux_loongarch64_h
18#include <asm/ptrace.h>
21namespace process_linux {
23class NativeProcessLinux;
25class NativeRegisterContextLinux_loongarch64
26 :
public NativeRegisterContextLinux,
27 public NativeRegisterContextDBReg_loongarch {
29 NativeRegisterContextLinux_loongarch64(
30 const ArchSpec &target_arch, NativeThreadProtocol &native_thread,
31 std::unique_ptr<RegisterInfoPOSIX_loongarch64> register_info_up);
33 uint32_t GetRegisterSetCount()
const override;
35 uint32_t GetUserRegisterCount()
const override;
37 const RegisterSet *GetRegisterSet(uint32_t set_index)
const override;
39 Status ReadRegister(
const RegisterInfo *reg_info,
40 RegisterValue ®_value)
override;
42 Status WriteRegister(
const RegisterInfo *reg_info,
43 const RegisterValue ®_value)
override;
49 void InvalidateAllRegisters()
override;
52 GetExpeditedRegisters(ExpeditedRegs expType)
const override;
54 bool RegisterOffsetIsDynamic()
const override {
return true; }
59 Status WriteGPR()
override;
63 Status WriteFPR()
override;
65 void *GetGPRBuffer()
override {
return &m_gpr; }
67 void *GetFPRBuffer()
override {
return &m_fpr; }
69 size_t GetGPRSize()
const override {
return GetRegisterInfo().GetGPRSize(); }
71 size_t GetFPRSize()
override {
return GetRegisterInfo().GetFPRSize(); }
76 bool m_refresh_hwdebug_info;
82 bool IsGPR(
unsigned reg)
const;
84 bool IsFPR(
unsigned reg)
const;
86 uint32_t CalculateFprOffset(
const RegisterInfo *reg_info)
const;
90 llvm::Error ReadHardwareDebugInfo()
override;
92 llvm::Error WriteHardwareDebugRegs(DREGType hwbType)
override;
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