brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · e73a6af Raw
67 lines · c
1//===-- NativeRegisterContextWindows_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-exception6//7//===----------------------------------------------------------------------===//8 9#if defined(__aarch64__) || defined(_M_ARM64)10#ifndef liblldb_NativeRegisterContextWindows_arm64_h_11#define liblldb_NativeRegisterContextWindows_arm64_h_12 13#include "Plugins/Process/Utility/NativeRegisterContextDBReg_arm64.h"14#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h"15#include "Plugins/Process/Utility/lldb-arm64-register-enums.h"16 17#include "NativeRegisterContextWindows.h"18 19namespace lldb_private {20 21class NativeThreadWindows;22 23class NativeRegisterContextWindows_arm6424    : public NativeRegisterContextWindows,25      public NativeRegisterContextDBReg_arm64 {26public:27  NativeRegisterContextWindows_arm64(const ArchSpec &target_arch,28                                     NativeThreadProtocol &native_thread);29 30  uint32_t GetRegisterSetCount() const override;31 32  const RegisterSet *GetRegisterSet(uint32_t set_index) const override;33 34  Status ReadRegister(const RegisterInfo *reg_info,35                      RegisterValue &reg_value) override;36 37  Status WriteRegister(const RegisterInfo *reg_info,38                       const RegisterValue &reg_value) override;39 40  Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;41 42  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;43 44protected:45  Status GPRRead(const uint32_t reg, RegisterValue &reg_value);46 47  Status GPRWrite(const uint32_t reg, const RegisterValue &reg_value);48 49  Status FPRRead(const uint32_t reg, RegisterValue &reg_value);50 51  Status FPRWrite(const uint32_t reg, const RegisterValue &reg_value);52 53private:54  bool IsGPR(uint32_t reg_index) const;55 56  bool IsFPR(uint32_t reg_index) const;57 58  llvm::Error ReadHardwareDebugInfo() override;59 60  llvm::Error WriteHardwareDebugRegs(DREGType hwbType) override;61};62 63} // namespace lldb_private64 65#endif // liblldb_NativeRegisterContextWindows_arm64_h_66#endif // defined(__aarch64__) || defined(_M_ARM64)67