LLDB  mainline
NativeRegisterContextNetBSD.cpp
Go to the documentation of this file.
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 
10 
12 
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 
24  NativeThreadProtocol &native_thread,
25  RegisterInfoInterface *reg_info_interface_p)
26  : NativeRegisterContextRegisterInfo(native_thread,
27  reg_info_interface_p) {}
28 
30  return NativeProcessNetBSD::PtraceWrapper(ptrace_req, GetProcessPid(), buf,
31  m_thread.GetID());
32 }
33 
35  return static_cast<NativeProcessNetBSD &>(m_thread.GetProcess());
36 }
37 
39  return GetProcess().GetID();
40 }
A class that represents a running process on the host machine.
RegisterInfo interface to patch RegisterInfo structure for archs.
static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr=nullptr, int data=0, int *result=nullptr)
NativeProcessProtocol & GetProcess()
Manages communication with the inferior (debugee) process.
NativeRegisterContextNetBSD(NativeThreadProtocol &native_thread, RegisterInfoInterface *reg_info_interface_p)
uint64_t pid_t
Definition: lldb-types.h:85
An error handling class.
Definition: Status.h:44