1*be691f3bSpatrick //===-- NativeRegisterContextFreeBSD.cpp ----------------------------------===// 2*be691f3bSpatrick // 3*be691f3bSpatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*be691f3bSpatrick // See https://llvm.org/LICENSE.txt for license information. 5*be691f3bSpatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*be691f3bSpatrick // 7*be691f3bSpatrick //===----------------------------------------------------------------------===// 8*be691f3bSpatrick 9*be691f3bSpatrick #include "NativeRegisterContextFreeBSD.h" 10*be691f3bSpatrick 11*be691f3bSpatrick #include "Plugins/Process/FreeBSD/NativeProcessFreeBSD.h" 12*be691f3bSpatrick 13*be691f3bSpatrick #include "lldb/Host/common/NativeProcessProtocol.h" 14*be691f3bSpatrick 15*be691f3bSpatrick using namespace lldb_private; 16*be691f3bSpatrick using namespace lldb_private::process_freebsd; 17*be691f3bSpatrick 18*be691f3bSpatrick // clang-format off 19*be691f3bSpatrick #include <sys/types.h> 20*be691f3bSpatrick #include <sys/ptrace.h> 21*be691f3bSpatrick // clang-format on 22*be691f3bSpatrick GetProcess()23*be691f3bSpatrickNativeProcessFreeBSD &NativeRegisterContextFreeBSD::GetProcess() { 24*be691f3bSpatrick return static_cast<NativeProcessFreeBSD &>(m_thread.GetProcess()); 25*be691f3bSpatrick } 26*be691f3bSpatrick GetProcessPid()27*be691f3bSpatrick::pid_t NativeRegisterContextFreeBSD::GetProcessPid() { 28*be691f3bSpatrick return GetProcess().GetID(); 29*be691f3bSpatrick } 30