Commit Graph

132 Commits

Author SHA1 Message Date
Pavel Labath d36e879c21 [lldb] Disable PipeTest.OpenAsReader on windows
This test seems to be broken there (which is not totally surprising as
this functionality was never used on windows). Disable the test while I
investigate.
2021-01-11 13:37:49 +01:00
Pavel Labath 13dea030b3 [lldb] Fix some bugs in the Pipe class and add tests
- s/createUniqueFile/createUniquePath -- we don't want to create the file,
  just the file name
- s/data()/str().c_str()/ -- paths given to system apis must be
  null-terminated
2021-01-10 21:59:16 +01:00
Pavel Labath daae4a8482 [lldb] Modernize PseudoTerminal::OpenSecondary 2020-10-16 15:22:55 +02:00
Pavel Labath 6bb123b819 [lldb] Modernize PseudoTerminal::OpenFirstAvailablePrimary
replace char*+length combo with llvm::Error
2020-10-14 14:55:03 +02:00
Jordan Rupprecht c3193e464c [lldb/ipv6] Support running lldb tests in an ipv6-only environment.
When running in an ipv6-only environment where `AF_INET` sockets are not available, many lldb tests (mostly gdb remote tests) fail because things like `127.0.0.1` don't work there.

Use `localhost` instead of `127.0.0.1` whenever possible, or include a fallback of creating `AF_INET6` sockets when `AF_INET` fails.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D87333
2020-09-30 11:08:41 -07:00
Jonas Devlieghere 64ec505dd4 [lldb] Rename Master/Slave to Primary/Secondary (NFC) 2020-06-15 15:38:28 -07:00
Adrian Prantl f0c08b7eac Move the Xcode SDK path caching to HostInfo
When debugging a remote platform, the platform you get from
GetPlatformForArchitecture doesn't inherit from PlatformDarwin.
HostInfoMacOSX seems like the right place to have a global store of
local paths.

Differential Revision: https://reviews.llvm.org/D79364
2020-05-06 13:43:50 -07:00
Pavel Labath f07f2cee9b [lldb/unittest] Adjust CheckIPSupport function to avoid double-consume of llvm::Error
The problem caught by clang-tidy and reported by Tobias Bosch.
2020-04-28 13:35:07 +02:00
Pavel Labath 18e96a31fe [lldb/unittests] Skip IPv6 test on systems which don't have IPv6 configured
Sadly IPv6 is still not present anywhere. The test was attempting to
detect&skip such hosts, but the way it did that (essentially, by calling
getaddrinfo) meant that it only detected hosts which have IPv6 support
completely compiled out. It did not do anything about hosts which have
it compiled in, but lack runtime configuration even for the ::1 loopback
address.

This patch changes the detection logic to use a new method. It does it
by attempting to bind a socket to the appropriate loopback address. That
should ensure the hosts loopback interface is fully set up. In an effort
to avoid silently skipping the test on too many hosts, the test is
fairly strict about the kind of error it expects in these cases -- it
will only skip the test when receiving EADDRNOTAVAIL. If we find other
error codes that can be reasonably returned in these situations, we can
add more of them.

The (small) change in TCPSocket.cpp is to ensure that the code correctly
propagates the error received from the OS.
2020-04-27 17:33:20 +02:00
Adrian Prantl 79feafa514 Add an internal bit to the XcodeSDK class.
For developing the OS itself there exists an "internal" variant of
each SDK. This patch adds support for these SDK directories to the
XcodeSDK class.

Differential Revision: https://reviews.llvm.org/D78675
2020-04-24 12:55:53 -07:00
Pavel Labath c9e6b7010c [lldb/Host] Modernize some socket functions
return Expected<Socket> instead of a Status object plus a Socket*&
argument.
2020-04-23 14:20:26 +02:00
Jonas Devlieghere e57361c055 [lldb/Host] Remove TaskPool and replace its uses with llvm::ThreadPool
Remove LLDB's TaskPool and replace its uses with LLVM's ThreadPool.

