LLDB mainline
HostProcess.cpp
Go to the documentation of this file.
1//===-- HostProcess.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
12
13using namespace lldb;
14using namespace lldb_private;
15
16HostProcess::HostProcess() : m_native_process(new HostNativeProcess) {}
17
19 : m_native_process(new HostNativeProcess(process)) {}
20
22
24
26 return m_native_process->GetProcessId();
27}
28
29bool HostProcess::IsRunning() const { return m_native_process->IsRunning(); }
30
31llvm::Expected<HostThread> HostProcess::StartMonitoring(
32 const Host::MonitorChildProcessCallback &callback) {
33 return m_native_process->StartMonitoring(callback);
34}
35
37 return *m_native_process;
38}
39
41 return *m_native_process;
42}
std::shared_ptr< HostNativeProcessBase > m_native_process
Definition: HostProcess.h:51
HostNativeProcessBase & GetNativeProcess()
Definition: HostProcess.cpp:36
lldb::pid_t GetProcessId() const
Definition: HostProcess.cpp:25
llvm::Expected< HostThread > StartMonitoring(const Host::MonitorChildProcessCallback &callback)
Definition: HostProcess.cpp:31
std::function< void(lldb::pid_t pid, int signal, int status)> MonitorChildProcessCallback
Definition: Host.h:69
An error handling class.
Definition: Status.h:44
A class that represents a running process on the host machine.
Definition: SBAddress.h:15
uint64_t pid_t
Definition: lldb-types.h:85
uint64_t process_t
Definition: lldb-types.h:57