1 //===-- HostProcess.h ------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef lldb_Host_HostProcess_h_
11 #define lldb_Host_HostProcess_h_
13 #include "lldb/Host/Host.h"
14 #include "lldb/lldb-types.h"
16 //----------------------------------------------------------------------
17 /// @class HostInfo HostInfo.h "lldb/Host/HostProcess.h"
18 /// @brief A class that represents a running process on the host machine.
20 /// HostProcess allows querying and manipulation of processes running on the
21 /// host machine. It is not intended to be represent a process which is
22 /// being debugged, although the native debug engine of a platform may likely
23 /// back inferior processes by a HostProcess.
25 /// HostProcess is implemented using static polymorphism so that on any given
26 /// platform, an instance of HostProcess will always be able to bind statically
27 /// to the concrete Process implementation for that platform. See HostInfo
30 //----------------------------------------------------------------------
32 namespace lldb_private {
34 class HostNativeProcessBase;
40 HostProcess(lldb::process_t process);
44 Status GetMainModule(FileSpec &file_spec) const;
46 lldb::pid_t GetProcessId() const;
47 bool IsRunning() const;
49 HostThread StartMonitoring(const Host::MonitorChildProcessCallback &callback,
50 bool monitor_signals);
52 HostNativeProcessBase &GetNativeProcess();
53 const HostNativeProcessBase &GetNativeProcess() const;
56 std::shared_ptr<HostNativeProcessBase> m_native_process;