1 //===-- NativeRegisterContextNetBSD.cpp -----------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 #include "NativeRegisterContextNetBSD.h"
11 #include "Plugins/Process/NetBSD/NativeProcessNetBSD.h"
13 #include "lldb/Host/common/NativeProcessProtocol.h"
15 using namespace lldb_private
;
16 using namespace lldb_private::process_netbsd
;
19 #include <sys/types.h>
20 #include <sys/ptrace.h>
23 Status
NativeRegisterContextNetBSD::DoRegisterSet(int ptrace_req
, void *buf
) {
24 return NativeProcessNetBSD::PtraceWrapper(ptrace_req
, GetProcessPid(), buf
,
28 NativeProcessNetBSD
&NativeRegisterContextNetBSD::GetProcess() {
29 return static_cast<NativeProcessNetBSD
&>(m_thread
.GetProcess());
32 ::pid_t
NativeRegisterContextNetBSD::GetProcessPid() {
33 return GetProcess().GetID();