]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/bindings/interface/SBPlatform.i
Add 'contrib/pnglite/' from commit 'a70c2a23d0d84dfc63a1d9413a7f4aaede7313aa'
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / bindings / interface / SBPlatform.i
1 //===-- SWIG Interface for SBPlatform ---------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 namespace lldb {
10
11
12 class SBPlatformConnectOptions
13 {
14 public:
15     SBPlatformConnectOptions (const char *url);
16
17     SBPlatformConnectOptions (const SBPlatformConnectOptions &rhs);
18
19     ~SBPlatformConnectOptions ();
20
21     const char *
22     GetURL();
23
24     void
25     SetURL(const char *url);
26
27     bool
28     GetRsyncEnabled();
29
30     void
31     EnableRsync (const char *options,
32                  const char *remote_path_prefix,
33                  bool omit_remote_hostname);
34
35     void
36     DisableRsync ();
37
38     const char *
39     GetLocalCacheDirectory();
40
41     void
42     SetLocalCacheDirectory(const char *path);
43 };
44
45 class SBPlatformShellCommand
46 {
47 public:
48     SBPlatformShellCommand (const char *shell_command);
49
50     SBPlatformShellCommand (const SBPlatformShellCommand &rhs);
51
52     ~SBPlatformShellCommand();
53
54     void
55     Clear();
56
57     const char *
58     GetCommand();
59
60     void
61     SetCommand(const char *shell_command);
62
63     const char *
64     GetWorkingDirectory ();
65
66     void
67     SetWorkingDirectory (const char *path);
68
69     uint32_t
70     GetTimeoutSeconds ();
71
72     void
73     SetTimeoutSeconds (uint32_t sec);
74
75     int
76     GetSignal ();
77
78     int
79     GetStatus ();
80
81     const char *
82     GetOutput ();
83 };
84
85 %feature("docstring",
86 "A class that represents a platform that can represent the current host or a remote host debug platform.
87
88 The SBPlatform class represents the current host, or a remote host.
89 It can be connected to a remote platform in order to provide ways
90 to remotely launch and attach to processes, upload/download files,
91 create directories, run remote shell commands, find locally cached
92 versions of files from the remote system, and much more.
93
94 SBPlatform objects can be created and then used to connect to a remote
95 platform which allows the SBPlatform to be used to get a list of the
96 current processes on the remote host, attach to one of those processes,
97 install programs on the remote system, attach and launch processes,
98 and much more.
99
100 Every SBTarget has a corresponding SBPlatform. The platform can be
101 specified upon target creation, or the currently selected platform
102 will attempt to be used when creating the target automatically as long
103 as the currently selected platform matches the target architecture
104 and executable type. If the architecture or executable type do not match,
105 a suitable platform will be found automatically."
106
107 ) SBPlatform;
108 class SBPlatform
109 {
110 public:
111
112     SBPlatform ();
113
114     SBPlatform (const char *);
115
116     ~SBPlatform();
117
118     static SBPlatform GetHostPlatform();
119
120     bool
121     IsValid () const;
122
123     explicit operator bool() const;
124
125     void
126     Clear ();
127
128     const char *
129     GetWorkingDirectory();
130
131     bool
132     SetWorkingDirectory(const char *);
133
134     const char *
135     GetName ();
136
137     SBError
138     ConnectRemote (lldb::SBPlatformConnectOptions &connect_options);
139
140     void
141     DisconnectRemote ();
142
143     bool
144     IsConnected();
145
146     const char *
147     GetTriple();
148
149     const char *
150     GetHostname ();
151
152     const char *
153     GetOSBuild ();
154
155     const char *
156     GetOSDescription ();
157
158     uint32_t
159     GetOSMajorVersion ();
160
161     uint32_t
162     GetOSMinorVersion ();
163
164     uint32_t
165     GetOSUpdateVersion ();
166
167     lldb::SBError
168     Get (lldb::SBFileSpec &src, lldb::SBFileSpec &dst);
169
170     lldb::SBError
171     Put (lldb::SBFileSpec &src, lldb::SBFileSpec &dst);
172
173     lldb::SBError
174     Install (lldb::SBFileSpec &src, lldb::SBFileSpec &dst);
175
176     lldb::SBError
177     Run (lldb::SBPlatformShellCommand &shell_command);
178
179     lldb::SBError
180     Launch (lldb::SBLaunchInfo &launch_info);
181
182     lldb::SBError
183     Kill (const lldb::pid_t pid);
184
185     lldb::SBError
186     MakeDirectory (const char *path, uint32_t file_permissions = lldb::eFilePermissionsDirectoryDefault);
187
188     uint32_t
189     GetFilePermissions (const char *path);
190
191     lldb::SBError
192     SetFilePermissions (const char *path, uint32_t file_permissions);
193
194     lldb::SBUnixSignals
195     GetUnixSignals();
196
197     lldb::SBEnvironment
198     GetEnvironment();
199
200 };
201
202 } // namespace lldb