summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/posix/PipePosix.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Resubmit r298334 after fixing OSX build errors.Zachary Turner2017-03-211-2/+1
| | | | | | | Hopefully this works, I can't test since I don't have Mac hardware, however. llvm-svn: 298340
* Revert r298334 until Zachary has a chance to fix the buildbot failureJason Molenda2017-03-211-1/+2
| | | | | | on macosx. llvm-svn: 298338
* Delete various lldb FileSystem functions.Zachary Turner2017-03-211-2/+1
| | | | | | | | Use LLVM's equivalent versions instead. Differential Revision: https://reviews.llvm.org/D31111 llvm-svn: 298334
* Prevent at compile time converting from Error::success() to Expected<T>Mehdi Amini2016-11-111-1/+1
| | | | | | | | This would trigger an assertion at runtime otherwise. Differential Revision: https://reviews.llvm.org/D26482 llvm-svn: 286562
* Make the Error class constructor protectedMehdi Amini2016-11-111-1/+1
| | | | | | | | | This is forcing to use Error::success(), which is in a wide majority of cases a lot more readable. Differential Revision: https://reviews.llvm.org/D26481 llvm-svn: 286561
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-021-1/+1
| | | | | | | | | | Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-271/+208
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Centralize all select() calls into one place so that we can take advantage ↵Greg Clayton2016-08-101-109/+53
| | | | | | | | | of system specific optimizations to deal with more file descriptors than FD_SETSIZE on some systems. <rdar://problem/25325383> https://reviews.llvm.org/D22950 llvm-svn: 278299
* The pipe2(2) call is supported on NetBSDEd Maste2015-09-141-2/+2
| | | | | | | | Patch by Kamil Rytarowski. Differential Revision: http://reviews.llvm.org/D12746 llvm-svn: 247568
* Prevent from a redefinition of _GLIBCXX_USE_NANOSLEEPStephane Sezer2015-09-091-0/+2
| | | | | | | | | | | | | | Summary: Build warning caught on NetBSD. Reviewers: joerg, sas Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12662 Change by Kamil Rytarowski <n54@gmx.com> llvm-svn: 247114
* Fix for build errors on arm-linux-gnueabi-gccOmair Javaid2015-08-091-0/+4
| | | | | | http://reviews.llvm.org/D11256 llvm-svn: 244419
* Revert "Add Pipe::WriteWithTimeout method"Pavel Labath2015-07-211-10/+6
| | | | | | | | I have observed an increased flakyness in the buildbots. I suspect something was relying on the fact that Pipe::Write had an implicit timeout of 1s, which this commit has removed. Reverting while I investigate. llvm-svn: 242767
* Add Pipe::WriteWithTimeout methodPavel Labath2015-07-211-6/+10
| | | | | | | | | | | | | | | | | | Summary: This commit adds a WriteWithTimeout method to time Pipe class, analogous to the existing ReadWithTimeout(). It also changes the meaning of passing zero as a timeout value. Previously, zero was used as an infinite timeout value. Now, the meaning of zero timeout to return the data avaiable without sleeping (basically, a non-blocking operation). This makes the behaviour of Pipe consistent with the Communication/Connection classes. For blocking operatios with infinite timeout, I introduce a special constant for this purpose. Reviewers: ovyalov, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11358 llvm-svn: 242764
* Refactor many file functions to use FileSpec over strings.Chaoren Lin2015-05-291-1/+1
| | | | | | | | | | | | | | | | | Summary: This should solve the issue of sending denormalized paths over gdb-remote if we stick to GetPath(false) in GDBRemoteCommunicationClient, and let the server handle any denormalization. Reviewers: ovyalov, zturner, vharron, clayborg Reviewed By: clayborg Subscribers: tberghammer, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D9728 llvm-svn: 238604
* PosixPipes should not be copyable but should be movable.Chaoren Lin2015-05-011-1/+19
| | | | | | | | | | | | | | Summary: This addresses Oleksiy's comment in D9307. Reviewers: clayborg, ovyalov Reviewed By: clayborg, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9405 llvm-svn: 236320
* Add file descriptor constructor for PipePosix.Chaoren Lin2015-04-291-13/+4
| | | | llvm-svn: 236133
* Add an unnamed pipe fail-safe to launching lldb-gdbserver.Chaoren Lin2015-04-271-0/+9
| | | | | | | | | | | | | | | | | | Summary: Currently, launching lldb-gdbserver from platform on Android requires root for mkfifo() and an explicit TMPDIR variable. This should remove both requirements. Test Plan: Successfully launched lldb-gdbserver on a non-rooted Android device. Reviewers: tberghammer, vharron, clayborg Reviewed By: clayborg Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D9307 llvm-svn: 235940
* Fix warning about the use of mktemp and make platform agnostic by adding and ↵Oleksiy Vyalov2015-02-051-0/+35
| | | | | | | | using PipeBase::CreateWithUniqueName - on behalf of flackr. http://reviews.llvm.org/D7348 llvm-svn: 228307
* Extend PipePosix with support for named pipes/timeout-based IO and integrate ↵Oleksiy Vyalov2015-01-141-1/+1
| | | | | | | | it with GDBRemoteCommunication / lldb-gdbserver - include reviews fixes. http://reviews.llvm.org/D6954 llvm-svn: 225923
* Extend PipePosix with support for named pipes/timeout-based IO and integrate ↵Oleksiy Vyalov2015-01-131-71/+197
| | | | | | | | it with GDBRemoteCommunication / lldb-gdbserver. http://reviews.llvm.org/D6954 llvm-svn: 225849
* No need to call SetErrorToErrno when pipe2 succeeds.Oleksiy Vyalov2014-12-191-3/+0
| | | | | | http://reviews.llvm.org/D6743 llvm-svn: 224652
* Enhance the Pipe interface for better portability.Zachary Turner2014-12-171-57/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes a number of improvements to the Pipe interface. 1) An interface (PipeBase) is provided which exposes pure virtual methods for any implementation of Pipe to override. While not strictly necessary, this helps catch errors where the interfaces are out of sync. 2) All methods return lldb_private::Error instead of returning bool or void. This allows richer error information to be propagated up to LLDB. 3) A new ReadWithTimeout() method is exposed in the base class and implemented on Windows. 4) Support for both named and anonymous pipes is exposed through the base interface and implemented on Windows. For creating a new pipe, both named and anonymous pipes are supported, and for opening an existing pipe, only named pipes are supported. New methods described in points #3 and #4 are stubbed out on posix, but fully implemented on Windows. These should be implemented by someone on the linux / mac / bsd side. Reviewed by: Greg Clayton, Oleksiy Vyalov Differential Revision: http://reviews.llvm.org/D6686 llvm-svn: 224442
* Extend PipePosix with child_processes_inherit support - to control whether ↵Oleksiy Vyalov2014-11-211-1/+38
| | | | | | | | pipe handles should be inherited by a child process. http://reviews.llvm.org/D6348 llvm-svn: 222541
* Fix deadlock in Python one-line execution.Zachary Turner2014-10-081-0/+145
Python one-line execution was using ConnectionFileDescriptor to do a non-blocking read against a pipe. This won't work on Windows, as CFD is implemented using select(), and select() only works with sockets on Windows. The solution is to use ConnectionGenericFile on Windows, which uses the native API to do overlapped I/O on the pipe. This in turn requires re-implementing Host::Pipe on Windows using native OS handles instead of the more portable _pipe CRT api. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5679 llvm-svn: 219339
OpenPOWER on IntegriCloud