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 20 #include "Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.h" 21 #include "Plugins/Process/Utility/RegisterInfoPOSIX_arm.h" 22 23 #include <array> 24 25 namespace lldb_private { 26 namespace process_freebsd { 27 28 class NativeProcessFreeBSD; 29 30 class NativeRegisterContextFreeBSD_arm : public NativeRegisterContextFreeBSD { 31 public: 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 ®_value) override; 43 44 Status WriteRegister(const RegisterInfo *reg_info, 45 const RegisterValue ®_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 54 private: 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__) 69