LLDB
mainline
llvm-project
lldb
source
Host
common
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
9
#include "
lldb/Host/HostProcess.h
"
10
#include "
lldb/Host/HostNativeProcess.h
"
11
#include "
lldb/Host/HostThread.h
"
12
13
using namespace
lldb
;
14
using namespace
lldb_private
;
15
16
HostProcess::HostProcess() : m_native_process(new
HostNativeProcess
) {}
17
18
HostProcess::HostProcess
(
lldb::process_t
process)
19
: m_native_process(new
HostNativeProcess
(process)) {}
20
21
HostProcess::~HostProcess
() =
default
;
22
23
Status
HostProcess::Terminate
() {
return
m_native_process
->Terminate(); }
24
25
lldb::pid_t
HostProcess::GetProcessId
()
const
{
26
return
m_native_process
->GetProcessId();
27
}
28
29
bool
HostProcess::IsRunning
()
const
{
return
m_native_process
->IsRunning(); }
30
31
llvm::Expected<HostThread>
HostProcess::StartMonitoring
(
32
const
Host::MonitorChildProcessCallback
&callback) {
33
return
m_native_process
->StartMonitoring(callback);
34
}
35
36
HostNativeProcessBase
&
HostProcess::GetNativeProcess
() {
37
return
*
m_native_process
;
38
}
39
40
const
HostNativeProcessBase
&
HostProcess::GetNativeProcess
()
const
{
41
return
*
m_native_process
;
42
}
lldb_private::HostProcess::IsRunning
bool IsRunning() const
Definition:
HostProcess.cpp:29
HostProcess.h
HostNativeProcess.h
lldb_private::Host::MonitorChildProcessCallback
std::function< void(lldb::pid_t pid, int signal, int status)> MonitorChildProcessCallback
Definition:
Host.h:68
HostThread.h
lldb_private::HostProcess::StartMonitoring
llvm::Expected< HostThread > StartMonitoring(const Host::MonitorChildProcessCallback &callback)
Definition:
HostProcess.cpp:31
lldb_private::HostProcess::GetProcessId
lldb::pid_t GetProcessId() const
Definition:
HostProcess.cpp:25
lldb_private::HostProcess::GetNativeProcess
HostNativeProcessBase & GetNativeProcess()
Definition:
HostProcess.cpp:36
lldb_private::HostProcessPosix
Definition:
HostProcessPosix.h:20
lldb_private::HostProcess::m_native_process
std::shared_ptr< HostNativeProcessBase > m_native_process
Definition:
HostProcess.h:51
lldb_private::Status
Definition:
Status.h:44
lldb::pid_t
uint64_t pid_t
Definition:
lldb-types.h:85
lldb::process_t
uint64_t process_t
Definition:
lldb-types.h:57
lldb_private
A class that represents a running process on the host machine.
Definition:
SBCommandInterpreterRunOptions.h:16
lldb_private::HostProcess::~HostProcess
~HostProcess()
lldb
Definition:
SBAddress.h:15
lldb_private::HostProcess::HostProcess
HostProcess()
Definition:
HostProcess.cpp:16
lldb_private::HostNativeProcessBase
Definition:
HostNativeProcessBase.h:21
lldb_private::HostProcess::Terminate
Status Terminate()
Definition:
HostProcess.cpp:23
Generated on Mon May 16 2022 21:40:47 for LLDB by
1.8.17