summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/android
Commit message (Collapse)AuthorAgeFilesLines
* [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