Commit Graph

15935 Commits

Author SHA1 Message Date
Tim Hammerquist e4885f8999 fix xunit attribute parsing
llvm-svn: 297538
2017-03-11 00:58:41 +00:00
Jason Molenda 19cf689a9e Simplify & correct the patch I wrote in r297441, after thinking
about this more I realized I could make the change isolated to
whether we decide an empty accelerator table is valid or not.
<rdar://problem/30867462>

llvm-svn: 297496
2017-03-10 19:31:54 +00:00
Jason Molenda bc3a47f31d Add a distinction in an apple accelerator table between IsValid and
HasContent.  If we have a valid accelerator table which has no
content, we want to depend on that (empty) table as the authoritative
source instead of reading through all the debug info for lookups.
<rdar://problem/30867462> 

llvm-svn: 297441
2017-03-10 06:38:19 +00:00
Jason Molenda 73b76ce563 Mark this as skipped for now. There is a race condition with
SectionLoadList exposed by this test.  Greg tried to chase it down
& got pretty far but the isn't correct so we'll disable this test
for now until I can figure that out.

<rdar://problem/30899227> 

llvm-svn: 297440
2017-03-10 05:33:27 +00:00
Zachary Turner 30fdb05ddb Make the LLDB test suite work with MSVC 2017 on Windows.
llvm-svn: 297405
2017-03-09 19:54:23 +00:00
Pavel Labath 49b112fcce cmake: Increase LINK_INTERFACE_MULTIPLICITY of lldbCore
This is necessary to get debug builds of unit tests working on linux.

I think we are at a point where removing dependencies does not prevent
us from depending on the whole world yet. What it does do though, is
make the dependency chains longer as the dependency graph gets sparser,
which means we need to repeat the libraries more times to get the thing
to link.

llvm-svn: 297369
2017-03-09 10:16:15 +00:00
Pavel Labath f5aaa999b9 Fix remaining threading issues in Log.h
Summary:
This fixes two threading issues in the logging code. The access to the
mask and options flags had data races when we were trying to
enable/disable logging while another thread was writing to the log.
Since we can log from almost any context, and we want it to be fast, so
I avoided locking primitives and used atomic variables instead. I have
also removed the (unused) setters for the mask and flags to make sure
that the only way to set them is through the enable/disable channel
functions.

I also add tests, which when run under tsan, verify that the use cases
like "doing an LLDB_LOGV while another thread disables logging" are
data-race-free.

Reviewers: zturner, clayborg

Subscribers: lldb-commits

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

llvm-svn: 297368
2017-03-09 10:16:07 +00:00
Zachary Turner d82067f83a Remove LLDB's recursive directory deletion function.
LLVM now has such a function, so we use that instead.

llvm-svn: 297360
2017-03-09 05:12:36 +00:00
Zachary Turner 7d86ee5ab0 Resubmit FileSystem changes.
This was originall reverted due to some test failures in
ModuleCache and TestCompDirSymlink.  These issues have all
been resolved and the code now passes all tests.

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

llvm-svn: 297300
2017-03-08 17:56:08 +00:00
Pavel Labath 9ef5778038 Android.rules: fix computation of gcc toolchain directory on arm
The toolchain directory for arm android targets was computed
incorrectly. The architecture part should be arm, and the environment
part androideabi. This fixes that.

llvm-svn: 297279
2017-03-08 14:57:15 +00:00
Jason Molenda cfbdbe4a76 Back to xfailing this. For some reason on our buildbots
it fails, but it works on the local workstations.  I'll
need to figure out what the difference is between these.
<rdar://problem/30915340> 

llvm-svn: 297259
2017-03-08 06:45:34 +00:00
Jason Molenda 07d4e7632e TestQueues should be passing again, remove the expected fail.
llvm-svn: 297258
2017-03-08 05:51:00 +00:00
Eugene Zemtsov 7993cc5eed Make LLDB skip server-client roundtrip for signals that don't require any actions
If QPassSignals packaet is supported by lldb-server, lldb-client will
utilize it and ask the server to ignore signals that don't require stops
or notifications.
Such signals will be immediately re-injected into inferior to continue
normal execution.

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

llvm-svn: 297231
2017-03-07 21:34:40 +00:00
Tim Hammerquist a64fafc7b6 fix format specifier warnings
llvm-svn: 297228
2017-03-07 21:26:04 +00:00
Pavel Labath 8faf9b750a Android.rules: add support for clang compiler
Summary:
building executables with the NDK clang requires -target and
-gcc-toolchain arguments.

Reviewers: eugene, danalbert

Subscribers: srhines, lldb-commits

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