Differential revision: https://reviews.llvm.org/D78337
2020-04-22 09:17:49 -07:00
Pavel Labath d5c26f871b [lldb/unittests] Better error messages when creating sockets fails
We get failures in SocketTestUtilities on the pre-merge bots. This
might give us a clue as to what's wrong.
2020-04-16 11:59:37 +02:00
Jonas Devlieghere d144087c96 [lldb/Support] Treat empty FileSpec as an invalid file.
LLDB relies on empty FileSpecs being invalid files, for example, they
don't exists. Currently this assumption does not always hold during
reproducer replay, because we pass the result of GetPath to the VFS.
This is an empty string, which the VFS converts to an absolute directory
by prepending the current working directory, before looking it up in the
YAML mapping. This means that an empty FileSpec will exist when the
current working directory does. This breaks at least one test
(TestAddDsymCommand.py) when ran from replay.

This patch special cases empty FileSpecs and returns a sensible result
before calling GetPath and forwarding the call.

Differential revision: https://reviews.llvm.org/D77351
2020-04-03 09:29:22 -07:00
Adrian Prantl cd4c1adabe Add newly-missing include 2020-03-11 19:30:53 -07:00
Benjamin Kramer adcd026838 Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with
std::string_view. There should be no functional change here.

This is mostly mechanical from a custom clang-tidy check, with a lot of
manual fixups. It uncovers a lot of minor inefficiencies.

This doesn't actually modify StringRef yet, I'll do that in a follow-up.
2020-01-28 23:25:25 +01:00
Raphael Isemann 808142876c [lldb][NFC] Fix all formatting errors in .cpp file headers
Summary:
A *.cpp file header in LLDB (and in LLDB) should like this:
```
//===-- TestUtilities.cpp -------------------------------------------------===//
```
However in LLDB most of our source files have arbitrary changes to this format and
these changes are spreading through LLDB as folks usually just use the existing
source files as templates for their new files (most notably the unnecessary
editor language indicator `-*- C++ -*-` is spreading and in every review
someone is pointing out that this is wrong, resulting in people pointing out that this
is done in the same way in other files).

This patch removes most of these inconsistencies including the editor language indicators,
all the different missing/additional '-' characters, files that center the file name, missing
trailing `===//` (mostly caused by clang-format breaking the line).

Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere

Reviewed By: JDevlieghere

Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D73258
2020-01-24 08:52:55 +01:00
Raphael Isemann 5dca0596a9 [lldb] Add a SubsystemRAII that takes care of calling Initialize and Terminate in the unit tests
Summary:
Many of our tests need to initialize certain subsystems/plugins of LLDB such as
`FileSystem` or `HostInfo` by calling their static `Initialize` functions before the
test starts and then calling `::Terminate` after the test is done (in reverse order).
This adds a lot of error-prone boilerplate code to our testing code.

This patch adds a RAII called SubsystemRAII that ensures that we always call
::Initialize and then call ::Terminate after the test is done (and that the Terminate
calls are always in the reverse order of the ::Initialize calls). It also gets rid of
all of the boilerplate that we had for these calls.

Per-fixture initialization is still not very nice with this approach as it would
require some kind of static unique_ptr that gets manually assigned/reseted
from the gtest SetUpTestCase/TearDownTestCase functions. Because of that
I changed all per-fixture setup to now do per-test setup which can be done
by just having the SubsystemRAII as a member of the test fixture. This change doesn't
influence our normal test runtime as LIT anyway runs each test case separately
(and the Initialize/Terminate calls are anyway not very expensive). It will however
make running all tests in a single executable slightly slower.

Reviewers: labath, JDevlieghere, martong, espindola, shafik

Reviewed By: labath

Subscribers: mgorny, rnkovacs, emaste, MaskRay, abidh, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D71630
2019-12-23 10:38:25 +01:00
Jonas Devlieghere 3011d55f72 [lldb/Host] Use cmakedefine01 for LLDB_ENABLE_POSIX
Rename LLDB_DISABLE_POSIX to LLDB_ENABLE_POSIX and use cmakedefine01 for
consistency.
2019-12-13 10:00:59 -08:00
Michał Górny d82dd6ac9a [lldb] [unittest] Reenable MainLoopTest.DetectsEOF on NetBSD
The underlying issue is already fixed in the NetBSD kernel for some
time, so we can finally reenable the test.
2019-11-18 22:36:01 +01:00
Lawrence D'Anna f913fd6eb0 factor out an abstract base class for File
Summary:
This patch factors out File as an abstract base
class and moves most of its actual functionality into
a subclass called NativeFile.   In the next patch,
I'm going to be adding subclasses of File that
don't necessarily have any connection to actual OS files,
so they will not inherit from NativeFile.

