llvm-project/lldb
Pavel Labath 91f14e69b8 Remove Platform references from the Host module
Summary:
These were used by Host::LaunchProcess to "resolve" the executable it
was about to launch. The only parts of Platform::ResolveExecutable, which
seem to be relevant here are the FileSpec::ResolvePath and
ResolveExecutableLocation calls.

The rest (most) of that function deals with selecting an architecture
out of a fat binary and making sure we are able to create a Module with that
slice. These are reasonable actions when selecting a binary to debug,
but not for a generic process launching framework (it's technically even
wrong because we should be able to launch a binary with execute
permissions only, but trying to parse such file will obviously fail).

I remove the platform call by inlining the relevant FileSpec calls and
ignoring the rest of the Platform::ResolveExecutable code.  The
architecture found by the slice-searching code is being ignored already
anyway, as we use the one specified in the LaunchInfo, so the only
effect of this should be a different error message in case the
executable does not contain the requested architecture -- before we
would get an error message from the Platform class, but now we will get
an error from the actual posix_spawn syscall (this is only relevant on
mac, as it's the only target supporting fat binaries).

Launching targets for debugging should not be affected as here the
executable is pre-resolved at the point when the Target is created.

Reviewers: jingham, clayborg

Subscribers: lldb-commits, emaste

Differential Revision: https://reviews.llvm.org/D41902

llvm-svn: 322935
2018-01-19 11:10:54 +00:00
..
cmake [lldb] Set component when invoking add_llvm_install_targets 2017-12-13 01:14:27 +00:00
docs [CMake] Make check-lldb work with LLDB_CODESIGN_IDENTITY='' 2018-01-18 01:16:30 +00:00
examples Fixed up to use a class for the commands, renamed the commands and added a way to just dump the compile unit full paths and optionally their support files with the new "dump-files"command. 2017-11-16 17:14:48 +00:00
include/lldb Fix logging test on windows 2018-01-18 11:15:50 +00:00
lit [lldb] Add support to cache a PDB's global scope and fix a bug in getting the source file name for a compiland 2018-01-13 06:58:18 +00:00
lldb.xcodeproj Remove the hardcoded macos deployment targets altogether 2018-01-17 00:22:27 +00:00
lldb.xcworkspace Revert r275223, which committed the wrong thing. 2016-07-12 23:31:42 +00:00
packages/Python/lldbsuite A third attempt to mark TestRdar12408181.py as skipped 2018-01-17 20:54:39 +00:00
resources Bump the lldb version # in the xcode project files from 2016-03-15 04:36:11 +00:00
scripts Change SBProcess::ReadCStringFromMemory() back to returning 2017-12-22 03:27:02 +00:00
source Remove Platform references from the Host module 2018-01-19 11:10:54 +00:00
test [CMake] Make check-lldb work with LLDB_CODESIGN_IDENTITY='' 2018-01-18 01:16:30 +00:00
third_party/Python/module *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
tools Remove the hardcoded macos deployment targets altogether 2018-01-17 00:22:27 +00:00
unittests Simplify some LogTest tests 2018-01-17 13:46:06 +00:00
utils *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
www Fix more inconsistent line endings. NFC. 2017-12-18 19:46:56 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.clang-format Updated .clang-format rules so bring LLDB in line with LLVM standards. 2016-09-06 17:19:00 +00:00
.gitignore [dotest] Remove crashinfo hook 2018-01-10 10:18:47 +00:00
CMakeLists.txt Default to using in-tree clang for building test executables 2017-10-27 02:24:04 +00:00
CODE_OWNERS.txt Remove Sean Callanan from the CODE_OWNERS, he won't have time 2017-11-01 01:38:42 +00:00
INSTALL.txt Changed builld-llvm.py to use .json files 2017-02-23 02:21:34 +00:00
LICENSE.TXT
use_lldb_suite_root.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00