1 //===-- NativeRegisterContextNetBSD.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 #ifndef lldb_NativeRegisterContextNetBSD_h 10 #define lldb_NativeRegisterContextNetBSD_h 11 12 #include "lldb/Host/common/NativeThreadProtocol.h" 13 14 #include "Plugins/Process/NetBSD/NativeProcessNetBSD.h" 15 #include "Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h" 16 17 namespace lldb_private { 18 namespace process_netbsd { 19 20 class NativeRegisterContextNetBSD : public NativeRegisterContextRegisterInfo { 21 public: 22 NativeRegisterContextNetBSD(NativeThreadProtocol &native_thread, 23 RegisterInfoInterface *reg_info_interface_p); 24 25 // This function is implemented in the NativeRegisterContextNetBSD_* 26 // subclasses to create a new instance of the host specific 27 // NativeRegisterContextNetBSD. The implementations can't collide as only one 28 // NativeRegisterContextNetBSD_* variant should be compiled into the final 29 // executable. 30 static NativeRegisterContextNetBSD * 31 CreateHostNativeRegisterContextNetBSD(const ArchSpec &target_arch, 32 NativeThreadProtocol &native_thread); 33 34 protected: 35 Status DoRegisterSet(int req, void *buf); 36 virtual NativeProcessNetBSD &GetProcess(); 37 virtual ::pid_t GetProcessPid(); 38 }; 39 40 } // namespace process_netbsd 41 } // namespace lldb_private 42 43 #endif // #ifndef lldb_NativeRegisterContextNetBSD_h 44