[all-commits] [llvm/llvm-project] 457eb0: [lldb/PlatformMacOSX] Re-implement GetDeveloperDir...
Jonas Devlieghere via All-commits
all-commits at lists.llvm.org
Fri Mar 27 12:37:14 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 457eb05db67d201f34920e762a90d0deb670becb
https://github.com/llvm/llvm-project/commit/457eb05db67d201f34920e762a90d0deb670becb
Author: Jonas Devlieghere <jonas at devlieghere.com>
Date: 2020-03-27 (Fri, 27 Mar 2020)
Changed paths:
M lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
M lldb/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
M lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
M lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
M lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
M lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
M lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
M lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
Log Message:
-----------
[lldb/PlatformMacOSX] Re-implement GetDeveloperDirectory
GetDeveloperDirectory returns a const char* which is NULL when we cannot
find the developer directory. This crashes in
PlatformDarwinKernel::CollectKextAndKernelDirectories because we're
unconditionally assigning it to a std::string. Coincidentally I just
refactored a bunch of code in PlatformMacOSX so instead of a ad-hoc fix
I've reimplemented the method based on GetXcodeContentsDirectory.
The change is mostly NFC. Obviously it fixes the crash, but it also
removes support for finding the Xcode directory through he legacy
$XCODE_SELECT_PREFIX_DIR/usr/share/xcode-select/xcode_dir_path.
Differential revision: https://reviews.llvm.org/D76938
More information about the All-commits
mailing list