diff options
Diffstat (limited to 'lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp')
| -rw-r--r-- | lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp b/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp index 7d701728635..64a320f8c3f 100644 --- a/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp +++ b/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp @@ -28,6 +28,7 @@ using namespace lldb; using namespace lldb_private; using namespace lldb_private::platform_android; +using namespace std::chrono; static uint32_t g_initialize_count = 0; static const unsigned int g_android_default_cache_size = @@ -230,7 +231,7 @@ Error PlatformAndroid::GetFile(const FileSpec &source, char cmd[PATH_MAX]; snprintf(cmd, sizeof(cmd), "cat '%s'", source_file); - return adb.ShellToFile(cmd, 60000 /* ms */, destination); + return adb.ShellToFile(cmd, minutes(1), destination); } Error PlatformAndroid::PutFile(const FileSpec &source, @@ -288,7 +289,7 @@ uint32_t PlatformAndroid::GetSdkVersion() { std::string version_string; AdbClient adb(m_device_id); Error error = - adb.Shell("getprop ro.build.version.sdk", 5000 /* ms */, &version_string); + adb.Shell("getprop ro.build.version.sdk", seconds(5), &version_string); version_string = llvm::StringRef(version_string).trim().str(); if (error.Fail() || version_string.empty()) { @@ -327,7 +328,7 @@ Error PlatformAndroid::DownloadSymbolFile(const lldb::ModuleSP &module_sp, AdbClient adb(m_device_id); std::string tmpdir; Error error = adb.Shell("mktemp --directory --tmpdir /data/local/tmp", - 5000 /* ms */, &tmpdir); + seconds(5), &tmpdir); if (error.Fail() || tmpdir.empty()) return Error("Failed to generate temporary directory on the device (%s)", error.AsCString()); @@ -338,7 +339,7 @@ Error PlatformAndroid::DownloadSymbolFile(const lldb::ModuleSP &module_sp, tmpdir_remover(&tmpdir, [this, &adb](std::string *s) { StreamString command; command.Printf("rm -rf %s", s->c_str()); - Error error = adb.Shell(command.GetData(), 5000 /* ms */, nullptr); + Error error = adb.Shell(command.GetData(), seconds(5), nullptr); Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM)); if (log && error.Fail()) @@ -353,7 +354,7 @@ Error PlatformAndroid::DownloadSymbolFile(const lldb::ModuleSP &module_sp, command.Printf("oatdump --symbolize=%s --output=%s", module_sp->GetPlatformFileSpec().GetCString(false), symfile_platform_filespec.GetCString(false)); - error = adb.Shell(command.GetData(), 60000 /* ms */, nullptr); + error = adb.Shell(command.GetData(), minutes(1), nullptr); if (error.Fail()) return Error("Oatdump failed: %s", error.AsCString()); |

