From 8ada0b9713c00c2dc860da030bc37075a58de378 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Thu, 9 Oct 2014 20:17:53 +0000 Subject: [PATCH] Correctly fix ScriptInterpreterPython::ExecuteOneLine for windows. llvm-svn: 219435 --- lldb/include/lldb/Host/TimeValue.h | 4 ++-- lldb/source/Host/windows/ConnectionGenericFileWindows.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/include/lldb/Host/TimeValue.h b/lldb/include/lldb/Host/TimeValue.h index afef7d1604a9..6de2bfd16a0a 100644 --- a/lldb/include/lldb/Host/TimeValue.h +++ b/lldb/include/lldb/Host/TimeValue.h @@ -100,11 +100,11 @@ public: /// Returns only the fractional portion of the TimeValue rounded down to the /// nearest millisecond (divide by one million). - /// @brief Retrieve the fractional part as milliseconds; + /// @brief Retrieve the milliseconds component; uint32_t milliseconds() const { - return nanoseconds() / NanoSecPerMilliSec; + return m_nano_seconds / NanoSecPerMilliSec; } protected: diff --git a/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp b/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp index 93d379459925..53e22de7ecd1 100644 --- a/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp +++ b/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp @@ -229,7 +229,7 @@ ConnectionGenericFile::Read(void *dst, size_t dst_len, uint32_t timeout_usec, ll // ERROR_OPERATION_ABORTED occurs when someone calls Disconnect() during a blocking read. // This triggers a call to CancelIoEx, which causes the operation to complete and the // result to be ERROR_OPERATION_ABORTED. - if (result_error == ERROR_HANDLE_EOF || result_error == ERROR_OPERATION_ABORTED) + if (result_error == ERROR_HANDLE_EOF || result_error == ERROR_OPERATION_ABORTED || result_error == ERROR_BROKEN_PIPE) return_info.Set(bytes_read, eConnectionStatusEndOfFile, 0); else return_info.Set(bytes_read, eConnectionStatusError, result_error);