1 //===-- NativeRegisterContextFreeBSD_powerpc.h ------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #if defined(__powerpc__)
11 #ifndef lldb_NativeRegisterContextFreeBSD_powerpc_h
12 #define lldb_NativeRegisterContextFreeBSD_powerpc_h
15 #include <sys/types.h>
16 #include <machine/reg.h>
19 #include "Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.h"
20 #include "Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h"
25 namespace lldb_private
{
26 namespace process_freebsd
{
28 class NativeProcessFreeBSD
;
30 class NativeRegisterContextFreeBSD_powerpc
31 : public NativeRegisterContextFreeBSD
{
33 NativeRegisterContextFreeBSD_powerpc(const ArchSpec
&target_arch
,
34 NativeThreadFreeBSD
&native_thread
);
36 uint32_t GetRegisterSetCount() const override
;
38 uint32_t GetUserRegisterCount() const override
;
40 const RegisterSet
*GetRegisterSet(uint32_t set_index
) const override
;
42 Status
ReadRegister(const RegisterInfo
*reg_info
,
43 RegisterValue
®_value
) override
;
45 Status
WriteRegister(const RegisterInfo
*reg_info
,
46 const RegisterValue
®_value
) override
;
48 Status
ReadAllRegisterValues(lldb::WritableDataBufferSP
&data_sp
) override
;
50 Status
WriteAllRegisterValues(const lldb::DataBufferSP
&data_sp
) override
;
53 CopyHardwareWatchpointsFrom(NativeRegisterContextFreeBSD
&source
) override
;
60 std::array
<uint8_t, sizeof(reg
) + sizeof(fpreg
)> m_reg_data
;
62 std::optional
<RegSetKind
> GetSetForNativeRegNum(uint32_t reg_num
) const;
64 Status
ReadRegisterSet(RegSetKind set
);
65 Status
WriteRegisterSet(RegSetKind set
);
67 RegisterContextFreeBSD_powerpc
&GetRegisterInfo() const;
70 } // namespace process_freebsd
71 } // namespace lldb_private
73 #endif // #ifndef lldb_NativeRegisterContextFreeBSD_powerpc_h
75 #endif // defined (__powerpc__)