This patch was split out as a prerequisite for
https://reviews.llvm.org/D68188

Reviewers: JDevlieghere, jasonmolenda, labath

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 373564
2019-10-03 04:31:46 +00:00
Lawrence D'Anna 2fce1137c7 Convert FileSystem::Open() to return Expected<FileUP>
Summary:
This patch converts FileSystem::Open from this prototype:

Status
Open(File &File, const FileSpec &file_spec, ...);

to this one:

llvm::Expected<std::unique_ptr<File>>
Open(const FileSpec &file_spec, ...);

This is beneficial on its own, as llvm::Expected is a more modern
and recommended error type than Status.  It is also a necessary step
towards https://reviews.llvm.org/D67891, and further developments
for lldb_private::File.

Reviewers: JDevlieghere, jasonmolenda, labath

Reviewed By: labath

Subscribers: mgorny, lldb-commits

Tags: #lldb

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

llvm-svn: 373003
2019-09-26 17:54:59 +00:00
Jonas Devlieghere 7de14dc3c6 [unittest] Skip the socket tests if we $TMPDIR is too long.
Adrian added a sanity check to the socket tests to ensure the $TMPDIR is
not too long for a socket. While this is great for diagnosing the
problem it doesn't really solve the problem for environment where you
have no control over that variable such as in CI. I propose to just skip
the test in that case similar to what we do for tests that rely on
targets that are not currently build, etc.

Differential revision: https://reviews.llvm.org/D67972

llvm-svn: 372774
2019-09-24 19:34:50 +00:00
Jonas Devlieghere 948786c929 File::SetDescriptor() should require options
lvm_private::File::GetStream() can fail if m_options == 0

It's not clear from the header a File created with a descriptor will be
not be usable by many parts of LLDB unless SetOptions is also called,
but it is.

This is because those parts of LLDB rely on GetStream() to use the
file, and that in turn relies on calling fdopen on the descriptor. When
calling fdopen, GetStream relies on m_options to determine the access
mode. If m_options has never been set, GetStream() will fail.

This patch adds options as a required argument to File::SetDescriptor
and the corresponding constructor.

Patch by: Lawrence D'Anna

Differential revision: https://reviews.llvm.org/D67792

llvm-svn: 372652
2019-09-23 20:36:46 +00:00
Jonas Devlieghere a7d186c796 [Host] File::GetWaitableHandle() should call fileno()
If the file has m_stream, it may not have a m_descriptor.
GetWaitableHandle() should call GetDescriptor(), which will call
fileno(), so it will get waitable descriptor whenever one is available.

Patch by: Lawrence D'Anna

Differential revision: https://reviews.llvm.org/D67789

llvm-svn: 372644
2019-09-23 19:34:26 +00:00
Jonas Devlieghere a8f3ae7c9c [LLDB] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.

Differential revision: https://reviews.llvm.org/D66259

llvm-svn: 368933
2019-08-14 22:19:23 +00:00
Jonas Devlieghere 63e5fb76ec [Logging] Replace Log::Printf with LLDB_LOG macro (NFC)
This patch replaces explicit calls to log::Printf with the new LLDB_LOGF
macro. The macro is similar to LLDB_LOG but supports printf-style format
strings, instead of formatv-style format strings.

So instead of writing:

  if (log)
    log->Printf("%s\n", str);

You'd write:

  LLDB_LOG(log, "%s\n", str);

This change was done mechanically with the command below. I replaced the
spurious if-checks with vim, since I know how to do multi-line
replacements with it.

  find . -type f -name '*.cpp' -exec \
  sed -i '' -E 's/log->Printf\(/LLDB_LOGF\(log, /g' "{}" +

Differential revision: https://reviews.llvm.org/D65128

