Path: blob/main/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_powerpc.h
96380 views
//===-- NativeRegisterContextFreeBSD_powerpc.h ------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#if defined(__powerpc__)910#ifndef lldb_NativeRegisterContextFreeBSD_powerpc_h11#define lldb_NativeRegisterContextFreeBSD_powerpc_h1213// clang-format off14#include <sys/types.h>15#include <machine/reg.h>16// clang-format on1718#include "Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.h"19#include "Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h"2021#include <array>22#include <optional>2324namespace lldb_private {25namespace process_freebsd {2627class NativeProcessFreeBSD;2829class NativeRegisterContextFreeBSD_powerpc30: public NativeRegisterContextFreeBSD {31public:32NativeRegisterContextFreeBSD_powerpc(const ArchSpec &target_arch,33NativeThreadFreeBSD &native_thread);3435uint32_t GetRegisterSetCount() const override;3637uint32_t GetUserRegisterCount() const override;3839const RegisterSet *GetRegisterSet(uint32_t set_index) const override;4041Status ReadRegister(const RegisterInfo *reg_info,42RegisterValue ®_value) override;4344Status WriteRegister(const RegisterInfo *reg_info,45const RegisterValue ®_value) override;4647Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;4849Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;5051llvm::Error52CopyHardwareWatchpointsFrom(NativeRegisterContextFreeBSD &source) override;5354private:55enum RegSetKind {56GPRegSet,57FPRegSet,58};59std::array<uint8_t, sizeof(reg) + sizeof(fpreg)> m_reg_data;6061std::optional<RegSetKind> GetSetForNativeRegNum(uint32_t reg_num) const;6263Status ReadRegisterSet(RegSetKind set);64Status WriteRegisterSet(RegSetKind set);6566RegisterContextFreeBSD_powerpc &GetRegisterInfo() const;67};6869} // namespace process_freebsd70} // namespace lldb_private7172#endif // #ifndef lldb_NativeRegisterContextFreeBSD_powerpc_h7374#endif // defined (__powerpc__)757677