llvm-project/lldb
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
..
cmake Fix warnings in LLDBWrapPython.cpp with gcc 4.9. 2015-10-15 08:27:01 +00:00
docs Have debugserver send the OS version string plus 2015-08-12 03:27:33 +00:00
examples [libstdc++ data-formatters] Remove size limits. 2015-10-13 00:05:42 +00:00
include Resubmit: RenderScript command for printing allocation contents 2015-10-16 08:28:47 +00:00
lib Fix the undefined symbol issue with go linking with autotools: build the LanguageRuntime for Go + link against it 2015-10-08 11:17:01 +00:00
lit Create a check-lldb-unit target to run unit tests. 2015-03-13 20:55:07 +00:00
lldb.xcodeproj Split Socket class into Tcp/Udp/DomainSocket subclasses. 2015-10-15 23:54:09 +00:00
lldb.xcworkspace Working on getting the OSX build green 2015-05-12 02:20:27 +00:00
resources Only export public symbols with the cmake build. 2015-09-04 00:00:41 +00:00
scripts I've been seeing a problem with xcodebuilds on macosx for 2015-10-16 01:27:21 +00:00
source Fix temporary directory computation on linux (pr25147) 2015-10-16 09:32:05 +00:00
test More general fixes to the tree view and BoxedPanel. 2015-10-16 00:34:18 +00:00
tools Split Socket class into Tcp/Udp/DomainSocket subclasses. 2015-10-15 23:54:09 +00:00
unittests Split Socket class into Tcp/Udp/DomainSocket subclasses. 2015-10-15 23:54:09 +00:00
utils syncsource.py: a specific dir's source_excludes may now include the special entry "<no-defaults>". 2015-10-08 17:43:02 +00:00
www Support RHEL 7 and similar systems that use architecture-specific Python lib dirs 2015-10-12 20:12:27 +00:00
.arcconfig Update .arcconfig to point to reviews.llvm.org 2014-05-20 21:24:59 +00:00
.clang-format Update build instructions / coding conventions. 2015-03-10 23:22:25 +00:00
.gitignore Fix .gitignore to ignore symlinks. 2015-03-31 00:03:00 +00:00
CMakeLists.txt Fix Android build. 2015-10-07 00:01:06 +00:00
CODE_OWNERS.txt Convert CRLF to LF in CODE_OWNERS.txt 2015-03-23 14:00:54 +00:00
INSTALL.txt Revert the patch to Test Commit Access 2015-07-06 11:26:51 +00:00
LICENSE.TXT
Makefile Test commit 2015-07-22 08:41:18 +00:00