1 //===-- HostProcess.cpp -----------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #include "lldb/Host/HostProcess.h" 11 #include "lldb/Host/HostNativeProcess.h" 12 #include "lldb/Host/HostThread.h" 13 14 using namespace lldb; 15 using namespace lldb_private; 16 HostProcess()17HostProcess::HostProcess() : m_native_process(new HostNativeProcess) {} 18 HostProcess(lldb::process_t process)19HostProcess::HostProcess(lldb::process_t process) 20 : m_native_process(new HostNativeProcess(process)) {} 21 ~HostProcess()22HostProcess::~HostProcess() {} 23 Terminate()24Status HostProcess::Terminate() { return m_native_process->Terminate(); } 25 GetMainModule(FileSpec & file_spec) const26Status HostProcess::GetMainModule(FileSpec &file_spec) const { 27 return m_native_process->GetMainModule(file_spec); 28 } 29 GetProcessId() const30lldb::pid_t HostProcess::GetProcessId() const { 31 return m_native_process->GetProcessId(); 32 } 33 IsRunning() const34bool HostProcess::IsRunning() const { return m_native_process->IsRunning(); } 35 36 HostThread StartMonitoring(const Host::MonitorChildProcessCallback & callback,bool monitor_signals)37HostProcess::StartMonitoring(const Host::MonitorChildProcessCallback &callback, 38 bool monitor_signals) { 39 return m_native_process->StartMonitoring(callback, monitor_signals); 40 } 41 GetNativeProcess()42HostNativeProcessBase &HostProcess::GetNativeProcess() { 43 return *m_native_process; 44 } 45 GetNativeProcess() const46const HostNativeProcessBase &HostProcess::GetNativeProcess() const { 47 return *m_native_process; 48 } 49