llvm-project/lldb/source/Host/android
Pavel Labath 3318314722 Fix temporary directory computation on linux (pr25147)
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
2015-10-16 09:32:05 +00:00
..
HostInfoAndroid.cpp Fix temporary directory computation on linux (pr25147) 2015-10-16 09:32:05 +00:00
LibcGlue.cpp [linux] Use cmake to detect support process_vm_readv (bug #23918) 2015-06-29 09:18:17 +00:00
ProcessLauncherAndroid.cpp Refactor many file functions to use FileSpec over strings. 2015-05-29 19:52:29 +00:00