Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / source / Plugins / Process / FreeBSD / NativeRegisterContextFreeBSD_arm.h
blob89ffa617294aa6c10a90d78f108210c63258a134
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 //===----------------------------------------------------------------------===//
9 #if defined(__arm__)
11 #ifndef lldb_NativeRegisterContextFreeBSD_arm_h
12 #define lldb_NativeRegisterContextFreeBSD_arm_h
14 // clang-format off
15 #include <sys/types.h>
16 #include <machine/reg.h>
17 #include <machine/vfp.h>
18 // clang-format on
20 #include "Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.h"
21 #include "Plugins/Process/Utility/RegisterInfoPOSIX_arm.h"
23 #include <array>
25 namespace lldb_private {
26 namespace process_freebsd {
28 class NativeProcessFreeBSD;
30 class NativeRegisterContextFreeBSD_arm : public NativeRegisterContextFreeBSD {
31 public:
32 NativeRegisterContextFreeBSD_arm(const ArchSpec &target_arch,
33 NativeThreadProtocol &native_thread);
35 uint32_t GetRegisterSetCount() const override;
37 uint32_t GetUserRegisterCount() const override;
39 const RegisterSet *GetRegisterSet(uint32_t set_index) const override;
41 Status ReadRegister(const RegisterInfo *reg_info,
42 RegisterValue &reg_value) override;
44 Status WriteRegister(const RegisterInfo *reg_info,
45 const RegisterValue &reg_value) override;
47 Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
49 Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
51 llvm::Error
52 CopyHardwareWatchpointsFrom(NativeRegisterContextFreeBSD &source) override;
54 private:
55 std::array<uint8_t, sizeof(reg) + sizeof(vfp_state)> m_reg_data;
57 Status ReadRegisterSet(uint32_t set);
58 Status WriteRegisterSet(uint32_t set);
60 RegisterInfoPOSIX_arm &GetRegisterInfo() const;
63 } // namespace process_freebsd
64 } // namespace lldb_private
66 #endif // #ifndef lldb_NativeRegisterContextFreeBSD_arm_h
68 #endif // defined (__arm__)