brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 286b4fd Raw
76 lines · c
1//===-- NativeRegisterContextFreeBSD_mips64.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(__mips64__)10 11#ifndef lldb_NativeRegisterContextFreeBSD_mips64_h12#define lldb_NativeRegisterContextFreeBSD_mips64_h13 14// clang-format off15#include <sys/types.h>16#include <machine/reg.h>17// clang-format on18 19#include "Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.h"20#include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h"21 22#include <array>23#include <optional>24 25namespace lldb_private {26namespace process_freebsd {27 28class NativeProcessFreeBSD;29 30class NativeRegisterContextFreeBSD_mips6431    : public NativeRegisterContextFreeBSD {32public:33  NativeRegisterContextFreeBSD_mips64(const ArchSpec &target_arch,34                                      NativeThreadFreeBSD &native_thread);35 36  uint32_t GetRegisterSetCount() const override;37 38  uint32_t GetUserRegisterCount() const override;39 40  const RegisterSet *GetRegisterSet(uint32_t set_index) const override;41 42  Status ReadRegister(const RegisterInfo *reg_info,43                      RegisterValue &reg_value) override;44 45  Status WriteRegister(const RegisterInfo *reg_info,46                       const RegisterValue &reg_value) override;47 48  Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;49 50  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;51 52  llvm::Error53  CopyHardwareWatchpointsFrom(NativeRegisterContextFreeBSD &source) override;54 55private:56  enum RegSetKind {57    GPRegSet,58    FPRegSet,59  };60  std::array<uint8_t, sizeof(reg) + sizeof(fpreg)> m_reg_data;61 62  std::optional<RegSetKind> GetSetForNativeRegNum(uint32_t reg_num) const;63 64  Status ReadRegisterSet(RegSetKind set);65  Status WriteRegisterSet(RegSetKind set);66 67  RegisterContextFreeBSD_mips64 &GetRegisterInfo() const;68};69 70} // namespace process_freebsd71} // namespace lldb_private72 73#endif // #ifndef lldb_NativeRegisterContextFreeBSD_mips64_h74 75#endif // defined (__mips64__)76