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 HostProcess::~HostProcess()
27 {
28 }
29 
30 Error HostProcess::Terminate()
31 {
32     return m_native_process->Terminate();
33 }
34 
35 Error HostProcess::GetMainModule(FileSpec &file_spec) const
36 {
37     return m_native_process->GetMainModule(file_spec);
38 }
39 
40 lldb::pid_t HostProcess::GetProcessId() const
41 {
42     return m_native_process->GetProcessId();
43 }
44 
45 bool HostProcess::IsRunning() const
46 {
47     return m_native_process->IsRunning();
48 }
49 
50 HostNativeProcessBase &HostProcess::GetNativeProcess()
51 {
52     return *m_native_process;
53 }
54 
55 const HostNativeProcessBase &HostProcess::GetNativeProcess() const
56 {
57     return *m_native_process;
58 }
59