diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2021-11-19 20:06:13 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2021-11-19 20:06:13 +0000 |
| commit | c0981da47d5696fe36474fcf86b4ce03ae3ff818 (patch) | |
| tree | f42add1021b9f2ac6a69ac7cf6c4499962739a45 /lldb/source/Target/RemoteAwarePlatform.cpp | |
| parent | 344a3780b2e33f6ca763666c380202b18aab72a3 (diff) | |
Diffstat (limited to 'lldb/source/Target/RemoteAwarePlatform.cpp')
| -rw-r--r-- | lldb/source/Target/RemoteAwarePlatform.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/lldb/source/Target/RemoteAwarePlatform.cpp b/lldb/source/Target/RemoteAwarePlatform.cpp index b0c43ffa839e..eb39fc6db304 100644 --- a/lldb/source/Target/RemoteAwarePlatform.cpp +++ b/lldb/source/Target/RemoteAwarePlatform.cpp @@ -72,8 +72,7 @@ Status RemoteAwarePlatform::ResolveExecutable( } else { if (m_remote_platform_sp) { return GetCachedExecutable(resolved_module_spec, exe_module_sp, - module_search_paths_ptr, - *m_remote_platform_sp); + module_search_paths_ptr); } // We may connect to a process and use the provided executable (Don't use @@ -154,10 +153,10 @@ Status RemoteAwarePlatform::ResolveExecutable( if (error.Fail() || !exe_module_sp) { if (FileSystem::Instance().Readable( resolved_module_spec.GetFileSpec())) { - error.SetErrorStringWithFormat( - "'%s' doesn't contain any '%s' platform architectures: %s", - resolved_module_spec.GetFileSpec().GetPath().c_str(), - GetPluginName().GetCString(), arch_names.GetData()); + error.SetErrorStringWithFormatv( + "'{0}' doesn't contain any '{1}' platform architectures: {2}", + resolved_module_spec.GetFileSpec(), GetPluginName(), + arch_names.GetData()); } else { error.SetErrorStringWithFormat( "'%s' is not readable", @@ -332,18 +331,16 @@ bool RemoteAwarePlatform::GetRemoteOSVersion() { return false; } -bool RemoteAwarePlatform::GetRemoteOSBuildString(std::string &s) { +llvm::Optional<std::string> RemoteAwarePlatform::GetRemoteOSBuildString() { if (m_remote_platform_sp) - return m_remote_platform_sp->GetRemoteOSBuildString(s); - s.clear(); - return false; + return m_remote_platform_sp->GetRemoteOSBuildString(); + return llvm::None; } -bool RemoteAwarePlatform::GetRemoteOSKernelDescription(std::string &s) { +llvm::Optional<std::string> RemoteAwarePlatform::GetRemoteOSKernelDescription() { if (m_remote_platform_sp) - return m_remote_platform_sp->GetRemoteOSKernelDescription(s); - s.clear(); - return false; + return m_remote_platform_sp->GetRemoteOSKernelDescription(); + return llvm::None; } ArchSpec RemoteAwarePlatform::GetRemoteSystemArchitecture() { |
