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/HostNativeProcess.h" 11 #include "lldb/Host/HostProcess.h" 12 #include "lldb/Host/HostThread.h" 13 14 using namespace lldb; 15 using namespace lldb_private; 16 17 HostProcess::HostProcess() 18 : m_native_process(new HostNativeProcess) 19 { 20 } 21 22 HostProcess::HostProcess(lldb::process_t process) 23 : m_native_process(new HostNativeProcess(process)) 24 { 25 } 26 27 HostProcess::~HostProcess() 28 { 29 } 30 31 Error HostProcess::Terminate() 32 { 33 return m_native_process->Terminate(); 34 } 35 36 Error HostProcess::GetMainModule(FileSpec &file_spec) const 37 { 38 return m_native_process->GetMainModule(file_spec); 39 } 40 41 lldb::pid_t HostProcess::GetProcessId() const 42 { 43 return m_native_process->GetProcessId(); 44 } 45 46 bool HostProcess::IsRunning() const 47 { 48 return m_native_process->IsRunning(); 49 } 50 51 HostThread 52 HostProcess::StartMonitoring(HostProcess::MonitorCallback callback, void *callback_baton, bool monitor_signals) 53 { 54 return m_native_process->StartMonitoring(callback, callback_baton, monitor_signals); 55 } 56 57 HostNativeProcessBase &HostProcess::GetNativeProcess() 58 { 59 return *m_native_process; 60 } 61 62 const HostNativeProcessBase &HostProcess::GetNativeProcess() const 63 { 64 return *m_native_process; 65 } 66