diff options
author | Pavel Labath <labath@google.com> | 2016-11-25 14:43:37 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-11-25 14:43:37 +0000 |
commit | ce8d6d9c6cec171f53ca45d776ad8e85538fbb99 (patch) | |
tree | 37a66485cc83d389596673ae159140cd26524c2f /lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp | |
parent | c9379701758cc74d28f6a94e0e07292fed3a7ff6 (diff) | |
download | bcm5719-llvm-ce8d6d9c6cec171f53ca45d776ad8e85538fbb99.tar.gz bcm5719-llvm-ce8d6d9c6cec171f53ca45d776ad8e85538fbb99.zip |
Fix builds Windows and OSX builds after Connection refactor in r287922
Switch various bits of platform-specific code to chrono that I did not notice
when doing a linux build. This exposed a bug that ConnectionGenericFileWindows
did not handle the magic UINT32_MAX timeout value (instead it waited for about an
hour, which is close enough I guess). Fix that as well.
llvm-svn: 287927
Diffstat (limited to 'lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp index 50f92680dcd..43e4617feaf 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp @@ -210,8 +210,11 @@ size_t CommunicationKDP::WaitForPacketWithTimeoutMicroSecondsNoLock( bool timed_out = false; while (IsConnected() && !timed_out) { lldb::ConnectionStatus status = eConnectionStatusNoConnection; - size_t bytes_read = - Read(buffer, sizeof(buffer), timeout_usec, status, &error); + size_t bytes_read = Read(buffer, sizeof(buffer), + timeout_usec == UINT32_MAX + ? Timeout<std::micro>(llvm::None) + : std::chrono::microseconds(timeout_usec), + status, &error); if (log) log->Printf("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, " |