[Lldb-commits] [PATCH] Increase the timeout for pwrite on android

Tamas Berghammer tberghammer at google.com
Fri Feb 20 07:37:14 PST 2015


Hi vharron, ovyalov,

Increase the timeout for pwrite on android

The increase is necessary because with the default timeout pwrite often times out on android. Most likely it happens when a new page is created on the device.

http://reviews.llvm.org/D7788

Files:
  source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
  source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h

Index: source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
===================================================================
--- source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
+++ source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
@@ -222,3 +222,16 @@
 
     return PlatformRemoteGDBServer::DisconnectRemote ();
 }
+
+uint64_t
+PlatformAndroidRemoteGDBServer::WriteFile (lldb::user_id_t fd,
+                                           uint64_t offset,
+                                           const void* src,
+                                           uint64_t src_len,
+                                           Error &error)
+{
+    uint32_t old_packet_timeout = m_gdb_client.SetPacketTimeout (5);
+    uint64_t res = PlatformRemoteGDBServer::WriteFile (fd, offset, src, src_len, error);
+    m_gdb_client.SetPacketTimeout (old_packet_timeout);
+    return res;
+}
Index: source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h
===================================================================
--- source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h
+++ source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h
@@ -33,6 +33,13 @@
     lldb_private::Error
     DisconnectRemote () override;
 
+    uint64_t
+    WriteFile (lldb::user_id_t fd,
+               uint64_t offset,
+               const void* data,
+               uint64_t len,
+               lldb_private::Error &error) override;
+
 protected:
     std::map<lldb::pid_t, std::pair<uint16_t, std::string>> m_port_forwards;

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7788.20401.patch
Type: text/x-patch
Size: 1580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150220/ae84108e/attachment.bin>


More information about the lldb-commits mailing list