llvm-svn: 366936
2019-07-24 17:56:10 +00:00
Antonio Afonso 70795c1e3a Revert "Revert "Add ReadCStringFromMemory for faster string reads""
This reverts commit 9c10b620c0.

llvm-svn: 366848
2019-07-23 20:40:37 +00:00
Adrian Prantl 3b4a667854 Add a sanity check to the domain socket tests.
rdar://problem/52062631

llvm-svn: 364562
2019-06-27 16:45:23 +00:00
Antonio Afonso 9c10b620c0 Revert "Add ReadCStringFromMemory for faster string reads"
This reverts commit a7335393f5.

It seems this is breaking a bunch of tests (https://reviews.llvm.org/D62503#1549874) so reverting until I find the time to repro and fix.

llvm-svn: 364355
2019-06-25 22:22:13 +00:00
Antonio Afonso a7335393f5 Add ReadCStringFromMemory for faster string reads
Summary:
This is the fifth patch to improve module loading in a series that started here (where I explain the motivation and solution): D62499

Reading strings with ReadMemory is really slow when reading the path of the shared library. This is because we don't know the length of the path so use PATH_MAX (4096) and these strings are actually super close to the boundary of an unreadable page. So even though we use process_vm_readv it will usually fail because the read size spans to the unreadable page and we then default to read the string word by word with ptrace.

This new function is very similar to another ReadCStringFromMemory that already exists in lldb that makes sure it never reads cross page boundaries and checks if we already read the entire string by finding '\0'.

I was able to reduce the GetLoadedSharedLibraries call from 30ms to 4ms (or something of that order).

Reviewers: clayborg, xiaobai, labath

Reviewed By: labath

Subscribers: emaste, lldb-commits

Tags: #lldb

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

llvm-svn: 363750
2019-06-18 23:27:57 +00:00
Antonio Afonso f4335b8e3c Implement GetSharedLibraryInfoAddress
Summary:
This is the third patch to improve module loading in a series that started here (where I explain the motivation and solution): D62499

Add functions to read the r_debug location to know where the linked list of loaded libraries are so I can generate the `xfer:libraries-svr4` packet.
I'm also using this function to implement `GetSharedLibraryInfoAddress` that was "not implemented" for linux.
Most of this code was inspired by the current ds2 implementation here: https://github.com/facebook/ds2/blob/master/Sources/Target/POSIX/ELFProcess.cpp.

Reviewers: clayborg, xiaobai, labath

Reviewed By: clayborg, labath

Subscribers: emaste, krytarowski, mgorny, lldb-commits

Tags: #lldb

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

llvm-svn: 363458
2019-06-14 21:15:08 +00:00
Antonio Afonso d556095135 Make ConnectionFileDescription work with all sockets
Summary:
My main goal here is to make lldb-server work with Android Studio.

This is currently not the case because lldb-server is started in platform mode listening on a domain socket. When Android Studio connects to it lldb-server crashes because even though it's listening on a domain socket as soon as it gets a connection it asserts that it's a TCP connection, which will obviously fails for any non-tcp connection.

To do this I came up with a new method called GetConnectURI() in Socket that returns the URI needed to connect to the connected portion of the socket.

Reviewers: labath, clayborg, xiaobai

Reviewed By: labath

Subscribers: mgorny, jfb, lldb-commits

Tags: #lldb

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

llvm-svn: 362173
2019-05-30 23:30:35 +00:00
Antonio Afonso 3da8e5f920 Fix IPv6 support on lldb-server platform
Summary:
This is a general fix for the ConnectionFileDescriptor class but my main motivation was to make lldb-server working with IPv6.
The connect URI can use square brackets ([]) to wrap the interface part of the URI (e.g.: <scheme>://[<interface>]:<port>). For IPv6 addresses this is a must since its ip can include colons and it will overlap with the port colon otherwise. The URIParser class parses the square brackets correctly but the ConnectionFileDescriptor doesn't generate them for IPv6 addresses making it impossible to connect to the gdb server when using this protocol.

How to reproduce the issue:
```
$ lldb-server p --server --listen [::1]:8080
...
$ lldb
(lldb) platform select remote-macosx
(lldb) platform connect connect://[::1]:8080
(lldb) platform process -p <pid>
error: unable to launch a GDB server on 'computer'
```

The server was actually launched we were just not able to connect to it. With this fix lldb will correctly connect. I fixed this by wrapping the ip portion with [].

Reviewers: labath

Reviewed By: labath

Subscribers: xiaobai, mgorny, jfb, lldb-commits, labath

Tags: #lldb

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

llvm-svn: 361898
2019-05-28 23:26:32 +00:00
Alex Langford 38cc896f00 Revert "Fix IPv6 support on lldb-server platform"
This reverts commit c28f81797084b8416ff5be4f9e79000a9741ca6a.
This reverts commit 7e79b64642486f510f7872174eb831df68d65b84.

Looks like there is more work to be done on this patch. I've spoken to
the author and for the time being we will revert to keep the buildbots
green.

llvm-svn: 361086
2019-05-18 01:09:44 +00:00
Alex Langford f9399de525 Unbreak windows build bot
Commit c28f81797084b8416ff5be4f9e79000a9741ca6a (svn r361079)
broke the windows buildbot. This should fix it.

llvm-svn: 361083
2019-05-18 00:09:43 +00:00
Alex Langford d84d02e197 Fix IPv6 support on lldb-server platform
This is a general fix for the ConnectionFileDescriptor class but my main
motivation was to make lldb-server working with IPv6.
The connect URI can use square brackets ([]) to wrap the interface part
of the URI (e.g.: <scheme>://[<interface>]:<port>). For IPv6 addresses
this is a must since its ip can include colons and it will overlap with
the port colon otherwise. The URIParser class parses the square brackets
correctly but the ConnectionFileDescriptor doesn't generate them for
IPv6 addresses making it impossible to connect to the gdb server when
using this protocol.

How to reproduce the issue:

$ lldb-server p --server --listen [::1]:8080
...
$ lldb
(lldb) platform select remote-macosx
(lldb) platform connect connect://[::1]:8080
(lldb) platform process -p <pid>
error: unable to launch a GDB server on 'computer'

The server was actually launched we were just not able to connect to it.
With this fix lldb will correctly connect. I fixed this by wrapping the
ip portion with [].

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

Patch by António Afonso <antonio.afonso@gmail.com>

llvm-svn: 361079
2019-05-17 22:30:53 +00:00
Aaron Smith b8ec7eee81 Clear the output string passed to GetHostName()
LLVM's wchar to UTF8 conversion routine expects an empty string to store the output.
GetHostName() on Windows is sometimes called with a non-empty string which triggers
an assert. The simple fix is to clear the output string before the conversion.

llvm-svn: 358550
2019-04-17 03:13:06 +00:00
Aaron Smith f8a74c18ec [lldb-server] Introduce Socket::Initialize and Terminate to simply WSASocket setup
Reviewers: zturner, labath

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

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

llvm-svn: 358044
2019-04-10 04:57:18 +00:00
Zachary Turner ae56ff925b Remove dependency edges from Host to Target/Core.
After recent changes, Host is now dependency-free.

llvm-svn: 355730
2019-03-08 20:56:10 +00:00
Zachary Turner 805e71060e Move ProcessInfo from Host to Utility.
There are set of classes in Target that describe the parameters of a
process - e.g. it's PID, name, user id, and similar. However, since it
is a bare description of a process and contains no actual functionality,
there's nothing specifically that makes this appropriate for being in
Target -- it could just as well be describing a process on the host, or
some hypothetical virtual process that doesn't even exist.

To cement this, I'm moving these classes to Utility. It's possible that
we can find a better place for it in the future, but as it is neither
Host specific nor Target specific, Utility seems like the most appropriate
place for the time being.

After this there is only 2 remaining references to Target from Host,
which I'll address in a followup.

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

llvm-svn: 355342
2019-03-04 21:51:03 +00:00
Zachary Turner 80552918a9 Move Host/Symbols.cpp to Symbols/LocateSymbolFile.cpp
Given that we have a target named Symbols, one wonders why a
file named Symbols.cpp is not in this target.  To be clear,
the functions exposed from this file are really focused on
*locating* a symbol file on a given host, which is where the
ambiguity comes in.  However, it makes more sense conceptually
to be in the Symbols target. While some of the specific places
to search for symbol files might change depending on the Host,
this is not inherently true in the same way that, for example,
"accessing the file system" or "starting threads" is
fundamentally dependent on the Host.

PDBs, for example, recently became a reality on non-Windows platforms,
and it's theoretically possible that DSYMs could become a thing on non
MacOSX platforms (maybe in a remote debugging scenario). Other types of
symbol files, such as DWO, DWP, etc have never been tied to any Host
platform anyway.

After this patch, there is only one remaining dependency from
Host to Target.

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

llvm-svn: 355032
2019-02-27 21:42:10 +00:00
Davide Italiano 1c29801615 Revert "Don't include UnixSignals.h from Host."
It broke the modules green dragon buildbot.

llvm-svn: 354177
2019-02-15 21:55:29 +00:00
Zachary Turner 63c300cfc1 Don't include UnixSignals.h from Host.
Host had a function to get the UnixSignals instance corresponding
to the current host architecture.  This means that Host had to
include a file from Target.  To break this dependency, just make
this a static function directly in UnixSignals.  We already have
the function UnixSignals::Create(ArchSpec) anyway, so we just
need to have UnixSignals::CreateForHost() which determines which
value to pass for the ArchSpec.

The goal here is to eventually break the Host->Target->Host
circular dependency.

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

llvm-svn: 354168
2019-02-15 20:43:56 +00:00
Michal Gorny 53eabaab3f [lldb] [MainLoop] Add kevent() EINTR handling
Add missing EINTR handling for kevent() calls.  If the call is
interrupted, return from Poll() as if zero events were returned and let
the polling resume on next iteration.  This fixes test flakiness
on NetBSD.

Includes a test case suggested by Pavel Labath on D42206.

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

llvm-svn: 354122
2019-02-15 12:13:02 +00:00
Michal Gorny f6e5594e81 [lldb] [unittest] Avoid mixing '127.0.0.1' and 'localhost'
Fix the tests not to use '127.0.0.1' and 'localhost' interchangeably.
More specifically, since tests bind specifically to 127.0.0.1, connect
to that address as well; using 'localhost' can resolve to IPv6 address
which can cause issues -- for example, if the matching port happens to
be used by some other process, the tests hang forever waiting for
the client to connect.

While technically the case of randomly selected IPv4 port being taken
on IPv6 loopback is not very likely, NetBSD happens to be suffering from
some weird kernel issue where connection to that port succeeds
nevertheless.  Until we can really figure out what goes wrong there,
this saves us from the tests hanging randomly.

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

llvm-svn: 353868
2019-02-12 18:09:00 +00:00
Michal Gorny 01486b22bb [lldb] [unittests] Disable MainLoopTest::DetectsEOF on NetBSD
The NetBSD kernel currently does not support detecting closed slave pty
via kevent on master pty.  This causes the test to hang forever.
To avoid that, disable the test until the kernel is fixed.

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

llvm-svn: 353545
2019-02-08 18:56:11 +00:00
Pavel Labath bae220ce9c Fix headers for files added in r353047
I started working on that patch before the headers were updated. Since
they were new files, I didn't get any conflicts during rebase.

llvm-svn: 353429
2019-02-07 17:16:25 +00:00
Pavel Labath a5d19759b2 Fix signed/unsigned mismatches in ProcessInfoTest.cpp
llvm-svn: 353420
2019-02-07 15:56:40 +00:00
Pavel Labath eef758e949 Move FileAction, ProcessInfo and ProcessLaunchInfo from Target to Host
Summary:
These classes describe the details of the process we are about to
launch, and so they are naturally used by the launching code in the Host
module. Previously they were present in Target because that is the most
important (but by far not the only) user of the launching code.

Since the launching code has other customers, must of which do not care
about Targets, it makes sense to move these classes to the Host layer,
next to the launching code.

This move reduces the number of times that Target is included from host
to 8 (it used to be 14).

Reviewers: zturner, clayborg, jingham, davide, teemperor

Subscribers: emaste, mgorny, lldb-commits

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

llvm-svn: 353047
2019-02-04 14:28:08 +00:00