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 
13 using namespace lldb;
14 using namespace lldb_private;
15 
16 HostProcess::HostProcess()
17     : m_native_process(new HostNativeProcess)
18 {
19 }
20 
21 HostProcess::HostProcess(lldb::process_t process)
22     : m_native_process(new HostNativeProcess(process))
23 {
24 }
25 
26 Error HostProcess::Terminate()
27 {
28     return m_native_process->Terminate();
29 }
30 
31 Error HostProcess::GetMainModule(FileSpec &file_spec) const
32 {
33     return m_native_process->GetMainModule(file_spec);
34 }
35 
36 lldb::pid_t HostProcess::GetProcessId() const
37 {
38     return m_native_process->GetProcessId();
39 }
40 
41 bool HostProcess::IsRunning() const
42 {
43     return m_native_process->IsRunning();
44 }
45 
46 HostNativeProcessBase &HostProcess::GetNativeProcess()
47 {
48     return *m_native_process;
49 }
50 
51 const HostNativeProcessBase &HostProcess::GetNativeProcess() const
52 {
53     return *m_native_process;
54 }
55