diff options
| author | Chaoren Lin <chaorenl@google.com> | 2015-04-07 18:45:03 +0000 |
|---|---|---|
| committer | Chaoren Lin <chaorenl@google.com> | 2015-04-07 18:45:03 +0000 |
| commit | 32c7265a1200d5a1462fd654c914b841dcaac5ba (patch) | |
| tree | b0c7f5a2cac38a2afca509680c1d4b0e5ec8290b /lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp | |
| parent | 3d66c863cfd919fe10e56626364c9f9ecadeeedd (diff) | |
| download | bcm5719-llvm-32c7265a1200d5a1462fd654c914b841dcaac5ba.tar.gz bcm5719-llvm-32c7265a1200d5a1462fd654c914b841dcaac5ba.zip | |
Fix bug where an additional O packet is sent after inferior exits.
Summary:
ConnectionFileDescriptor::Read was returning eConnectionStatusError instead of 0
on m_shutting_down, which caused the caller to think that some number of bytes
were read.
Reviewers: jingham, vharron, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8850
llvm-svn: 234341
Diffstat (limited to 'lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp')
| -rw-r--r-- | lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp b/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp index 19ee0fe7544..9946cb42663 100644 --- a/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp +++ b/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp @@ -386,8 +386,12 @@ ConnectionFileDescriptor::Read(void *dst, size_t dst_len, uint32_t timeout_usec, status = eConnectionStatusTimedOut; return 0; } - else if (m_shutting_down) - return eConnectionStatusError; + + if (m_shutting_down) + { + status = eConnectionStatusError; + return 0; + } status = BytesAvailable(timeout_usec, error_ptr); if (status != eConnectionStatusSuccess) |

