1 //===-- PlatformRemoteiOS.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_PlatformRemoteiOS_h_
11 #define liblldb_PlatformRemoteiOS_h_
12 
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "PlatformDarwin.h"
18 
19 class PlatformRemoteiOS : public PlatformDarwin
20 {
21 public:
22 
23     //------------------------------------------------------------
24     // Class Functions
25     //------------------------------------------------------------
26     static lldb_private::Platform*
27     CreateInstance ();
28 
29     static void
30     Initialize ();
31 
32     static void
33     Terminate ();
34 
35     static const char *
36     GetPluginNameStatic ();
37 
38     static const char *
39     GetShortPluginNameStatic();
40 
41     static const char *
42     GetDescriptionStatic();
43 
44     //------------------------------------------------------------
45     // Class Methods
46     //------------------------------------------------------------
47     PlatformRemoteiOS ();
48 
49     virtual
50     ~PlatformRemoteiOS();
51 
52     //------------------------------------------------------------
53     // lldb_private::PluginInterface functions
54     //------------------------------------------------------------
55     virtual const char *
56     GetPluginName()
57     {
58         return GetPluginNameStatic();
59     }
60 
61     virtual const char *
62     GetShortPluginName()
63     {
64         return GetShortPluginNameStatic();
65     }
66 
67     virtual uint32_t
68     GetPluginVersion()
69     {
70         return 1;
71     }
72 
73     //------------------------------------------------------------
74     // lldb_private::Platform functions
75     //------------------------------------------------------------
76     virtual lldb_private::Error
77     ResolveExecutable (const lldb_private::FileSpec &exe_file,
78                        const lldb_private::ArchSpec &arch,
79                        lldb::ModuleSP &module_sp);
80 
81     virtual const char *
82     GetDescription ()
83     {
84         return GetDescriptionStatic();
85     }
86 
87     virtual void
88     GetStatus (lldb_private::Stream &strm);
89 
90     virtual lldb_private::Error
91     GetFile (const lldb_private::FileSpec &platform_file,
92              const lldb_private::UUID *uuid_ptr,
93              lldb_private::FileSpec &local_file);
94 
95     lldb_private::Error
96     GetSharedModule (const lldb_private::FileSpec &platform_file,
97                      const lldb_private::ArchSpec &arch,
98                      const lldb_private::UUID *uuid_ptr,
99                      const lldb_private::ConstString *object_name_ptr,
100                      off_t object_offset,
101                      lldb::ModuleSP &module_sp,
102                      lldb::ModuleSP *old_module_sp_ptr,
103                      bool *did_create_ptr);
104 
105     virtual uint32_t
106     FindProcesses (const lldb_private::ProcessInstanceInfoMatch &match_info,
107                    lldb_private::ProcessInstanceInfoList &process_infos);
108 
109     virtual bool
110     GetProcessInfo (lldb::pid_t pid,
111                     lldb_private::ProcessInstanceInfo &proc_info);
112 
113     virtual bool
114     GetSupportedArchitectureAtIndex (uint32_t idx,
115                                      lldb_private::ArchSpec &arch);
116 
117 protected:
118     std::string m_device_support_directory;
119     std::string m_device_support_directory_for_os_version;
120     std::string m_build_update;
121     //std::vector<FileSpec> m_device_support_os_dirs;
122 
123     const char *
124     GetDeviceSupportDirectory();
125 
126     const char *
127     GetDeviceSupportDirectoryForOSVersion();
128 
129 private:
130     DISALLOW_COPY_AND_ASSIGN (PlatformRemoteiOS);
131 
132 };
133 
134 #endif  // liblldb_PlatformRemoteiOS_h_
135