LLDB mainline
NativeRegisterContextWindows_arm64.h
Go to the documentation of this file.
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-exception
6//
7//===----------------------------------------------------------------------===//
8
9#if defined(__aarch64__) || defined(_M_ARM64)
10#ifndef liblldb_NativeRegisterContextWindows_arm64_h_
11#define liblldb_NativeRegisterContextWindows_arm64_h_
12
16
18
19namespace lldb_private {
20
22
23class NativeRegisterContextWindows_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_private
64
65#endif // liblldb_NativeRegisterContextWindows_arm64_h_
66#endif // defined(__aarch64__) || defined(_M_ARM64)
Status WriteHardwareDebugRegs(int hwbType, ::pid_t tid, uint32_t max_supported, const std::array< NativeRegisterContextDBReg::DREG, 16 > &regs)
Status ReadHardwareDebugInfo(::pid_t tid, uint32_t &max_hwp_supported, uint32_t &max_hbp_supported)
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