llvm-svn: 297145
2017-03-07 14:57:37 +00:00
Pavel Labath 30e6cbfcfc Revert "Use LLVM for all stat-related functionality."
this reverts r297116 because it breaks the unittests and
TestCompDirSymlink. The ModuleCache unit test is trivially fixable, but
the CompDirSymlink failure is a symptom of a deeper problem: llvm's stat
functionality is not a drop-in replacement for lldb's. The former is
based on stat(2) (which does symlink resolution), while the latter is
based on lstat(2) (which does not).

This also reverts subsequent build fixes (r297128, r297120, 297117) and
r297119 (Remove FileSpec dependency on FileSystem) which builds on top
of this.

llvm-svn: 297139
2017-03-07 13:19:15 +00:00
Sean Callanan 8f0a62a999 Fixed a missing brace.
llvm-svn: 297128
2017-03-07 08:31:41 +00:00
Zachary Turner b3c6541c2c Fix FreeBSD build.
llvm-svn: 297120
2017-03-07 04:58:53 +00:00
Zachary Turner 3a6b091c23 Remove FileSpec dependency on FileSystem.
llvm-svn: 297119
2017-03-07 04:58:06 +00:00
Zachary Turner e7a172a140 Fix linux build.
llvm-svn: 297117
2017-03-07 03:58:59 +00:00
Zachary Turner 990e3cd8e2 Use LLVM for all stat-related functionality.
This deletes LLDB's FileType enumeration and replaces all
users, and all calls to functions that check whether a file
exists etc with corresponding calls to LLVM.

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

llvm-svn: 297116
2017-03-07 03:43:17 +00:00
Jason Molenda b677688546 cleanup.
llvm-svn: 297104
2017-03-07 00:00:35 +00:00
Zachary Turner 4af068ea55 Add missing include in FileSpec.
llvm-svn: 297102
2017-03-06 23:52:57 +00:00
Zachary Turner 8c6b546dfd Remove dependency from FileSpec to ArchSpec.
All it really needs is the llvm::Triple, so make FileSpec take
the Triple directly instead of the ArchSpec.

llvm-svn: 297096
2017-03-06 23:42:44 +00:00
Zachary Turner 7f6a7a3752 Remove FileSpec::ReadFileContents.
This functionality is subsumed by DataBufferLLVM, which is
also more efficient since it will try to mmap.  However, we
don't yet support mmaping writable private sections, and in
some cases we were using ReadFileContents and then modifying
the buffer.  To address that I've added a flag to the
DataBufferLLVM methods that allow you to map privately, which
disables the mmaping path entirely.  Eventually we should teach
DataBufferLLVM to use mmap with writable private, but that is
orthogonal to this effort.

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

llvm-svn: 297095
2017-03-06 23:42:14 +00:00
Pavel Labath a96eac62d6 Update log_options unit test
it was accessing the details of the Log class directly. Let it go
through the channel class instead.

This also discovered a bug when we were setting but not clearing the log
options when enabling a channel.

llvm-svn: 297053
2017-03-06 19:10:19 +00:00
Zachary Turner fb1a0a0d2f Move many other files from Core -> Utility.
llvm-svn: 297043
2017-03-06 18:34:25 +00:00
Zachary Turner 1d752974c1 A few improvements to deps analysis scripts.
1) Looks in Plugins and clang
2) Adds a mode to display the deps sorted by the number of times
   the deps occurs in a particular project

llvm-svn: 297036
2017-03-06 17:41:00 +00:00
Zachary Turner e030d10b62 Fix line endings of deps analysis script.
llvm-svn: 297035
2017-03-06 17:40:36 +00:00
Pavel Labath ca367ce3ad Fix Log unit tests
the llvm function for getting the thread name dropped the _np suffix
during review. Zachary's commit did not reflect that.

llvm-svn: 297013
2017-03-06 15:17:36 +00:00
Zachary Turner 777de77956 Truncate thread names if they're too long.
llvm-svn: 296972
2017-03-04 16:42:25 +00:00
Sean Callanan d1471f1108 Project file fixes after movement of Data* and removal of ThisThread.cpp
llvm-svn: 296963
2017-03-04 08:05:54 +00:00
Sean Callanan 9984624edf Disable the lldb-mi tests on remote platforms.
Currently on remote platforms the lldb-mi tests fail, which means they time out.
Given how many of the lldb-mi tests there are, this means a long wait.

llvm-svn: 296951
2017-03-04 01:48:43 +00:00
Zachary Turner 8cb0a4901d Fix a bug in the dep analysis script.
It wasn't always normalizing slashes correctly, so you'd end
up with the same thing in the map twice.

llvm-svn: 296947
2017-03-04 01:31:29 +00:00
Zachary Turner ed96be99fa Delete LLDB's code for getting / setting thread name.
This is now functionality in LLVM, and all callers have
already been updated to use the LLVM functions.

