Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / source / Plugins / Process / NetBSD / NativeRegisterContextNetBSD.cpp
blob4755dab0b073ab038c2961fac1c1d82ac42839d4
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 //===----------------------------------------------------------------------===//
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;
18 // clang-format off
19 #include <sys/types.h>
20 #include <sys/ptrace.h>
21 // clang-format on
23 Status NativeRegisterContextNetBSD::DoRegisterSet(int ptrace_req, void *buf) {
24 return NativeProcessNetBSD::PtraceWrapper(ptrace_req, GetProcessPid(), buf,
25 m_thread.GetID());
28 NativeProcessNetBSD &NativeRegisterContextNetBSD::GetProcess() {
29 return static_cast<NativeProcessNetBSD &>(m_thread.GetProcess());
32 ::pid_t NativeRegisterContextNetBSD::GetProcessPid() {
33 return GetProcess().GetID();