LLDB  mainline
HostNativeProcessBase.h
Go to the documentation of this file.
1 //===-- HostNativeProcessBase.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_HOSTNATIVEPROCESSBASE_H
10 #define LLDB_HOST_HOSTNATIVEPROCESSBASE_H
11 
12 #include "lldb/Host/HostProcess.h"
13 #include "lldb/Utility/Status.h"
14 #include "lldb/lldb-defines.h"
15 #include "lldb/lldb-types.h"
16 
17 namespace lldb_private {
18 
19 class HostThread;
20 
23  const HostNativeProcessBase &
24  operator=(const HostNativeProcessBase &) = delete;
25 
26 public:
29  : m_process(process) {}
30  virtual ~HostNativeProcessBase() = default;
31 
32  virtual Status Terminate() = 0;
33  virtual Status GetMainModule(FileSpec &file_spec) const = 0;
34 
35  virtual lldb::pid_t GetProcessId() const = 0;
36  virtual bool IsRunning() const = 0;
37 
39 
40  virtual llvm::Expected<HostThread>
42  bool monitor_signals) = 0;
43 
44 protected:
46 };
47 }
48 
49 #endif
lldb_private::HostNativeProcessBase::HostNativeProcessBase
HostNativeProcessBase(lldb::process_t process)
Definition: HostNativeProcessBase.h:28
lldb_private::HostNativeProcessBase::HostNativeProcessBase
HostNativeProcessBase()
Definition: HostNativeProcessBase.h:27
lldb_private::Host::MonitorChildProcessCallback
std::function< bool(lldb::pid_t pid, bool exited, int signal, int status)> MonitorChildProcessCallback
Definition: Host.h:68
lldb-defines.h
HostProcess.h
lldb_private::HostNativeProcessBase::operator=
const HostNativeProcessBase & operator=(const HostNativeProcessBase &)=delete
lldb_private::HostNativeProcessBase::~HostNativeProcessBase
virtual ~HostNativeProcessBase()=default
lldb_private::FileSpec
Definition: FileSpec.h:56
lldb_private::HostNativeProcessBase::GetMainModule
virtual Status GetMainModule(FileSpec &file_spec) const =0
LLDB_INVALID_PROCESS
#define LLDB_INVALID_PROCESS
Definition: lldb-types.h:78
lldb_private::HostNativeProcessBase::IsRunning
virtual bool IsRunning() const =0
lldb_private::HostNativeProcessBase::StartMonitoring
virtual llvm::Expected< HostThread > StartMonitoring(const Host::MonitorChildProcessCallback &callback, bool monitor_signals)=0
lldb-types.h
lldb_private::Status
Definition: Status.h:44
lldb::pid_t
uint64_t pid_t
Definition: lldb-types.h:85
lldb_private::HostNativeProcessBase::GetProcessId
virtual lldb::pid_t GetProcessId() const =0
lldb::process_t
uint64_t process_t
Definition: lldb-types.h:57
Status.h
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::HostNativeProcessBase::Terminate
virtual Status Terminate()=0
lldb_private::HostNativeProcessBase::GetSystemHandle
lldb::process_t GetSystemHandle() const
Definition: HostNativeProcessBase.h:38
lldb_private::HostNativeProcessBase
Definition: HostNativeProcessBase.h:21
lldb_private::HostNativeProcessBase::m_process
lldb::process_t m_process
Definition: HostNativeProcessBase.h:45