summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/posix
Commit message (Collapse)AuthorAgeFilesLines
...
* Moved Args::StringToXIntYZ to StringConvert::ToXIntYZVince Harron2015-01-151-1/+2
| | | | | | | | | | The refactor was motivated by some comments that Greg made http://reviews.llvm.org/D6918 and also to break a dependency cascade that caused functions linking in string->int conversion functions to pull in most of lldb llvm-svn: 226199
* 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
* Fix being able to get a thread result when calling HostThreadPosix::Join(). ↵Greg Clayton2015-01-061-2/+5
| | | | | | | | It was broken when initially checked in by getting the thread result into a temporary variable and never doing anything with it. Most threads in LLDB don't look at their thread results, but launching processes in a terminal window on MacOSX does require getting a thread result and this broke "process launch --tty" on darwin. <rdar://problem/19308966> llvm-svn: 225224
* 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-172-65/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-212-2/+39
| | | | | | | | pipe handles should be inherited by a child process. http://reviews.llvm.org/D6348 llvm-svn: 222541
* Apply SOCK_CLOEXEC flag to socket API functions in order to avoid handle ↵Oleksiy Vyalov2014-11-141-7/+21
| | | | | | | | leakage to a forked child process. http://reviews.llvm.org/D6204 llvm-svn: 222004
* Remove LLDB_DEFAULT_SHELL #define, and determine this at runtime.Zachary Turner2014-10-201-0/+6
| | | | | | | Differential Revision: http://reviews.llvm.org/D5805 Reviewed by: Greg Clayton llvm-svn: 220217
* Create a process launcher abstraction.Zachary Turner2014-10-142-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements Host::LaunchProcess for windows, and in doing so does some minor refactor to move towards a more modular process launching design. The original motivation for this is that launching processes on windows needs some very windows specific code, which would live most appropriately in source/Host/windows somewhere. However, there is already some common code that all platforms use when launching a process before delegating to the platform specific stuff, which lives in source/Host/common/Host.cpp which would be nice to reuse without duplicating. This commonality has been abstracted into MonitoringProcessLauncher, a class which abstracts out the notion of launching a process using an arbitrary algorithm, and then monitoring it for state changes. The windows specific launching code lives in ProcessLauncherWindows, and the posix specific launching code lives in ProcessLauncherPosix. When launching a process MonitoringProcessLauncher is created, and then an appropriate delegate launcher is created and given to the MonitoringProcessLauncher. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5781 llvm-svn: 219731
* 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
* Move ConnectionFileDescriptor to platform-specific Host directory.Zachary Turner2014-10-061-0/+780
| | | | | | | | | | | | As part of getting ConnectionFileDescriptor working on Windows, there is going to be alot of platform specific work to be done. As a result, the implementation is moving into Host. This patch performs the code move and fixes up call-sites appropriately. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5548 llvm-svn: 219143
* Fixup some minor issues with HostProcess.Zachary Turner2014-09-301-0/+3
| | | | llvm-svn: 218684
* Enable llgs to build against experimental Android AOSP ↵Todd Fiala2014-09-272-0/+8
| | | | | | | | | | | | lldb/llvm/clang/compiler-rt repos. See http://reviews.llvm.org/D5495 for more details. These are changes that are part of an effort to support building llgs, within the AOSP source tree, using the Android.mk build system, when using the llvm/clang/lldb git repos from AOSP replaced with the experimental ones currently in github.com/tfiala/aosp-{llvm,clang,lldb,compiler-rt}. llvm-svn: 218568
* Fix up the HostThread interface, making the interface simpler.Zachary Turner2014-09-231-9/+13
| | | | | | | Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D5417 llvm-svn: 218325
* Add missing constructor definition.Zachary Turner2014-09-111-0/+5
| | | | llvm-svn: 217634
* Update HostProcess to use the same facade pattern as HostThread.Zachary Turner2014-09-111-18/+16
| | | | llvm-svn: 217632
* Create a HostThread abstraction.Zachary Turner2014-09-091-0/+63
| | | | | | | | | | | | | This patch moves creates a thread abstraction that represents a thread running inside the LLDB process. This is a replacement for otherwise using lldb::thread_t, and provides a platform agnostic interface to managing these threads. Differential Revision: http://reviews.llvm.org/D5198 Reviewed by: Jim Ingham llvm-svn: 217460
* Fix configure & make build with python disabledKeno Fischer2014-09-091-0/+4
| | | | | | | | | | | | | This makes sure that nothing that requires Python is being built when the LLDB_DISABLE_PYTHON flag is being passed in. It also changes a use of CPPFLAGS to CPP.Flags since the former is overridden when external flags are passed in while the later is not. I'm not sure exactly why LLDB_DISABLE_PYTHON is in CXXFLAGS rather than CPPFLAGS, but cleaning that up is for another commit. Differential Revision: http://reviews.llvm.org/D4918 llvm-svn: 217414
* Fix linker error due to missing static variable instantiation.Zachary Turner2014-08-271-0/+2
| | | | llvm-svn: 216612
* Create a HostProcess class.Zachary Turner2014-08-271-0/+101
| | | | | | | | | | | This is a lightweight wrapper around a pid. It is intended to be lightweight enough to serve as a replacement anywhere we currently store a pid. It provides convenience methods and common process operations. This patch does not yet make use of HostProcess anywhere. llvm-svn: 216607
* Change back all paths returns for lldb::PathType enumerations from ↵Greg Clayton2014-08-251-3/+4
| | | | | | HostInfo::GetLLDBPath() to return the directories in the FileSpec.m_directory field to match previous implementations. This change previously broke some path stuff in upstream branches. llvm-svn: 216398
* Move the rest of the HostInfo functions over.Zachary Turner2014-08-211-0/+24
| | | | | | | | | This should bring HostInfo up to 99% completion. The remainder of code in Host will be split into instantiatable classes representing host processes, threads, dynamic libraries, and process launching strategies. llvm-svn: 216230
* Fix compile error on Linux due to previous commit.Zachary Turner2014-08-211-2/+2
| | | | llvm-svn: 216227
* Move GetUsername and GetGroupname to HostInfoPosixZachary Turner2014-08-211-1/+54
| | | | llvm-svn: 216210
* Move Host::GetLLDBPath to HostInfo.Zachary Turner2014-08-211-0/+76
| | | | | | | | This continues the effort to get Host code moved over to HostInfo, and removes many more instances of preprocessor defines along the way. llvm-svn: 216195
* Move some Host logic into HostInfo class.Zachary Turner2014-08-191-0/+39
| | | | | | | | | | | | | | | | | | This patch creates a HostInfo class, a static class used to answer basic queries about the host platform. As part of this change, some functionality is moved from Host to HostInfo, and relevant fixups are performed in the rest of the codebase. This is part of a larger effort to isolate more code in the Host layer into platform-specific groups, to make it easier to make platform specific changes for a particular Host without breaking other hosts. Reviewed by: Greg Clayton Differential Revision: http://reviews.llvm.org/D4963 llvm-svn: 215992
* In the CMake build, convert lldbHost to be a single static library.Zachary Turner2014-08-151-5/+0
| | | | | | | | | Previously lldbHost was built as multiple static libraries such as lldbHostCommon, lldbHostLinux, etc. With this patch, the CMake build produces only a single static library, lldbHost, whose file set is dynamically created based on the platform. llvm-svn: 215792
* Try to fix the Make buildZachary Turner2014-08-151-0/+14
| | | | llvm-svn: 215782
* Move FileSystem functions out of Host and into their own classes.Zachary Turner2014-08-152-0/+206
| | | | | | | | | | | | | | | | More specifically, this change can be summarized as follows: 1) Makes an lldbHostPosix library which contains code common to all posix platforms. 2) Creates Host/FileSystem.h which defines a common FileSystem interface. 3) Implements FileSystem.h in Host/windows and Host/posix. 4) Creates Host/FileCache.h, implemented in Host/common, which defines a class useful for storing handles to open files needed by the debugger. Differential Revision: http://reviews.llvm.org/D4889 llvm-svn: 215775
* Patch from Jay Cornwall that modifies the LLDB "Host" layer to reuse moreGreg Clayton2010-09-073-372/+0
| | | | | | code between linux, darwin and BSD. llvm-svn: 113263
* Fixed a case where we might be able to acquire a mutex with a try lock andGreg Clayton2010-09-031-5/+11
| | | | | | not release it by making sure a mutex locker object is appropriately used. llvm-svn: 112996
* Merged Eli Friedman's linux build changes where he added Makefile files thatGreg Clayton2010-07-091-0/+14
| | | | | | | enabled LLVM make style building and made this compile LLDB on Mac OS X. We can now iterate on this to make the build work on both linux and macosx. llvm-svn: 108009
* Move posix specific files into posix subdirectory so they canGreg Clayton2010-06-142-0/+352
be shared with linux. Updated Xcode project. llvm-svn: 105928
OpenPOWER on IntegriCloud