1 //===-- NativeRegisterContextFreeBSD.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 "NativeRegisterContextFreeBSD.h" 10 11 #include "Plugins/Process/FreeBSD/NativeProcessFreeBSD.h" 12 13 #include "lldb/Host/common/NativeProcessProtocol.h" 14 15 using namespace lldb_private; 16 using namespace lldb_private::process_freebsd; 17 18 // clang-format off 19 #include <sys/types.h> 20 #include <sys/ptrace.h> 21 // clang-format on 22 23 NativeProcessFreeBSD &NativeRegisterContextFreeBSD::GetProcess() { 24 return static_cast<NativeProcessFreeBSD &>(m_thread.GetProcess()); 25 } 26 27 ::pid_t NativeRegisterContextFreeBSD::GetProcessPid() { 28 return GetProcess().GetID(); 29 } 30