LLDB
mainline
llvm-project
lldb
include
lldb
Host
HostProcess.h
Go to the documentation of this file.
1
//===-- HostProcess.h ------------------------------------------*- C++ -*-===//
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
#ifndef LLDB_HOST_HOSTPROCESS_H
10
#define LLDB_HOST_HOSTPROCESS_H
11
12
#include "
lldb/Host/Host.h
"
13
#include "
lldb/lldb-types.h
"
14
15
/// A class that represents a running process on the host machine.
16
///
17
/// HostProcess allows querying and manipulation of processes running on the
18
/// host machine. It is not intended to be represent a process which is being
19
/// debugged, although the native debug engine of a platform may likely back
20
/// inferior processes by a HostProcess.
21
///
22
/// HostProcess is implemented using static polymorphism so that on any given
23
/// platform, an instance of HostProcess will always be able to bind
24
/// statically to the concrete Process implementation for that platform. See
25
/// HostInfo for more details.
26
///
27
28
namespace
lldb_private
{
29
30
class
HostNativeProcessBase
;
31
class
HostThread
;
32
33
class
HostProcess
{
34
public
:
35
HostProcess
();
36
HostProcess
(
lldb::process_t
process);
37
~HostProcess
();
38
39
Status
Terminate
();
40
41
lldb::pid_t
GetProcessId
()
const
;
42
bool
IsRunning
()
const
;
43
44
llvm::Expected<HostThread>
45
StartMonitoring
(
const
Host::MonitorChildProcessCallback
&callback);
46
47
HostNativeProcessBase
&
GetNativeProcess
();
48
const
HostNativeProcessBase
&
GetNativeProcess
()
const
;
49
50
private
:
51
std::shared_ptr<HostNativeProcessBase>
m_native_process
;
52
};
53
}
54
55
#endif
Host.h
lldb_private::HostNativeProcessBase
Definition
HostNativeProcessBase.h:21
lldb_private::HostProcess::m_native_process
std::shared_ptr< HostNativeProcessBase > m_native_process
Definition
HostProcess.h:51
lldb_private::HostProcess::HostProcess
HostProcess()
Definition
HostProcess.cpp:16
lldb_private::HostProcess::GetNativeProcess
HostNativeProcessBase & GetNativeProcess()
Definition
HostProcess.cpp:36
lldb_private::HostProcess::Terminate
Status Terminate()
Definition
HostProcess.cpp:23
lldb_private::HostProcess::~HostProcess
~HostProcess()
lldb_private::HostProcess::GetProcessId
lldb::pid_t GetProcessId() const
Definition
HostProcess.cpp:25
lldb_private::HostProcess::IsRunning
bool IsRunning() const
Definition
HostProcess.cpp:29
lldb_private::HostProcess::StartMonitoring
llvm::Expected< HostThread > StartMonitoring(const Host::MonitorChildProcessCallback &callback)
Definition
HostProcess.cpp:31
lldb_private::HostThread
Definition
HostThread.h:29
lldb_private::Host::MonitorChildProcessCallback
std::function< void(lldb::pid_t pid, int signal, int status)> MonitorChildProcessCallback
Definition
Host.h:88
lldb_private::Status
An error handling class.
Definition
Status.h:118
lldb-types.h
lldb_private
A class that represents a running process on the host machine.
Definition
SBAddressRange.h:14
lldb::pid_t
uint64_t pid_t
Definition
lldb-types.h:83
lldb::process_t
uint64_t process_t
Definition
lldb-types.h:57
Generated on
for LLDB by
1.14.0