1 //===-- NativeRegisterContextNetBSD.cpp -----------------------------------===// 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 #include "NativeRegisterContextNetBSD.h" 10 11 #include "Plugins/Process/NetBSD/NativeProcessNetBSD.h" 12 13 #include "lldb/Host/common/NativeProcessProtocol.h" 14 15 using namespace lldb_private; 16 using namespace lldb_private::process_netbsd; 17 18 // clang-format off 19 #include <sys/types.h> 20 #include <sys/ptrace.h> 21 // clang-format on 22 23 Status NativeRegisterContextNetBSD::DoRegisterSet(int ptrace_req, void *buf) { 24 return NativeProcessNetBSD::PtraceWrapper(ptrace_req, GetProcessPid(), buf, 25 m_thread.GetID()); 26 } 27 28 NativeProcessNetBSD &NativeRegisterContextNetBSD::GetProcess() { 29 return static_cast<NativeProcessNetBSD &>(m_thread.GetProcess()); 30 } 31 32 ::pid_t NativeRegisterContextNetBSD::GetProcessPid() { 33 return GetProcess().GetID(); 34 } 35