Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.5 KiB
C++
Raw Permalink Normal View History

//===-- HostProcess.cpp ---------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "lldb/Host/HostProcess.h"
#include "lldb/Host/HostNativeProcess.h"
2014-10-14 21:55:08 +00:00
#include "lldb/Host/HostThread.h"
using namespace lldb;
using namespace lldb_private;
HostProcess::HostProcess() : m_native_process(new HostNativeProcess) {}
HostProcess::HostProcess(lldb::process_t process)
: m_native_process(new HostNativeProcess(process)) {}
2014-09-30 16:56:40 +00:00
HostProcess::~HostProcess() {}
2017-05-12 04:51:55 +00:00
Status HostProcess::Terminate() { return m_native_process->Terminate(); }
2017-05-12 04:51:55 +00:00
Status HostProcess::GetMainModule(FileSpec &file_spec) const {
return m_native_process->GetMainModule(file_spec);
}
2014-09-30 16:56:40 +00:00
lldb::pid_t HostProcess::GetProcessId() const {
return m_native_process->GetProcessId();
2014-09-30 16:56:40 +00:00
}
bool HostProcess::IsRunning() const { return m_native_process->IsRunning(); }
llvm::Expected<HostThread>
HostProcess::StartMonitoring(const Host::MonitorChildProcessCallback &callback,
bool monitor_signals) {
return m_native_process->StartMonitoring(callback, monitor_signals);
2014-10-14 21:55:08 +00:00
}
HostNativeProcessBase &HostProcess::GetNativeProcess() {
return *m_native_process;
}
const HostNativeProcessBase &HostProcess::GetNativeProcess() const {
return *m_native_process;
}