blob: 9234a3dbd86f778a3ce897b1f7c45dcf1a6d0a0a [file] [log] [blame]
Greg Claytonfbb76342013-11-20 21:07:01 +00001//===-- SWIG Interface for SBPlatform ---------------------------*- 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
10namespace lldb {
11
12
13class SBPlatformConnectOptions
14{
15public:
16 SBPlatformConnectOptions (const char *url);
17
18 SBPlatformConnectOptions (const SBPlatformConnectOptions &rhs);
19
20 ~SBPlatformConnectOptions ();
21
22 const char *
23 GetURL();
24
25 void
26 SetURL(const char *url);
27
28 bool
29 GetRsyncEnabled();
30
31 void
32 EnableRsync (const char *options,
33 const char *remote_path_prefix,
34 bool omit_remote_hostname);
35
36 void
37 DisableRsync ();
38
39 const char *
40 GetLocalCacheDirectory();
41
42 void
43 SetLocalCacheDirectory(const char *path);
44};
45
46class SBPlatformShellCommand
47{
48public:
49 SBPlatformShellCommand (const char *shell_command);
50
51 SBPlatformShellCommand (const SBPlatformShellCommand &rhs);
52
53 ~SBPlatformShellCommand();
54
55 void
56 Clear();
57
58 const char *
59 GetCommand();
60
61 void
62 SetCommand(const char *shell_command);
63
64 const char *
65 GetWorkingDirectory ();
66
67 void
68 SetWorkingDirectory (const char *path);
69
70 uint32_t
71 GetTimeoutSeconds ();
72
73 void
74 SetTimeoutSeconds (uint32_t sec);
75
76 int
77 GetSignal ();
78
79 int
80 GetStatus ();
81
82 const char *
83 GetOutput ();
84};
85
86%feature("docstring",
Bruce Mitchener58ef3912015-06-18 05:27:05 +000087"A class that represents a platform that can represent the current host or a remote host debug platform.
Greg Claytonfbb76342013-11-20 21:07:01 +000088
89The SBPlatform class represents the current host, or a remote host.
90It can be connected to a remote platform in order to provide ways
91to remotely launch and attach to processes, upload/download files,
92create directories, run remote shell commands, find locally cached
93versions of files from the remote system, and much more.
94
95SBPlatform objects can be created and then used to connect to a remote
96platform which allows the SBPlatform to be used to get a list of the
97current processes on the remote host, attach to one of those processes,
98install programs on the remote system, attach and launch processes,
99and much more.
100
101Every SBTarget has a corresponding SBPlatform. The platform can be
102specified upon target creation, or the currently selected platform
103will attempt to be used when creating the target automatically as long
104as the currently selected platform matches the target architecture
105and executable type. If the architecture or executable type do not match,
106a suitable platform will be found automatically."
107
108) SBPlatform;
109class SBPlatform
110{
111public:
112
113 SBPlatform ();
114
115 SBPlatform (const char *);
116
117 ~SBPlatform();
118
119 bool
120 IsValid () const;
121
122 void
123 Clear ();
124
125 const char *
126 GetWorkingDirectory();
127
128 bool
129 SetWorkingDirectory(const char *);
130
131 const char *
132 GetName ();
133
134 SBError
135 ConnectRemote (lldb::SBPlatformConnectOptions &connect_options);
136
137 void
138 DisconnectRemote ();
139
140 bool
141 IsConnected();
142
143 const char *
144 GetTriple();
145
146 const char *
147 GetHostname ();
148
149 const char *
150 GetOSBuild ();
151
152 const char *
153 GetOSDescription ();
154
155 uint32_t
156 GetOSMajorVersion ();
157
158 uint32_t
159 GetOSMinorVersion ();
160
161 uint32_t
162 GetOSUpdateVersion ();
163
164 lldb::SBError
165 Get (lldb::SBFileSpec &src, lldb::SBFileSpec &dst);
166
167 lldb::SBError
168 Put (lldb::SBFileSpec &src, lldb::SBFileSpec &dst);
169
170 lldb::SBError
171 Install (lldb::SBFileSpec &src, lldb::SBFileSpec &dst);
172
173 lldb::SBError
174 Run (lldb::SBPlatformShellCommand &shell_command);
175
176 lldb::SBError
Oleksiy Vyalov1ef7b2c2015-02-04 23:19:15 +0000177 Launch (lldb::SBLaunchInfo &launch_info);
178
179 lldb::SBError
180 Kill (const lldb::pid_t pid);
181
182 lldb::SBError
Greg Claytonfbb76342013-11-20 21:07:01 +0000183 MakeDirectory (const char *path, uint32_t file_permissions = lldb::eFilePermissionsDirectoryDefault);
184
185 uint32_t
186 GetFilePermissions (const char *path);
187
188 lldb::SBError
189 SetFilePermissions (const char *path, uint32_t file_permissions);
190
Chaoren Lin98d0a4b2015-07-14 01:09:28 +0000191 lldb::SBUnixSignals
192 GetUnixSignals();
193
Greg Claytonfbb76342013-11-20 21:07:01 +0000194};
195
196} // namespace lldb