1cfca06d7SDimitry Andric //===-- NativeRegisterContextNetBSD.cpp -----------------------------------===// 274a628f7SDimitry Andric // 35f29bb8aSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 45f29bb8aSDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 55f29bb8aSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 674a628f7SDimitry Andric // 774a628f7SDimitry Andric //===----------------------------------------------------------------------===// 874a628f7SDimitry Andric 974a628f7SDimitry Andric #include "NativeRegisterContextNetBSD.h" 1074a628f7SDimitry Andric 11706b4fc4SDimitry Andric #include "Plugins/Process/NetBSD/NativeProcessNetBSD.h" 12706b4fc4SDimitry Andric 1374a628f7SDimitry Andric #include "lldb/Host/common/NativeProcessProtocol.h" 1474a628f7SDimitry Andric 1574a628f7SDimitry Andric using namespace lldb_private; 1674a628f7SDimitry Andric using namespace lldb_private::process_netbsd; 1774a628f7SDimitry Andric 1874a628f7SDimitry Andric // clang-format off 1974a628f7SDimitry Andric #include <sys/types.h> 2074a628f7SDimitry Andric #include <sys/ptrace.h> 2174a628f7SDimitry Andric // clang-format on 2274a628f7SDimitry Andric DoRegisterSet(int ptrace_req,void * buf)235f29bb8aSDimitry AndricStatus NativeRegisterContextNetBSD::DoRegisterSet(int ptrace_req, void *buf) { 245f29bb8aSDimitry Andric return NativeProcessNetBSD::PtraceWrapper(ptrace_req, GetProcessPid(), buf, 25d44a35e8SDimitry Andric m_thread.GetID()); 26d44a35e8SDimitry Andric } 27d44a35e8SDimitry Andric GetProcess()2874a628f7SDimitry AndricNativeProcessNetBSD &NativeRegisterContextNetBSD::GetProcess() { 29a884e649SDimitry Andric return static_cast<NativeProcessNetBSD &>(m_thread.GetProcess()); 3074a628f7SDimitry Andric } 3174a628f7SDimitry Andric GetProcessPid()3274a628f7SDimitry Andric::pid_t NativeRegisterContextNetBSD::GetProcessPid() { 33a884e649SDimitry Andric return GetProcess().GetID(); 3474a628f7SDimitry Andric } 35