summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/android
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-192-8/+6
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Update FileSpec constructor signatureJonas Devlieghere2018-11-081-2/+5
| | | | llvm-svn: 346449
* [FileSystem] Change FileSpec constructor signature.Jonas Devlieghere2018-11-011-3/+4
| | | | | | | Fix breakage due to the recent FileSpec change that extracts the path resultion logic into FileSystem for the Android host. llvm-svn: 345891
* [FileSystem] Fix Exists call sitesJonas Devlieghere2018-11-011-3/+4
| | | | | | | There were some calls left to Exists() on non-darwin platforms (Windows, Linux and FreeBSD) that weren't yet updated to use the FileSystem. llvm-svn: 345857
* Reflow paragraphs in comments.Adrian Prantl2018-04-301-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is intended as a clean up after the big clang-format commit (r280751), which unfortunately resulted in many of the comment paragraphs in LLDB being very hard to read. FYI, the script I used was: import textwrap import commands import os import sys import re tmp = "%s.tmp"%sys.argv[1] out = open(tmp, "w+") with open(sys.argv[1], "r") as f: header = "" text = "" comment = re.compile(r'^( *//) ([^ ].*)$') special = re.compile(r'^((([A-Z]+[: ])|([0-9]+ )).*)|(.*;)$') for line in f: match = comment.match(line) if match and not special.match(match.group(2)): # skip intentionally short comments. if not text and len(match.group(2)) < 40: out.write(line) continue if text: text += " " + match.group(2) else: header = match.group(1) text = match.group(2) continue if text: filled = textwrap.wrap(text, width=(78-len(header)), break_long_words=False) for l in filled: out.write(header+" "+l+'\n') text = "" out.write(line) os.rename(tmp, sys.argv[1]) Differential Revision: https://reviews.llvm.org/D46144 llvm-svn: 331197
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-062-88/+71
| | | | | | | | | | | | | | | | | | | | | | | *** 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-108/+0
| | | | | | | | | | | | | | | | | | | | | | | 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
* [linux] Remove all traces of signalfd(2)Pavel Labath2016-02-231-5/+0
| | | | | | | | | | | | | | | Summary: Signalfd is not used in the code anymore, and given that the same functionality can be achieved with the new MainLoop class, it's unlikely we will need it in the future. Remove all traces of it. Reviewers: tberghammer, ovyalov Subscribers: tberghammer, danalbert, srhines, lldb-commits Differential Revision: http://reviews.llvm.org/D17510 llvm-svn: 261631
* Fix temporary directory computation on linux (pr25147)Pavel Labath2015-10-161-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | Summary: On linux, the environment variables for temp directories that lldb checks for are generally not defined, and the temp directory computation failed. This caused expression evaluation to fall back to creating "/tmp/lldb-*.expr" debugging files instead of the usual "$TMP/lldb/pid/lldb-*.expr". Crucially, these files were not cleaned up on lldb exit, which caused clutter in the /tmp folder, especially on long-running machines (e.g. builtbots). This commit fixes lldb to use llvm::sys::path::system_temp_directory, which does the same environment variable dance, but (!) also falls back to the P_tmpdir macro, which is how the temp directory is defined on linux. Since the linux temp path computation now succeeds, I needed to also modify Android path computation to check for actual directory existence, rather then checking whether the operation failed. Reviewers: clayborg, tberghammer Subscribers: tberghammer, lldb-commits, danalbert, srhines, emaste Differential Revision: http://reviews.llvm.org/D13772 llvm-svn: 250502
* Revert "Fix temporary directory computation on linux (pr25147)"Pavel Labath2015-10-151-9/+6
| | | | | | I actually did not want to commit this without review, but I mistyped. :/ llvm-svn: 250412
* Fix temporary directory computation on linux (pr25147)Pavel Labath2015-10-151-6/+9
| | | | | | | | | | | | | | | | | On linux, the environment variables for temp directories that lldb checks for are generally not defined, and the temp directory computation failed. This caused expression evaluation to fall back to creating "/tmp/lldb-*.expr" debugging files instead of the usual "$TMP/lldb/pid/lldb-*.expr". Crucially, these files were not cleaned up on lldb exit, which caused clutter in the /tmp folder, especially on long-running machines (e.g. builtbots). This commit fixes lldb to use llvm::sys::path::system_temp_directory, which does the same environment variable dance, but (!) also falls back to the P_tmpdir macro, which is how the temp directory is defined on linux. Since the linux temp path computation now succeeds, I needed to also modify Android path computation to check for actual directory existence, rather then checking whether the operation failed. llvm-svn: 250409
* [linux] Use cmake to detect support process_vm_readv (bug #23918)Pavel Labath2015-06-291-9/+0
| | | | | | | | | | | | | | | | | | Summary: Some old linux versions do not have process_vm_readv function defined. Even older versions do not have even the __NR_process_vm_readv syscall number. We use cmake to detect these situations and fallback appropriately: in the first case, we can issue the syscall manually, while it the latter case, we need to drop fast memory read support completely. Test Plan: linux test suite passes Reviewers: ovyalov, Eugene.Zelenko Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10727 llvm-svn: 240927
* [NativeProcessLinux] Use fast memory reads, if the system supports itPavel Labath2015-06-171-1/+11
| | | | | | | | | | | | | | | | | | | | | | | Summary: Memory reads using the ptrace API need to be executed on a designated thread and in 4-byte increments. The process_vm_read syscall has no such requirements and it is about 50 times faster. This patch makes lldb-server use the faster API if the target kernel supports it. Kernel support for this feature is determined at runtime. Using process_vm_writev in the same manner is more complicated since this syscall (unlike ptrace) respects page protection settings and so it cannot be used to set a breakpoint, since code pages are typically read-only. However, memory writes are not currently a performance bottleneck as they happen much more rarely. Test Plan: all tests continue to pass Reviewers: ovyalov, vharron Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10488 llvm-svn: 239924
* Refactor many file functions to use FileSpec over strings.Chaoren Lin2015-05-291-14/+15
| | | | | | | | | | | | | | | | | 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
* Get lldb-server building on android-9Vince Harron2015-05-121-0/+39
| | | | | | Build lldb-server with an android-9 sysroot. llvm-svn: 237078
* Use /data/local/tmp as temp directory on androidTamas Berghammer2015-05-081-0/+12
| | | | | | | | | | | If no temp directory specified by the user on android then fall back to /data/local/tmp what is always present on the device. It removes the dependency of specifying TMPDIR for executing platform commands on android. Differential revision: http://reviews.llvm.org/D9569 llvm-svn: 236843
* ComputeSupportExeDirectory for LinuxChaoren Lin2015-03-241-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixes http://reviews.llvm.org/D8511 The original method of using dladdr() could return the incorrect relative path if not dynamically linked against liblldb and the working directory has changed. This is not a problem when built with python, since ScriptInterpreterPython::InitializePrivate calls HostInfo::GetLLDBPath(ePathTypeLLDBShlibDir, ...) and caches the correct path before any changes to the working directory. The /proc/self/exe approach fails if run using Python, but works for all other cases (including for android, which doesn't have dladdr()). So if we combine the two, we should reasonably cover all corner cases. Reviewers: vharron, ovyalov, clayborg Reviewed By: ovyalov, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8570 llvm-svn: 233129
* Reverted r232883 due to failing tests.Vince Harron2015-03-221-0/+7
| | | | llvm-svn: 232904
* Fix ComputeSupportExeDirectory for Linux (merge with Android).Chaoren Lin2015-03-211-7/+0
| | | | | | | | | | | | | | | | | Summary: ComputeSupportExeDirectory relied on ComputeSharedLibraryDirectory which was not always reliable. Using procfs seems to be the best way to deal with it on Linux (since it's already done on Android, might as well merge it). Reviewers: ovyalov Reviewed By: ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8511 llvm-svn: 232883
* Add filepath to qModuleInfo packetTamas Berghammer2015-03-131-0/+55
| | | | | | | | | | | The file path is currently required on android because the executables only contain the name of the system libraries without their path. This CL add an extra field to the qModuleInfo packet to return the full path of a modul and add logic to locate a shared module on android. Differential revision: http://reviews.llvm.org/D8221 llvm-svn: 232156
* Fix execution of platform shell commands on androidTamas Berghammer2015-03-032-7/+61
| | | | | | | | | | * Add missing functionality to the process launcher * Fixup PATH environment variable to workaround an OS bug * Add default shell path to the host info structure Differential revision: http://reviews.llvm.org/D8009 llvm-svn: 231065
* Return a current executable's directory from ↵Oleksiy Vyalov2015-02-261-0/+7
| | | | | | | | HostInfoAndroid::ComputeSupportExeDirectory. http://reviews.llvm.org/D7876 llvm-svn: 230604
* Create new platform: remote-androidTamas Berghammer2015-02-122-0/+87
* Create new platform plugin for lldb * Create HostInfo class for android * Create ProcessLauncher for android Differential Revision: http://reviews.llvm.org/D7584 llvm-svn: 228943
OpenPOWER on IntegriCloud