311 const char *class_name,
const char *description,
ConstString plugin_name,
312 llvm::SmallVector<llvm::Triple::ArchType, 4> supported_arch,
313 llvm::Triple::OSType preferred_os,
314 llvm::SmallVector<llvm::Triple::OSType, 4> supported_os,
315 llvm::SmallVector<llvm::StringRef, 4> supported_triples,
316 std::string sdk_name_primary, std::string sdk_name_secondary,
322 const char *arch_name;
326 arch_name =
"<null>";
328 const char *triple_cstr =
329 arch ? arch->
GetTriple().getTriple().c_str() :
"<null>";
331 LLDB_LOGF(log,
"%s::%s(force=%s, arch={%s,%s})", class_name, __FUNCTION__,
332 force ?
"true" :
"false", arch_name, triple_cstr);
336 if (!create && arch && arch->
IsValid()) {
337 if (llvm::is_contained(supported_arch, arch->
GetMachine())) {
338 const llvm::Triple &triple = arch->
GetTriple();
339 switch (triple.getVendor()) {
340 case llvm::Triple::Apple:
344#if defined(__APPLE__)
348 case llvm::Triple::UnknownVendor:
357 if (llvm::is_contained(supported_os, triple.getOS()))
359#if defined(__APPLE__)
363 else if (triple.getOS() == llvm::Triple::UnknownOS)
372 LLDB_LOGF(log,
"%s::%s() creating platform", class_name, __FUNCTION__);
375 class_name, description, plugin_name, preferred_os, supported_triples,
376 sdk_name_primary, sdk_name_secondary, sdk_type, kind));
379 LLDB_LOGF(log,
"%s::%s() aborting creation of platform", class_name,
static void ReportError(std::string message, std::optional< lldb::user_id_t > debugger_id=std::nullopt, std::once_flag *>
Report error events.
void SetFile(llvm::StringRef path, Style style)
Change the file specified with a new path.
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
static FileSystem & Instance()
void Resolve(llvm::SmallVectorImpl< char > &path, bool force_make_absolute=false)
Resolve path to make it canonical.
ValueType Set(ValueType mask)
Set one or more flags by logical OR'ing mask with the current flags.
static uint32_t FindProcesses(const ProcessInstanceInfoMatch &match_info, ProcessInstanceInfoList &proc_infos)
static Status GetSharedModule(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr, bool invoke_locate_callback=true, bool invoke_symbol_locators=true)
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
void SetHijackListener(const lldb::ListenerSP &listener_sp)
lldb::ListenerSP GetHijackListener() const
lldb::pid_t GetProcessID() const
void SetProcessID(lldb::pid_t pid)
ArchSpec & GetArchitecture()
void SetLaunchInSeparateProcessGroup(bool separate)
@ invalid_fd
Invalid file descriptor value.
int ReleasePrimaryFileDescriptor()
Release the primary file descriptor.
static Status FromErrorStringWithFormat(const char *format,...) __attribute__((format(printf
static Status FromErrorString(const char *str)
bool Fail() const
Test for error condition.
static Status static Status FromErrorStringWithFormatv(const char *format, Args &&...args)
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Represents UUID's of various sizes.
An abstraction for Xcode-style SDKs that works like ArchSpec.
Type
Different types of Xcode SDKs.
#define LLDB_INVALID_PROCESS_ID
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
std::vector< ProcessInstanceInfo > ProcessInstanceInfoList
std::string toString(FormatterBytecode::OpCodes op)
std::shared_ptr< lldb_private::Platform > PlatformSP
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::Module > ModuleSP