[Lldb-commits] [PATCH] D13293: Trim the output of mktem in PlatformAndroid::DownloadSymbolFile

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 30 08:36:04 PDT 2015


tberghammer created this revision.
tberghammer added a reviewer: ovyalov.
tberghammer added a subscriber: lldb-commits.
Herald added subscribers: danalbert, tberghammer.

Trim the output of mktem in PlatformAndroid::DownloadSymbolFile

http://reviews.llvm.org/D13293

Files:
  source/Plugins/Platform/Android/PlatformAndroid.cpp

Index: source/Plugins/Platform/Android/PlatformAndroid.cpp
===================================================================
--- source/Plugins/Platform/Android/PlatformAndroid.cpp
+++ source/Plugins/Platform/Android/PlatformAndroid.cpp
@@ -331,7 +331,7 @@
     Error error = adb.Shell("mktemp --directory --tmpdir /data/local/tmp", 5000 /* ms */, &tmpdir);
     if (error.Fail() || tmpdir.empty())
         return Error("Failed to generate temporary directory on the device (%s)", error.AsCString());
-    tmpdir.erase(tmpdir.size() - 1); // Remove trailing new line
+    tmpdir = llvm::StringRef(tmpdir).trim().str();
 
     // Create file remover for the temporary directory created on the device
     std::unique_ptr<std::string, std::function<void(std::string*)>> tmpdir_remover(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13293.36111.patch
Type: text/x-patch
Size: 787 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150930/bba68a0c/attachment.bin>


More information about the lldb-commits mailing list