47 FileSpec::Style::native);
63 if (permissions && (permissions & eFilePermissionsEveryoneR) == 0)
64 error.SetErrorStringWithFormat(
65 "executable '%s' is not readable",
68 error.SetErrorStringWithFormat(
69 "unable to find executable for '%s'",
75 module_search_paths_ptr);
87 error.SetErrorStringWithFormat(
"the platform is not currently "
88 "connected, and '%s' doesn't exist in "
93 if (
error.Success()) {
96 module_search_paths_ptr,
nullptr,
nullptr);
101 llvm::Triple &module_triple =
103 bool is_vendor_specified =
104 (module_triple.getVendor() != llvm::Triple::UnknownVendor);
105 bool is_os_specified =
106 (module_triple.getOS() != llvm::Triple::UnknownOS);
107 if (!is_vendor_specified || !is_os_specified) {
108 const llvm::Triple &host_triple =
109 HostInfo::GetArchitecture(HostInfo::eArchKindDefault).GetTriple();
111 if (!is_vendor_specified)
112 module_triple.setVendorName(host_triple.getVendorName());
113 if (!is_os_specified)
114 module_triple.setOSName(host_triple.getOSName());
117 exe_module_sp, module_search_paths_ptr,
nullptr,
nullptr);
122 if (
error.Fail() || !exe_module_sp || !exe_module_sp->GetObjectFile()) {
123 exe_module_sp.reset();
124 error.SetErrorStringWithFormat(
125 "'%s' doesn't contain the architecture %s",
134 llvm::ListSeparator LS;
140 module_search_paths_ptr,
nullptr,
nullptr);
142 if (
error.Success()) {
143 if (exe_module_sp && exe_module_sp->GetObjectFile())
146 error.SetErrorToGenericError();
149 arch_names << LS << arch.GetArchitectureName();
152 if (
error.Fail() || !exe_module_sp) {
155 error.SetErrorStringWithFormatv(
156 "'{0}' doesn't contain any '{1}' platform architectures: {2}",
160 error.SetErrorStringWithFormat(
161 "'%s' is not readable",
172 llvm::StringRef command,
const FileSpec &working_dir,
int *status_ptr,
173 int *signo_ptr, std::string *command_output,
175 return RunShellCommand(llvm::StringRef(), command, working_dir, status_ptr,
176 signo_ptr, command_output, timeout);
180 llvm::StringRef shell, llvm::StringRef command,
const FileSpec &working_dir,
181 int *status_ptr,
int *signo_ptr, std::string *command_output,
185 status_ptr, signo_ptr,
186 command_output, timeout);
188 signo_ptr, command_output, timeout);
192 uint32_t file_permissions) {
199 uint32_t &file_permissions) {
207 uint32_t file_permissions) {
229 void *dst, uint64_t dst_len,
237 const void *src, uint64_t src_len,
290 const UUID *uuid_ptr,
297 local_file = platform_file;
367 llvm::StringRef plugin_name,
373 debugger, target,
error);
static llvm::raw_ostream & error(Stream &strm)
An architecture specification class.
bool IsValid() const
Tests if this ArchSpec is valid.
llvm::Triple & GetTriple()
Architecture triple accessor.
const char * GetArchitectureName() const
Returns a static string representing the current architecture.
A class to manage flag bits.
void SetFile(llvm::StringRef path, Style style, const Checksum &checksum={})
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.
void Resolve(llvm::SmallVectorImpl< char > &path)
Resolve path to make it canonical.
bool ResolveExecutableLocation(FileSpec &file_spec)
Call into the Host to see if it can help find the file.
uint32_t GetPermissions(const FileSpec &file_spec) const
Return the current permissions of the given file.
static FileSystem & Instance()
static bool ResolveExecutableInBundle(FileSpec &file)
When executable files may live within a directory, where the directory represents an executable bundl...
static Status GetSharedModule(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr, bool always_create=false)
ArchSpec & GetArchitecture()
virtual llvm::StringRef GetPluginName()=0
const char * GetData() const
An abstract interface for things that know how to map numeric user/group IDs into names.
A class that represents a running process on the host machine.
std::vector< ProcessInstanceInfo > ProcessInstanceInfoList
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::Module > ModuleSP