Path: blob/main/contrib/llvm-project/lldb/source/Host/common/HostProcess.cpp
39606 views
//===-- HostProcess.cpp ---------------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "lldb/Host/HostProcess.h"9#include "lldb/Host/HostNativeProcess.h"10#include "lldb/Host/HostThread.h"1112using namespace lldb;13using namespace lldb_private;1415HostProcess::HostProcess() : m_native_process(new HostNativeProcess) {}1617HostProcess::HostProcess(lldb::process_t process)18: m_native_process(new HostNativeProcess(process)) {}1920HostProcess::~HostProcess() = default;2122Status HostProcess::Terminate() { return m_native_process->Terminate(); }2324lldb::pid_t HostProcess::GetProcessId() const {25return m_native_process->GetProcessId();26}2728bool HostProcess::IsRunning() const { return m_native_process->IsRunning(); }2930llvm::Expected<HostThread> HostProcess::StartMonitoring(31const Host::MonitorChildProcessCallback &callback) {32return m_native_process->StartMonitoring(callback);33}3435HostNativeProcessBase &HostProcess::GetNativeProcess() {36return *m_native_process;37}3839const HostNativeProcessBase &HostProcess::GetNativeProcess() const {40return *m_native_process;41}424344