1 //===-- ProcessWindows.h ----------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef liblldb_Plugins_Process_Windows_Common_ProcessWindows_H_
11 #define liblldb_Plugins_Process_Windows_Common_ProcessWindows_H_
12 
13 // Other libraries and framework includes
14 #include "lldb/Core/Error.h"
15 #include "lldb/Target/Process.h"
16 #include "lldb/lldb-forward.h"
17 
18 namespace lldb_private {
19 
20 class ProcessWindows : public lldb_private::Process {
21 public:
22   //------------------------------------------------------------------
23   // Constructors and destructors
24   //------------------------------------------------------------------
25   ProcessWindows(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp);
26 
27   ~ProcessWindows();
28 
29   size_t GetSTDOUT(char *buf, size_t buf_size,
30                    lldb_private::Error &error) override;
31   size_t GetSTDERR(char *buf, size_t buf_size,
32                    lldb_private::Error &error) override;
33   size_t PutSTDIN(const char *buf, size_t buf_size,
34                   lldb_private::Error &error) override;
35 
36   lldb::addr_t GetImageInfoAddress() override;
37 
38 protected:
39   // These decode the page protection bits.
40   static bool IsPageReadable(uint32_t protect);
41 
42   static bool IsPageWritable(uint32_t protect);
43 
44   static bool IsPageExecutable(uint32_t protect);
45 };
46 }
47 
48 #endif // liblldb_Plugins_Process_Windows_Common_ProcessWindows_H_
49