LLDB mainline
SBPlatform.cpp
Go to the documentation of this file.
1//===-- SBPlatform.cpp ----------------------------------------------------===//
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
10#include "lldb/API/SBDebugger.h"
12#include "lldb/API/SBError.h"
13#include "lldb/API/SBFileSpec.h"
17#include "lldb/API/SBTarget.h"
19#include "lldb/Host/File.h"
21#include "lldb/Target/Target.h"
23#include "lldb/Utility/Args.h"
25#include "lldb/Utility/Status.h"
27
28#include "llvm/Support/FileSystem.h"
29
30#include <functional>
31
32using namespace lldb;
33using namespace lldb_private;
34
35// PlatformConnectOptions
37 PlatformConnectOptions(const char *url = nullptr) {
38 if (url && url[0])
39 m_url = url;
40 }
41
43
44 std::string m_url;
45 std::string m_rsync_options;
47 bool m_rsync_enabled = false;
50};
51
52// PlatformShellCommand
54 PlatformShellCommand(llvm::StringRef shell_interpreter,
55 llvm::StringRef shell_command) {
56 if (!shell_interpreter.empty())
57 m_shell = shell_interpreter.str();
58
59 if (!m_shell.empty() && !shell_command.empty())
60 m_command = shell_command.str();
61 }
62
63 PlatformShellCommand(llvm::StringRef shell_command = llvm::StringRef()) {
64 if (!shell_command.empty())
65 m_command = shell_command.str();
66 }
67
69
70 std::string m_shell;
71 std::string m_command;
72 std::string m_working_dir;
73 std::string m_output;
74 int m_status = 0;
75 int m_signo = 0;
77};
78// SBPlatformConnectOptions
83
91
93
96 LLDB_INSTRUMENT_VA(this, rhs);
97
99 return *this;
100}
101
103 LLDB_INSTRUMENT_VA(this);
104
105 if (m_opaque_ptr->m_url.empty())
106 return nullptr;
108}
109
110void SBPlatformConnectOptions::SetURL(const char *url) {
111 LLDB_INSTRUMENT_VA(this, url);
112
113 if (url && url[0])
114 m_opaque_ptr->m_url = url;
115 else
116 m_opaque_ptr->m_url.clear();
117}
118
120 LLDB_INSTRUMENT_VA(this);
121
122 return m_opaque_ptr->m_rsync_enabled;
123}
124
126 const char *options, const char *remote_path_prefix,
127 bool omit_hostname_from_remote_path) {
128 LLDB_INSTRUMENT_VA(this, options, remote_path_prefix,
129 omit_hostname_from_remote_path);
130
131 m_opaque_ptr->m_rsync_enabled = true;
132 m_opaque_ptr->m_rsync_omit_hostname_from_remote_path =
133 omit_hostname_from_remote_path;
134 if (remote_path_prefix && remote_path_prefix[0])
135 m_opaque_ptr->m_rsync_remote_path_prefix = remote_path_prefix;
136 else
137 m_opaque_ptr->m_rsync_remote_path_prefix.clear();
138
139 if (options && options[0])
140 m_opaque_ptr->m_rsync_options = options;
141 else
142 m_opaque_ptr->m_rsync_options.clear();
143}
144
146 LLDB_INSTRUMENT_VA(this);
147
148 m_opaque_ptr->m_rsync_enabled = false;
149}
150
152 LLDB_INSTRUMENT_VA(this);
153
155 m_opaque_ptr->m_local_cache_directory);
156}
157
159 LLDB_INSTRUMENT_VA(this, path);
160
161 if (path && path[0])
162 m_opaque_ptr->m_local_cache_directory.SetCString(path);
163 else
164 m_opaque_ptr->m_local_cache_directory = ConstString();
165}
166
167// SBPlatformShellCommand
169 const char *shell_command)
170 : m_opaque_ptr(new PlatformShellCommand(shell_interpreter, shell_command)) {
171 LLDB_INSTRUMENT_VA(this, shell_interpreter, shell_command);
172}
173
175 : m_opaque_ptr(new PlatformShellCommand(shell_command)) {
176 LLDB_INSTRUMENT_VA(this, shell_command);
177}
178
186
189
190 LLDB_INSTRUMENT_VA(this, rhs);
191
193 return *this;
194}
195
197
199 LLDB_INSTRUMENT_VA(this);
200
201 m_opaque_ptr->m_output = std::string();
202 m_opaque_ptr->m_status = 0;
203 m_opaque_ptr->m_signo = 0;
204}
205
207 LLDB_INSTRUMENT_VA(this);
208
209 if (m_opaque_ptr->m_shell.empty())
210 return nullptr;
212}
213
214void SBPlatformShellCommand::SetShell(const char *shell_interpreter) {
215 LLDB_INSTRUMENT_VA(this, shell_interpreter);
216
217 if (shell_interpreter && shell_interpreter[0])
218 m_opaque_ptr->m_shell = shell_interpreter;
219 else
220 m_opaque_ptr->m_shell.clear();
221}
222
224 LLDB_INSTRUMENT_VA(this);
225
226 if (m_opaque_ptr->m_command.empty())
227 return nullptr;
228 return StringPool::GetSystemPool().Intern(m_opaque_ptr->m_command);
229}
230
231void SBPlatformShellCommand::SetCommand(const char *shell_command) {
232 LLDB_INSTRUMENT_VA(this, shell_command);
233
234 if (shell_command && shell_command[0])
235 m_opaque_ptr->m_command = shell_command;
236 else
237 m_opaque_ptr->m_command.clear();
238}
239
241 LLDB_INSTRUMENT_VA(this);
242
243 if (m_opaque_ptr->m_working_dir.empty())
244 return nullptr;
245 return StringPool::GetSystemPool().Intern(m_opaque_ptr->m_working_dir);
246}
247
249 LLDB_INSTRUMENT_VA(this, path);
250
251 if (path && path[0])
252 m_opaque_ptr->m_working_dir = path;
253 else
254 m_opaque_ptr->m_working_dir.clear();
255}
256
258 LLDB_INSTRUMENT_VA(this);
259
260 if (m_opaque_ptr->m_timeout)
261 return m_opaque_ptr->m_timeout->count();
262 return UINT32_MAX;
263}
264
266 LLDB_INSTRUMENT_VA(this, sec);
267
268 if (sec == UINT32_MAX)
269 m_opaque_ptr->m_timeout = std::nullopt;
270 else
271 m_opaque_ptr->m_timeout = std::chrono::seconds(sec);
272}
273
275 LLDB_INSTRUMENT_VA(this);
276
277 return m_opaque_ptr->m_signo;
278}
279
281 LLDB_INSTRUMENT_VA(this);
282
283 return m_opaque_ptr->m_status;
284}
285
287 LLDB_INSTRUMENT_VA(this);
288
289 if (m_opaque_ptr->m_output.empty())
290 return nullptr;
292}
293
294// SBPlatform
296
297SBPlatform::SBPlatform(const char *platform_name) {
298 LLDB_INSTRUMENT_VA(this, platform_name);
299
300 m_opaque_sp = Platform::Create(platform_name);
301}
302
304 LLDB_INSTRUMENT_VA(this, rhs);
305
307}
308
310 LLDB_INSTRUMENT_VA(this, rhs);
311
313 return *this;
314}
315
316SBPlatform::~SBPlatform() = default;
317
320
321 SBPlatform host_platform;
322 host_platform.m_opaque_sp = Platform::GetHostPlatform();
323 return host_platform;
324}
325
327 LLDB_INSTRUMENT_VA(this);
328 return this->operator bool();
329}
330SBPlatform::operator bool() const {
331 LLDB_INSTRUMENT_VA(this);
332
333 return m_opaque_sp.get() != nullptr;
334}
335
336bool SBPlatform::IsHost() const {
337 LLDB_INSTRUMENT_VA(this);
338 return m_opaque_sp.get() != nullptr && m_opaque_sp->IsHost();
339}
340
342 LLDB_INSTRUMENT_VA(this);
343
344 m_opaque_sp.reset();
345}
346
347const char *SBPlatform::GetName() {
348 LLDB_INSTRUMENT_VA(this);
349
350 PlatformSP platform_sp(GetSP());
351 if (platform_sp)
352 return StringPool::GetSystemPool().InternNonEmpty(platform_sp->GetName());
353 return nullptr;
354}
355
357
358void SBPlatform::SetSP(const lldb::PlatformSP &platform_sp) {
359 m_opaque_sp = platform_sp;
360}
361
363 LLDB_INSTRUMENT_VA(this);
364
365 PlatformSP platform_sp(GetSP());
366 if (platform_sp)
368 platform_sp->GetWorkingDirectory().GetPath());
369 return nullptr;
370}
371
372bool SBPlatform::SetWorkingDirectory(const char *path) {
373 LLDB_INSTRUMENT_VA(this, path);
374
375 PlatformSP platform_sp(GetSP());
376 if (platform_sp) {
377 if (path)
378 platform_sp->SetWorkingDirectory(FileSpec(path));
379 else
380 platform_sp->SetWorkingDirectory(FileSpec());
381 return true;
382 }
383 return false;
384}
385
387 LLDB_INSTRUMENT_VA(this, connect_options);
388
389 SBError sb_error;
390 PlatformSP platform_sp(GetSP());
391 if (platform_sp && connect_options.GetURL()) {
392 Args args;
393 args.AppendArgument(connect_options.GetURL());
394 sb_error.ref() = platform_sp->ConnectRemote(args);
395 } else {
396 sb_error = Status::FromErrorString("invalid platform");
397 }
398 return sb_error;
399}
400
402 LLDB_INSTRUMENT_VA(this);
403
404 PlatformSP platform_sp(GetSP());
405 if (platform_sp)
406 platform_sp->DisconnectRemote();
407}
408
410 LLDB_INSTRUMENT_VA(this);
411
412 PlatformSP platform_sp(GetSP());
413 if (platform_sp)
414 return platform_sp->IsConnected();
415 return false;
416}
417
419 LLDB_INSTRUMENT_VA(this);
420
421 PlatformSP platform_sp(GetSP());
422 if (platform_sp) {
423 ArchSpec arch(platform_sp->GetSystemArchitecture());
424 if (arch.IsValid()) {
425 return StringPool::GetSystemPool().Intern(arch.GetTriple().getTriple());
426 }
427 }
428 return nullptr;
429}
430
432 LLDB_INSTRUMENT_VA(this);
433
434 PlatformSP platform_sp(GetSP());
435 if (platform_sp) {
436 std::string s = platform_sp->GetOSBuildString().value_or("");
437 if (!s.empty()) {
439 }
440 }
441 return nullptr;
442}
443
445 LLDB_INSTRUMENT_VA(this);
446
447 PlatformSP platform_sp(GetSP());
448 if (platform_sp) {
449 std::string s = platform_sp->GetOSKernelDescription().value_or("");
450 if (!s.empty()) {
452 }
453 }
454 return nullptr;
455}
456
458 LLDB_INSTRUMENT_VA(this);
459
460 PlatformSP platform_sp(GetSP());
461 if (platform_sp)
462 return StringPool::GetSystemPool().Intern(platform_sp->GetHostname());
463 return nullptr;
464}
465
467 LLDB_INSTRUMENT_VA(this);
468
469 llvm::VersionTuple version;
470 if (PlatformSP platform_sp = GetSP())
471 version = platform_sp->GetOSVersion();
472 return version.empty() ? UINT32_MAX : version.getMajor();
473}
474
476 LLDB_INSTRUMENT_VA(this);
477
478 llvm::VersionTuple version;
479 if (PlatformSP platform_sp = GetSP())
480 version = platform_sp->GetOSVersion();
481 return version.getMinor().value_or(UINT32_MAX);
482}
483
485 LLDB_INSTRUMENT_VA(this);
486
487 llvm::VersionTuple version;
488 if (PlatformSP platform_sp = GetSP())
489 version = platform_sp->GetOSVersion();
490 return version.getSubminor().value_or(UINT32_MAX);
491}
492
493void SBPlatform::SetSDKRoot(const char *sysroot) {
494 LLDB_INSTRUMENT_VA(this, sysroot);
495 if (PlatformSP platform_sp = GetSP())
496 platform_sp->SetSDKRootDirectory(llvm::StringRef(sysroot).str());
497}
498
500 LLDB_INSTRUMENT_VA(this, src, dst);
501
502 SBError sb_error;
503 PlatformSP platform_sp(GetSP());
504 if (platform_sp) {
505 sb_error.ref() = platform_sp->GetFile(src.ref(), dst.ref());
506 } else {
507 sb_error = Status::FromErrorString("invalid platform");
508 }
509 return sb_error;
510}
511
513 LLDB_INSTRUMENT_VA(this, src, dst);
514 return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
515 if (src.Exists()) {
516 uint32_t permissions = FileSystem::Instance().GetPermissions(src.ref());
517 if (permissions == 0) {
518 if (FileSystem::Instance().IsDirectory(src.ref()))
519 permissions = eFilePermissionsDirectoryDefault;
520 else
521 permissions = eFilePermissionsFileDefault;
522 }
523
524 return platform_sp->PutFile(src.ref(), dst.ref(), permissions);
525 }
526
528 "'src' argument doesn't exist: '%s'", src.ref().GetPath().c_str());
529 });
530}
531
533 LLDB_INSTRUMENT_VA(this, src, dst);
534 return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
535 if (src.Exists())
536 return platform_sp->Install(src.ref(), dst.ref());
537
540 "'src' argument doesn't exist: '%s'", src.ref().GetPath().c_str());
541 return error;
542 });
543}
544
546 LLDB_INSTRUMENT_VA(this, shell_command);
547 return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
548 const char *command = shell_command.GetCommand();
549 if (!command)
550 return Status::FromErrorString("invalid shell command (empty)");
551
552 if (shell_command.GetWorkingDirectory() == nullptr) {
553 std::string platform_working_dir =
554 platform_sp->GetWorkingDirectory().GetPath();
555 if (!platform_working_dir.empty())
556 shell_command.SetWorkingDirectory(platform_working_dir.c_str());
557 }
558 return platform_sp->RunShellCommand(
559 shell_command.m_opaque_ptr->m_shell, command,
560 FileSpec(shell_command.GetWorkingDirectory()),
561 &shell_command.m_opaque_ptr->m_status,
562 &shell_command.m_opaque_ptr->m_signo,
563 &shell_command.m_opaque_ptr->m_output, nullptr,
564 shell_command.m_opaque_ptr->m_timeout);
565 });
566}
567
569 LLDB_INSTRUMENT_VA(this, launch_info);
570 return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
571 ProcessLaunchInfo info = launch_info.ref();
572 Status error = platform_sp->LaunchProcess(info);
573 launch_info.set_ref(info);
574 return error;
575 });
576}
577
579 const SBDebugger &debugger, SBTarget &target,
580 SBError &error) {
581 LLDB_INSTRUMENT_VA(this, attach_info, debugger, target, error);
582
583 if (PlatformSP platform_sp = GetSP()) {
584 if (platform_sp->IsConnected()) {
585 ProcessAttachInfo &info = attach_info.ref();
586 Status status;
587 ProcessSP process_sp = platform_sp->Attach(info, debugger.ref(),
588 target.GetSP().get(), status);
589 error.SetError(std::move(status));
590 return SBProcess(process_sp);
591 }
592
593 error = Status::FromErrorString("not connected");
594 return {};
595 }
596
597 error = Status::FromErrorString("invalid platform");
598 return {};
599}
600
602 if (PlatformSP platform_sp = GetSP()) {
603 if (platform_sp->IsConnected()) {
604 ProcessInstanceInfoList list = platform_sp->GetAllProcesses();
605 return SBProcessInfoList(list);
606 }
607 error = Status::FromErrorString("not connected");
608 return {};
609 }
610
611 error = Status::FromErrorString("invalid platform");
612 return {};
613}
614
616 LLDB_INSTRUMENT_VA(this, pid);
617 return ExecuteConnected([&](const lldb::PlatformSP &platform_sp) {
618 return platform_sp->KillProcess(pid);
619 });
620}
621
623 const std::function<Status(const lldb::PlatformSP &)> &func) {
624 SBError sb_error;
625 const auto platform_sp(GetSP());
626 if (platform_sp) {
627 if (platform_sp->IsConnected())
628 sb_error.ref() = func(platform_sp);
629 else
630 sb_error = Status::FromErrorString("not connected");
631 } else
632 sb_error = Status::FromErrorString("invalid platform");
633
634 return sb_error;
635}
636
637SBError SBPlatform::MakeDirectory(const char *path, uint32_t file_permissions) {
638 LLDB_INSTRUMENT_VA(this, path, file_permissions);
639
640 SBError sb_error;
641 PlatformSP platform_sp(GetSP());
642 if (platform_sp) {
643 sb_error.ref() =
644 platform_sp->MakeDirectory(FileSpec(path), file_permissions);
645 } else {
646 sb_error = Status::FromErrorString("invalid platform");
647 }
648 return sb_error;
649}
650
651uint32_t SBPlatform::GetFilePermissions(const char *path) {
652 LLDB_INSTRUMENT_VA(this, path);
653
654 PlatformSP platform_sp(GetSP());
655 if (platform_sp) {
656 uint32_t file_permissions = 0;
657 platform_sp->GetFilePermissions(FileSpec(path), file_permissions);
658 return file_permissions;
659 }
660 return 0;
661}
662
664 uint32_t file_permissions) {
665 LLDB_INSTRUMENT_VA(this, path, file_permissions);
666
667 SBError sb_error;
668 PlatformSP platform_sp(GetSP());
669 if (platform_sp) {
670 sb_error.ref() =
671 platform_sp->SetFilePermissions(FileSpec(path), file_permissions);
672 } else {
673 sb_error = Status::FromErrorString("invalid platform");
674 }
675 return sb_error;
676}
677
679 LLDB_INSTRUMENT_VA(this);
680
681 if (auto platform_sp = GetSP())
682 return SBUnixSignals{platform_sp};
683
684 return SBUnixSignals();
685}
686
688 LLDB_INSTRUMENT_VA(this);
689 PlatformSP platform_sp(GetSP());
690
691 if (platform_sp) {
692 return SBEnvironment(platform_sp->GetEnvironment());
693 }
694
695 return SBEnvironment();
696}
697
699 lldb::SBPlatformLocateModuleCallback callback, void *callback_baton) {
700 LLDB_INSTRUMENT_VA(this, callback, callback_baton);
701 PlatformSP platform_sp(GetSP());
702 if (!platform_sp)
703 return SBError("invalid platform");
704
705 if (!callback) {
706 // Clear the callback.
707 platform_sp->SetLocateModuleCallback(nullptr);
708 return SBError();
709 }
710
711 // Platform.h does not accept lldb::SBPlatformLocateModuleCallback directly
712 // because of the SBModuleSpec and SBFileSpec dependencies. Use a lambda to
713 // convert ModuleSpec/FileSpec <--> SBModuleSpec/SBFileSpec for the callback
714 // arguments.
715 platform_sp->SetLocateModuleCallback(
716 [callback, callback_baton](const ModuleSpec &module_spec,
717 FileSpec &module_file_spec,
718 FileSpec &symbol_file_spec) {
719 SBModuleSpec module_spec_sb(module_spec);
720 SBFileSpec module_file_spec_sb;
721 SBFileSpec symbol_file_spec_sb;
722
723 SBError error = callback(callback_baton, module_spec_sb,
724 module_file_spec_sb, symbol_file_spec_sb);
725
726 if (error.Success()) {
727 module_file_spec = module_file_spec_sb.ref();
728 symbol_file_spec = symbol_file_spec_sb.ref();
729 }
730
731 return error.ref().Clone();
732 });
733 return SBError();
734}
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_INSTRUMENT()
#define LLDB_INSTRUMENT_VA(...)
lldb_private::ProcessAttachInfo & ref()
lldb_private::Debugger & ref() const
lldb_private::Status & ref()
Definition SBError.cpp:191
const lldb_private::FileSpec & ref() const
bool Exists() const
void set_ref(const lldb_private::ProcessLaunchInfo &info)
const lldb_private::ProcessLaunchInfo & ref() const
PlatformConnectOptions * m_opaque_ptr
Definition SBPlatform.h:52
const char * GetLocalCacheDirectory()
SBPlatformConnectOptions(const char *url)
void EnableRsync(const char *options, const char *remote_path_prefix, bool omit_remote_hostname)
SBPlatformConnectOptions & operator=(const SBPlatformConnectOptions &rhs)
void SetURL(const char *url)
void SetLocalCacheDirectory(const char *path)
SBPlatformShellCommand & operator=(const SBPlatformShellCommand &rhs)
void SetCommand(const char *shell_command)
void SetShell(const char *shell)
PlatformShellCommand * m_opaque_ptr
Definition SBPlatform.h:93
void SetTimeoutSeconds(uint32_t sec)
void SetWorkingDirectory(const char *path)
const char * GetWorkingDirectory()
SBPlatformShellCommand(const char *shell, const char *shell_command)
SBError ExecuteConnected(const std::function< lldb_private::Status(const lldb::PlatformSP &)> &func)
const char * GetName()
SBError Kill(const lldb::pid_t pid)
lldb::PlatformSP GetSP() const
bool IsHost() const
Returns true if this platform is the host platform, otherwise false.
SBError Launch(SBLaunchInfo &launch_info)
uint32_t GetOSMinorVersion()
uint32_t GetOSUpdateVersion()
bool IsValid() const
const char * GetTriple()
SBProcessInfoList GetAllProcesses(SBError &error)
uint32_t GetOSMajorVersion()
SBError ConnectRemote(SBPlatformConnectOptions &connect_options)
friend class SBDebugger
Definition SBPlatform.h:196
friend class SBTarget
Definition SBPlatform.h:197
void SetSDKRoot(const char *sysroot)
static SBPlatform GetHostPlatform()
SBEnvironment GetEnvironment()
Return the environment variables of the remote platform connection process.
SBError SetFilePermissions(const char *path, uint32_t file_permissions)
SBError MakeDirectory(const char *path, uint32_t file_permissions=eFilePermissionsDirectoryDefault)
SBUnixSignals GetUnixSignals() const
SBError Run(SBPlatformShellCommand &shell_command)
SBError SetLocateModuleCallback(lldb::SBPlatformLocateModuleCallback callback, void *callback_baton)
Set a callback as an implementation for locating module in order to implement own module cache system...
SBPlatform & operator=(const SBPlatform &rhs)
const char * GetOSDescription()
SBProcess Attach(SBAttachInfo &attach_info, const SBDebugger &debugger, SBTarget &target, SBError &error)
void SetSP(const lldb::PlatformSP &platform_sp)
const char * GetHostname()
lldb::PlatformSP m_opaque_sp
Definition SBPlatform.h:207
SBError Put(SBFileSpec &src, SBFileSpec &dst)
uint32_t GetFilePermissions(const char *path)
const char * GetWorkingDirectory()
SBError Get(SBFileSpec &src, SBFileSpec &dst)
const char * GetOSBuild()
SBError Install(SBFileSpec &src, SBFileSpec &dst)
bool SetWorkingDirectory(const char *path)
lldb::TargetSP GetSP() const
Definition SBTarget.cpp:600
An architecture specification class.
Definition ArchSpec.h:32
bool IsValid() const
Tests if this ArchSpec is valid.
Definition ArchSpec.h:375
llvm::Triple & GetTriple()
Architecture triple accessor.
Definition ArchSpec.h:465
A command line argument class.
Definition Args.h:33
void AppendArgument(llvm::StringRef arg_str, char quote_char='\0')
Appends a new argument to the end of the list argument list.
Definition Args.cpp:332
A uniqued constant string class.
Definition ConstString.h:40
A file utility class.
Definition FileSpec.h:56
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
Definition FileSpec.cpp:380
uint32_t GetPermissions(const FileSpec &file_spec) const
Return the current permissions of the given file.
static FileSystem & Instance()
static lldb::PlatformSP Create(llvm::StringRef name)
Definition Platform.cpp:321
static lldb::PlatformSP GetHostPlatform()
Get the native host platform plug-in.
Definition Platform.cpp:150
An error handling class.
Definition Status.h:118
static Status FromErrorStringWithFormat(const char *format,...) __attribute__((format(printf
Definition Status.cpp:106
static Status FromErrorString(const char *str)
Definition Status.h:141
const char * Intern(llvm::StringRef str) const
Definition StringPool.h:78
const char * InternNonEmpty(llvm::StringRef str) const
Like Intern, but an empty string yields nullptr.
Definition StringPool.h:81
static StringPoolRef GetSystemPool()
The system pool. Only valid between Initialize and Terminate.
#define UINT32_MAX
A class that represents a running process on the host machine.
std::vector< ProcessInstanceInfo > ProcessInstanceInfoList
Definition Host.h:32
class LLDB_API SBProcessInfoList
Definition SBDefines.h:101
lldb::SBError(* SBPlatformLocateModuleCallback)(void *baton, const lldb::SBModuleSpec &module_spec, lldb::SBFileSpec &module_file_spec, lldb::SBFileSpec &symbol_file_spec)
Definition SBDefines.h:155
std::shared_ptr< lldb_private::Platform > PlatformSP
class LLDB_API SBUnixSignals
Definition SBDefines.h:143
class LLDB_API SBProcess
Definition SBDefines.h:99
std::shared_ptr< lldb_private::Process > ProcessSP
uint64_t pid_t
Definition lldb-types.h:84
class LLDB_API SBEnvironment
Definition SBDefines.h:69
class LLDB_API SBError
Definition SBDefines.h:70
PlatformConnectOptions(const char *url=nullptr)
std::string m_rsync_remote_path_prefix
~PlatformConnectOptions()=default
bool m_rsync_omit_hostname_from_remote_path
std::string m_rsync_options
ConstString m_local_cache_directory
PlatformShellCommand(llvm::StringRef shell_command=llvm::StringRef())
std::string m_command
std::string m_working_dir
Timeout< std::ratio< 1 > > m_timeout
PlatformShellCommand(llvm::StringRef shell_interpreter, llvm::StringRef shell_command)
~PlatformShellCommand()=default