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/lldb-forward.h"
15 #include "lldb/Core/Error.h"
16 #include "lldb/Target/Process.h"
17 
18 namespace lldb_private
19 {
20 
21 class ProcessWindows : public lldb_private::Process
22 {
23 public:
24     //------------------------------------------------------------------
25     // Constructors and destructors
26     //------------------------------------------------------------------
27     ProcessWindows(lldb::TargetSP target_sp,
28                    lldb::ListenerSP listener_sp);
29 
30     ~ProcessWindows();
31 
32     size_t GetSTDOUT(char *buf, size_t buf_size, lldb_private::Error &error) override;
33     size_t GetSTDERR(char *buf, size_t buf_size, lldb_private::Error &error) override;
34     size_t PutSTDIN(const char *buf, size_t buf_size, 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
41     IsPageReadable(uint32_t protect);
42 
43     static bool
44     IsPageWritable(uint32_t protect);
45 
46     static bool
47     IsPageExecutable(uint32_t protect);
48 };
49 
50 }
51 
52 #endif  // liblldb_Plugins_Process_Windows_Common_ProcessWindows_H_
53