Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:49

0001 //===-- HostNativeProcessBase.h ---------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_HOST_HOSTNATIVEPROCESSBASE_H
0010 #define LLDB_HOST_HOSTNATIVEPROCESSBASE_H
0011 
0012 #include "lldb/Host/HostProcess.h"
0013 #include "lldb/Utility/Status.h"
0014 #include "lldb/lldb-defines.h"
0015 #include "lldb/lldb-types.h"
0016 
0017 namespace lldb_private {
0018 
0019 class HostThread;
0020 
0021 class HostNativeProcessBase {
0022   HostNativeProcessBase(const HostNativeProcessBase &) = delete;
0023   const HostNativeProcessBase &
0024   operator=(const HostNativeProcessBase &) = delete;
0025 
0026 public:
0027   HostNativeProcessBase() : m_process(LLDB_INVALID_PROCESS) {}
0028   explicit HostNativeProcessBase(lldb::process_t process)
0029       : m_process(process) {}
0030   virtual ~HostNativeProcessBase() = default;
0031 
0032   virtual Status Terminate() = 0;
0033 
0034   virtual lldb::pid_t GetProcessId() const = 0;
0035   virtual bool IsRunning() const = 0;
0036 
0037   lldb::process_t GetSystemHandle() const { return m_process; }
0038 
0039   virtual llvm::Expected<HostThread>
0040   StartMonitoring(const Host::MonitorChildProcessCallback &callback) = 0;
0041 
0042 protected:
0043   lldb::process_t m_process;
0044 };
0045 }
0046 
0047 #endif