10b57cec5SDimitry Andric //===-- NativeRegisterContextNetBSD.h ---------------------------*- C++ -*-===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andric #ifndef lldb_NativeRegisterContextNetBSD_h 100b57cec5SDimitry Andric #define lldb_NativeRegisterContextNetBSD_h 110b57cec5SDimitry Andric 120b57cec5SDimitry Andric #include "lldb/Host/common/NativeThreadProtocol.h" 130b57cec5SDimitry Andric 140b57cec5SDimitry Andric #include "Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h" 150b57cec5SDimitry Andric 160b57cec5SDimitry Andric namespace lldb_private { 170b57cec5SDimitry Andric namespace process_netbsd { 180b57cec5SDimitry Andric 19480093f4SDimitry Andric class NativeProcessNetBSD; 20480093f4SDimitry Andric 21*e8d8bef9SDimitry Andric class NativeRegisterContextNetBSD 22*e8d8bef9SDimitry Andric : public virtual NativeRegisterContextRegisterInfo { 230b57cec5SDimitry Andric public: 240b57cec5SDimitry Andric // This function is implemented in the NativeRegisterContextNetBSD_* 250b57cec5SDimitry Andric // subclasses to create a new instance of the host specific 260b57cec5SDimitry Andric // NativeRegisterContextNetBSD. The implementations can't collide as only one 270b57cec5SDimitry Andric // NativeRegisterContextNetBSD_* variant should be compiled into the final 280b57cec5SDimitry Andric // executable. 290b57cec5SDimitry Andric static NativeRegisterContextNetBSD * 300b57cec5SDimitry Andric CreateHostNativeRegisterContextNetBSD(const ArchSpec &target_arch, 310b57cec5SDimitry Andric NativeThreadProtocol &native_thread); 32*e8d8bef9SDimitry Andric virtual llvm::Error 33480093f4SDimitry Andric CopyHardwareWatchpointsFrom(NativeRegisterContextNetBSD &source) = 0; 34480093f4SDimitry Andric 350b57cec5SDimitry Andric protected: 360b57cec5SDimitry Andric Status DoRegisterSet(int req, void *buf); 370b57cec5SDimitry Andric virtual NativeProcessNetBSD &GetProcess(); 380b57cec5SDimitry Andric virtual ::pid_t GetProcessPid(); 390b57cec5SDimitry Andric }; 400b57cec5SDimitry Andric 410b57cec5SDimitry Andric } // namespace process_netbsd 420b57cec5SDimitry Andric } // namespace lldb_private 430b57cec5SDimitry Andric 440b57cec5SDimitry Andric #endif // #ifndef lldb_NativeRegisterContextNetBSD_h 45