summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/linux/ProcessLauncherLinux.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Transform ProcessLauncherLinux to ProcessLauncherPosixForkKamil Rytarowski2017-02-011-225/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Use ProcessLauncherPosixFork in Linux and NetBSD. Changes to ProcessLauncherLinux: - Limit personality.h and ASLR code to Linux. - Reuse portable ptrace(2) PT_TRACE_ME operation available on Linux and BSDs. - Limit ETXTBSY error path from execve(2) to Linux. - In LaunchProcess declaration change virtual to override. This code should be readily available for FreeBSD. Sponsored by <The NetBSD Foundation> Reviewers: joerg, clayborg, labath, emaste Reviewed By: labath Subscribers: danalbert, srhines, mgorny, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29347 llvm-svn: 293768
* Fix android build for r292935 (personality.h)Pavel Labath2017-01-241-5/+10
| | | | | | | | | | | It turns out things are not as simple as I hoped. sys/personality.h exists on all androids but it does not define the required symbols on all platform levels. Add a compile check for platform level to compile against both new and old android headers. llvm-svn: 292939
* include linux/personality.h on androidPavel Labath2017-01-241-0/+4
| | | | | | | sys/personality.h is present only since android platform level 21. The linux/ version is present everywhere. llvm-svn: 292935
* Replace __ANDROID_NDK__ with __ANDROID__Pavel Labath2016-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: This replaces all the uses of the __ANDROID_NDK__ define with __ANDROID__. This is a preparatory step to remove our custom android toolchain file and rely on the standard android NDK one instead, which does not provide this define. Instead I rely, on __ANDROID__, which is set by the compiler. I haven't yet removed the cmake variable with the same name, as we will need to do something completely different there -- NDK toolchain defines CMAKE_SYSTEM_NAME to Android, while our current one pretends it's linux. Reviewers: tberghammer, zturner Subscribers: danalbert, srhines, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D27305 llvm-svn: 288494
* Fix build error on Android again.Zachary Turner2016-10-051-1/+1
| | | | | | This one was my fault since I can't compile Android. llvm-svn: 283414
* Convert some Args index-based iteration to range-style iteration.Zachary Turner2016-10-051-4/+2
| | | | | | | | | | | | | | This is better for a number of reasons. Mostly style, but also: 1) Signed-unsigned comparison warnings disappear since there is no loop index. 2) Iterating with the range-for style gives you back an entry that has more than just a const char*, so it's more efficient and more useful. 3) Makes code safter since the type system enforces that it's impossible to index out of bounds. llvm-svn: 283413
* Fix FixupEnvironment on Android after the Args refactorTamas Berghammer2016-10-041-5/+6
| | | | llvm-svn: 283237
* Try to fix freebsd and android builds.Zachary Turner2016-09-191-1/+1
| | | | llvm-svn: 281922
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-163/+167
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* Unify process launching code on linuxPavel Labath2016-07-211-0/+213
Summary: We've had two copies of code for launching processes: - one in NativeProcessLinux, used for launching debugged processes - one in ProcessLauncherAndroid, used on android for launching all other kinds of processes These have over time acquired support for various launch options, but neither supported all of them. I now replace them with a single implementation ProcessLauncherLinux, which supports all the options the individual versions supported and set it to be used to launch all processes on linux. This also works around the ETXTBSY issue on android when the process is started from the platform instance, as that used to go through the version which did not contain the workaround. Reviewers: tberghammer Subscribers: tberghammer, danalbert, srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D22457 llvm-svn: 276288
OpenPOWER on IntegriCloud