1 //===-- PlatformWindows.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_PlatformWindows_h_ 11 #define liblldb_PlatformWindows_h_ 12 13 // C Includes 14 // C++ Includes 15 // Other libraries and framework includes 16 // Project includes 17 #include "lldb/Target/Platform.h" 18 19 namespace lldb_private 20 { 21 22 class PlatformWindows : public Platform 23 { 24 public: 25 26 static void 27 Initialize(void); 28 29 static void 30 Terminate(void); 31 32 PlatformWindows(bool is_host); 33 34 virtual 35 ~PlatformWindows(void); 36 37 //------------------------------------------------------------ 38 // lldb_private::PluginInterface functions 39 //------------------------------------------------------------ 40 static lldb_private::Platform* 41 CreateInstance (bool force, const lldb_private::ArchSpec *arch); 42 43 44 static lldb_private::ConstString 45 GetPluginNameStatic(bool is_host); 46 47 static const char * 48 GetPluginDescriptionStatic(bool is_host); 49 50 virtual lldb_private::ConstString 51 GetPluginName(void); 52 53 virtual uint32_t 54 GetPluginVersion(void) 55 { 56 return 1; 57 } 58 59 //------------------------------------------------------------ 60 // lldb_private::Platform functions 61 //------------------------------------------------------------ 62 virtual Error 63 ResolveExecutable(const FileSpec &exe_file, 64 const ArchSpec &arch, 65 lldb::ModuleSP &module_sp, 66 const FileSpecList *module_search_paths_ptr); 67 68 virtual const char * 69 GetDescription(void) 70 { 71 return GetPluginDescriptionStatic(IsHost()); 72 } 73 74 virtual size_t 75 GetSoftwareBreakpointTrapOpcode(lldb_private::Target &target, 76 lldb_private::BreakpointSite *bp_site); 77 78 virtual bool 79 GetRemoteOSVersion(void); 80 81 virtual bool 82 GetRemoteOSBuildString(std::string &s); 83 84 virtual bool 85 GetRemoteOSKernelDescription(std::string &s); 86 87 // Remote Platform subclasses need to override this function 88 virtual lldb_private::ArchSpec 89 GetRemoteSystemArchitecture(void); 90 91 virtual bool 92 IsConnected(void) const; 93 94 virtual lldb_private::Error 95 ConnectRemote(lldb_private::Args& args); 96 97 virtual lldb_private::Error 98 DisconnectRemote( void ); 99 100 virtual const char * 101 GetHostname( void ); 102 103 virtual const char * 104 GetUserName(uint32_t uid); 105 106 virtual const char * 107 GetGroupName(uint32_t gid); 108 109 virtual bool 110 GetProcessInfo(lldb::pid_t pid, 111 lldb_private::ProcessInstanceInfo &proc_info); 112 113 virtual uint32_t 114 FindProcesses(const lldb_private::ProcessInstanceInfoMatch &match_info, 115 lldb_private::ProcessInstanceInfoList &process_infos); 116 117 virtual lldb_private::Error 118 LaunchProcess(lldb_private::ProcessLaunchInfo &launch_info); 119 120 virtual lldb::ProcessSP 121 Attach(lldb_private::ProcessAttachInfo &attach_info, 122 lldb_private::Debugger &debugger, 123 lldb_private::Target *target, 124 lldb_private::Listener &listener, 125 lldb_private::Error &error); 126 127 virtual lldb_private::Error 128 GetFile(const lldb_private::FileSpec &platform_file, 129 const lldb_private::UUID* uuid, lldb_private::FileSpec &local_file); 130 131 lldb_private::Error 132 GetSharedModule(const lldb_private::ModuleSpec &module_spec, 133 lldb::ModuleSP &module_sp, 134 const lldb_private::FileSpecList *module_search_paths_ptr, 135 lldb::ModuleSP *old_module_sp_ptr, 136 bool *did_create_ptr); 137 138 virtual bool 139 GetSupportedArchitectureAtIndex(uint32_t idx, lldb_private::ArchSpec &arch); 140 141 virtual void 142 GetStatus(lldb_private::Stream &strm); 143 144 // Local debugging not yet supported 145 virtual bool 146 CanDebugProcess(void) 147 { 148 return false; 149 } 150 151 protected: 152 lldb::PlatformSP m_remote_platform_sp; 153 154 private: 155 DISALLOW_COPY_AND_ASSIGN (PlatformWindows); 156 }; 157 158 } 159 160 #endif // liblldb_PlatformWindows_h_ 161