llvm-svn: 296946
2017-03-04 01:31:06 +00:00
Zachary Turner 382f45e755 Add dependency on DynamicLoaderStatic to Utility.
llvm-svn: 296944
2017-03-04 01:30:38 +00:00
Zachary Turner 666cc0b291 Move DataBuffer / DataExtractor and friends from Core -> Utility.
llvm-svn: 296943
2017-03-04 01:30:05 +00:00
Zachary Turner 0e1d52ae51 Move UUID from Core -> Utility.
llvm-svn: 296941
2017-03-04 01:28:55 +00:00
Jim Ingham c963f20e4c Fix the macOS build all the way after r296909.
llvm-svn: 296938
2017-03-04 01:15:24 +00:00
Zachary Turner 9739a552c2 Fix DataExtractor failures.
Some code that doesn't get compiled on Windows had some references
that needed updating, and I missed those.

llvm-svn: 296930
2017-03-03 23:52:09 +00:00
Tim Hammerquist 80f5f00ec1 Fix Darwin failures introduced in r296909
llvm-svn: 296925
2017-03-03 23:17:29 +00:00
Sean Callanan 56435c91c9 Fixed repo.py to not send git errors to stderr.
Some repos are not git repos, so git is expected 
to fail.  These errors should not go to stderr,
because Xcode interprets them as failures.

llvm-svn: 296924
2017-03-03 23:13:30 +00:00
Zachary Turner 5013eb9e1a Add a script to dump out all project inter-dependencies.
llvm-svn: 296920
2017-03-03 22:40:46 +00:00
Zachary Turner 29cb868aa4 Isolate Target-specific functionality of DataExtractor.
In an effort to move the various DataBuffer / DataExtractor
classes from Core -> Utility, we have to separate the low-level
functionality from the higher level functionality.  Only a
few functions required anything other than reading/writing
raw bytes, so those functions are separated out into a
more appropriate area.  Specifically, Dump() and DumpHexBytes()
are moved into free functions in Core/DumpDataExtractor.cpp,
and GetGNUEHPointer is moved into a static function in the
only file that it's referenced from.

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

llvm-svn: 296910
2017-03-03 20:57:05 +00:00
Zachary Turner 6f9e690199 Move Log from Core -> Utility.
All references to Host and Core have been removed, so this
class can now safely be lowered into Utility.

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

llvm-svn: 296909
2017-03-03 20:56:28 +00:00
Zachary Turner 1e021a162e [Windows] Remove the #include <eh.h> hack.
Prior to MSVC 2015 we had to manually include this header any
time we were going to include <thread> or <future> due to a
bug in MSVC's STL implementation.  This has been fixed in MSVC
for some time now, and we require VS 2015 minimum, so we can
remove this across all subprojects.

llvm-svn: 296906
2017-03-03 20:21:59 +00:00
Pavel Labath 8409cc0ece Android.rules: fix building on mac
realpath is not available as an executable on mac. I give up, I am just
going to leave the path with ..'s in it.

llvm-svn: 296885
2017-03-03 17:03:46 +00:00
Pavel Labath 924ead6fdb Android.rules: fix building on windows
$(realpath), which I guess is a make builtin, gives strange results on
Windows. $(shell realpath) invokes the gnuwin external binary, which
works correctly.

llvm-svn: 296876
2017-03-03 16:29:56 +00:00
Pavel Labath 4438bf7498 test: shorten test trace file names
Make sure we don't generate extremely long file names for test trace log
file, as this can cause path-too-long errors. As the compilers in the
android ndk are deeply nested, it's very easy to trigger these.

I chose to output at most 4 path components -- this should keep the full
path for common cases like /usr/bin/gcc with room to spare, and should
be enough to uniquely identify the compiler for more deeply nested
cases.

llvm-svn: 296870
2017-03-03 13:49:38 +00:00
Pavel Labath bc58f9aa7b testsuite/android: build test executables with the android ndk directly
Summary:
This teaches the test makefiles about the Android NDK, so we are able to
run the tests without first going through the make_standalone_toolchain
script. The motivation for this is the ability to run both libc++ and
libstdc++ tests together, which previously was not possible because
make_standalone_toolchain bakes in the STL to use during toolchain
creation time. The support for this is not present yet -- this change
only make sure we don't regress for existing funcionality (gcc w/
libstdc++). Clang and libc++ support will be added later.

I've checked that the mips android targets compile after this change,
but I have no way of checking whether this breaks anything. If you are
reading this and it broke you, let me know.

Reviewers: tberghammer, danalbert

Subscribers: srhines, lldb-commits

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

llvm-svn: 296869
2017-03-03 13:49:34 +00:00