LLDB mainline
NativeRegisterContextFreeBSD_arm.h
Go to the documentation of this file.
1//===-- NativeRegisterContextFreeBSD_arm.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(__arm__)
10
11#ifndef lldb_NativeRegisterContextFreeBSD_arm_h
12#define lldb_NativeRegisterContextFreeBSD_arm_h
13
14// clang-format off
15#include <sys/types.h>
16#include <machine/reg.h>
17#include <machine/vfp.h>
18// clang-format on
19
22
23#include <array>
24
25namespace lldb_private {
26namespace process_freebsd {
27
28class NativeProcessFreeBSD;
29
30class NativeRegisterContextFreeBSD_arm : public NativeRegisterContextFreeBSD {
31public:
32 NativeRegisterContextFreeBSD_arm(const ArchSpec &target_arch,
33 NativeThreadProtocol &native_thread);
34
35 uint32_t GetRegisterSetCount() const override;
36
37 uint32_t GetUserRegisterCount() const override;
38
39 const RegisterSet *GetRegisterSet(uint32_t set_index) const override;
40
41 Status ReadRegister(const RegisterInfo *reg_info,
42 RegisterValue &reg_value) override;
43
44 Status WriteRegister(const RegisterInfo *reg_info,
45 const RegisterValue &reg_value) override;
46
47 Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
48
49 Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
50
51 llvm::Error
52 CopyHardwareWatchpointsFrom(NativeRegisterContextFreeBSD &source) override;
53
54private:
55 std::array<uint8_t, sizeof(reg) + sizeof(vfp_state)> m_reg_data;
56
57 Status ReadRegisterSet(uint32_t set);
58 Status WriteRegisterSet(uint32_t set);
59
60 RegisterInfoPOSIX_arm &GetRegisterInfo() const;
61};
62
63} // namespace process_freebsd
64} // namespace lldb_private
65
66#endif // #ifndef lldb_NativeRegisterContextFreeBSD_arm_h
67
68#endif // defined (__arm__)
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
Definition: lldb-forward.h:331
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP
Definition: lldb-forward.h:332