xref: /openbsd-src/gnu/llvm/lldb/source/Plugins/Process/OpenBSDKernel/RegisterContextOpenBSDKernel_x86_64.h (revision 513cf72f82c16dd38f89b0e7a0ec4a163d87f81f)
1*513cf72fSasou //===-- RegisterContextOpenBSDKernel_x86_64.h -------------------*- C++ -*-===//
2*513cf72fSasou //
3*513cf72fSasou // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*513cf72fSasou // See https://llvm.org/LICENSE.txt for license information.
5*513cf72fSasou // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*513cf72fSasou //
7*513cf72fSasou //===----------------------------------------------------------------------===//
8*513cf72fSasou 
9*513cf72fSasou #ifndef LLDB_SOURCE_PLUGINS_PROCESS_OPENBSDKERNEL_REGISTERCONTEXTOPENBSDKERNEL_X86_64_H
10*513cf72fSasou #define LLDB_SOURCE_PLUGINS_PROCESS_OPENBSDKERNEL_REGISTERCONTEXTOPENBSDKERNEL_X86_64_H
11*513cf72fSasou 
12*513cf72fSasou #include "Plugins/Process/Utility/RegisterContextPOSIX_x86.h"
13*513cf72fSasou #include "Plugins/Process/elf-core/RegisterUtilities.h"
14*513cf72fSasou 
15*513cf72fSasou class RegisterContextOpenBSDKernel_x86_64 : public RegisterContextPOSIX_x86 {
16*513cf72fSasou public:
17*513cf72fSasou   RegisterContextOpenBSDKernel_x86_64(
18*513cf72fSasou       lldb_private::Thread &thread,
19*513cf72fSasou       lldb_private::RegisterInfoInterface *register_info,
20*513cf72fSasou       lldb::addr_t pcb);
21*513cf72fSasou 
22*513cf72fSasou   bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
23*513cf72fSasou 		    lldb_private::RegisterValue &value) override;
24*513cf72fSasou 
25*513cf72fSasou   bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
26*513cf72fSasou 		     const lldb_private::RegisterValue &value) override;
27*513cf72fSasou 
28*513cf72fSasou protected:
29*513cf72fSasou   bool ReadGPR() override;
30*513cf72fSasou 
31*513cf72fSasou   bool ReadFPR() override;
32*513cf72fSasou 
33*513cf72fSasou   bool WriteGPR() override;
34*513cf72fSasou 
35*513cf72fSasou   bool WriteFPR() override;
36*513cf72fSasou 
37*513cf72fSasou private:
38*513cf72fSasou   lldb::addr_t m_pcb_addr;
39*513cf72fSasou };
40*513cf72fSasou 
41*513cf72fSasou #endif // LLDB_SOURCE_PLUGINS_PROCESS_OPENBSDKERNEL_REGISTERCONTEXTOPENBSDKERNEL_X86_64_H
42