• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- HostProcessWindows.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_HostProcessWindows_h_
10 #define lldb_Host_HostProcessWindows_h_
11 
12 #include "lldb/Host/HostNativeProcessBase.h"
13 #include "lldb/lldb-types.h"
14 
15 namespace lldb_private {
16 
17 class FileSpec;
18 
19 class HostProcessWindows : public HostNativeProcessBase {
20 public:
21   HostProcessWindows();
22   explicit HostProcessWindows(lldb::process_t process);
23   ~HostProcessWindows();
24 
25   void SetOwnsHandle(bool owns);
26 
27   Status Terminate() override;
28   Status GetMainModule(FileSpec &file_spec) const override;
29 
30   lldb::pid_t GetProcessId() const override;
31   bool IsRunning() const override;
32 
33   virtual llvm::Expected<HostThread>
34   StartMonitoring(const Host::MonitorChildProcessCallback &callback,
35                   bool monitor_signals) override;
36 
37 private:
38   static lldb::thread_result_t MonitorThread(void *thread_arg);
39 
40   void Close();
41 
42   bool m_owns_handle;
43 };
44 }
45 
46 #endif
47