xref: /freebsd/contrib/llvm-project/lldb/include/lldb/Host/posix/HostProcessPosix.h (revision 9e5787d2284e187abb5b654d924394a65772e004)
1 //===-- HostProcessPosix.h --------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_HOST_POSIX_HOSTPROCESSPOSIX_H
10 #define LLDB_HOST_POSIX_HOSTPROCESSPOSIX_H
11 
12 #include "lldb/Host/HostNativeProcessBase.h"
13 #include "lldb/Utility/Status.h"
14 #include "lldb/lldb-types.h"
15 
16 namespace lldb_private {
17 
18 class FileSpec;
19 
20 class HostProcessPosix : public HostNativeProcessBase {
21 public:
22   HostProcessPosix();
23   HostProcessPosix(lldb::process_t process);
24   ~HostProcessPosix() override;
25 
26   virtual Status Signal(int signo) const;
27   static Status Signal(lldb::process_t process, int signo);
28 
29   Status Terminate() override;
30   Status GetMainModule(FileSpec &file_spec) const override;
31 
32   lldb::pid_t GetProcessId() const override;
33   bool IsRunning() const override;
34 
35   llvm::Expected<HostThread>
36   StartMonitoring(const Host::MonitorChildProcessCallback &callback,
37                   bool monitor_signals) override;
38 };
39 
40 } // namespace lldb_private
41 
42 #endif // LLDB_HOST_POSIX_HOSTPROCESSPOSIX_H
43