diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
| commit | f73363f1dd94996356cefbf24388f561891acf0b (patch) | |
| tree | e3c31248bdb36eaec5fd833490d4278162dba2a0 /source/Plugins/Platform/Android/PlatformAndroid.cpp | |
| parent | 160ee69dd7ae18978f4068116777639ea98dc951 (diff) | |
Notes
Diffstat (limited to 'source/Plugins/Platform/Android/PlatformAndroid.cpp')
| -rw-r--r-- | source/Plugins/Platform/Android/PlatformAndroid.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/source/Plugins/Platform/Android/PlatformAndroid.cpp b/source/Plugins/Platform/Android/PlatformAndroid.cpp index 5b85bcdf7fdd..1cedcde97a92 100644 --- a/source/Plugins/Platform/Android/PlatformAndroid.cpp +++ b/source/Plugins/Platform/Android/PlatformAndroid.cpp @@ -83,9 +83,9 @@ PlatformSP PlatformAndroid::CreateInstance(bool force, const ArchSpec *arch) { break; #if defined(__ANDROID__) - // Only accept "unknown" for the vendor if the host is android and - // it "unknown" wasn't specified (it was just returned because it - // was NOT specified_ + // Only accept "unknown" for the vendor if the host is android and it + // "unknown" wasn't specified (it was just returned because it was NOT + // specified_ case llvm::Triple::VendorType::UnknownVendor: create = !arch->TripleVendorWasSpecified(); break; @@ -100,9 +100,9 @@ PlatformSP PlatformAndroid::CreateInstance(bool force, const ArchSpec *arch) { break; #if defined(__ANDROID__) - // Only accept "unknown" for the OS if the host is android and - // it "unknown" wasn't specified (it was just returned because it - // was NOT specified) + // Only accept "unknown" for the OS if the host is android and it + // "unknown" wasn't specified (it was just returned because it was NOT + // specified) case llvm::Triple::OSType::UnknownOS: create = !arch->TripleOSWasSpecified(); break; @@ -193,8 +193,7 @@ Status PlatformAndroid::GetFile(const FileSpec &source, if (IsHost() || !m_remote_platform_sp) return PlatformLinux::GetFile(source, destination); - FileSpec source_spec(source.GetPath(false), false, - FileSpec::ePathSyntaxPosix); + FileSpec source_spec(source.GetPath(false), false, FileSpec::Style::posix); if (source_spec.IsRelative()) source_spec = GetRemoteWorkingDirectory().CopyByAppendingPathComponent( source_spec.GetCString(false)); @@ -222,8 +221,8 @@ Status PlatformAndroid::GetFile(const FileSpec &source, if (strchr(source_file, '\'') != nullptr) return Status("Doesn't support single-quotes in filenames"); - // mode == 0 can signify that adbd cannot access the file - // due security constraints - try "cat ..." as a fallback. + // mode == 0 can signify that adbd cannot access the file due security + // constraints - try "cat ..." as a fallback. AdbClient adb(m_device_id); char cmd[PATH_MAX]; @@ -239,7 +238,7 @@ Status PlatformAndroid::PutFile(const FileSpec &source, return PlatformLinux::PutFile(source, destination, uid, gid); FileSpec destination_spec(destination.GetPath(false), false, - FileSpec::ePathSyntaxPosix); + FileSpec::Style::posix); if (destination_spec.IsRelative()) destination_spec = GetRemoteWorkingDirectory().CopyByAppendingPathComponent( destination_spec.GetCString(false)); @@ -306,7 +305,7 @@ Status PlatformAndroid::DownloadSymbolFile(const lldb::ModuleSP &module_sp, const FileSpec &dst_file_spec) { // For oat file we can try to fetch additional debug info from the device ConstString extension = module_sp->GetFileSpec().GetFileNameExtension(); - if (extension != ConstString("oat") && extension != ConstString("odex")) + if (extension != ConstString(".oat") && extension != ConstString(".odex")) return Status( "Symbol file downloading only supported for oat and odex files"); @@ -361,10 +360,8 @@ Status PlatformAndroid::DownloadSymbolFile(const lldb::ModuleSP &module_sp, } bool PlatformAndroid::GetRemoteOSVersion() { - m_major_os_version = GetSdkVersion(); - m_minor_os_version = 0; - m_update_os_version = 0; - return m_major_os_version != 0; + m_os_version = llvm::VersionTuple(GetSdkVersion()); + return !m_os_version.empty(); } llvm::StringRef |
