[Lldb-commits] [PATCH] D13162: Change oat symbolization code for android to work on non-rooted devices

Oleksiy Vyalov via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 25 14:13:15 PDT 2015


ovyalov accepted this revision.
ovyalov added a comment.
This revision is now accepted and ready to land.

Minor comments


================
Comment at: source/Plugins/Platform/Android/AdbClient.cpp:231
@@ +230,3 @@
+
+        size_t n = m_conn.Read(buffer, sizeof(buffer), 1000 * (timeout_ms - elapsed_time), status, &error);
+        message.insert(message.end(), &buffer[0], &buffer[n]);
----------------
Could you add checks for error and that n > 0?

================
Comment at: source/Plugins/Platform/Android/PlatformAndroid.cpp:340
@@ -346,1 +339,3 @@
         [this](std::string* s) {
+            AdbClient adb(m_device_id);
+
----------------
Could you reuse adb variable defined before - e.g., wrap with shared_ptr? 

================
Comment at: source/Plugins/Platform/Android/PlatformAndroid.cpp:361
@@ +360,3 @@
+    std::string output;
+    error = adb.Shell(command.GetData(), 60000 /* ms */, &output);
+    if (error.Fail())
----------------
s/&output/nullptr ?


http://reviews.llvm.org/D13162





More information about the lldb-commits mailing list