lldb.git
18 months ago[ABI] Remove dead code that was copy-pasted all around. NFCI. master
Davide Italiano [Sat, 18 Nov 2017 00:54:31 +0000 (00:54 +0000)]
[ABI] Remove dead code that was copy-pasted all around. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318580 91177308-0d34-0410-b5e6-96231b3b80d8

18 months ago[Module] Throw away some more commented code. NFCI.
Davide Italiano [Sat, 18 Nov 2017 00:52:29 +0000 (00:52 +0000)]
[Module] Throw away some more commented code. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318579 91177308-0d34-0410-b5e6-96231b3b80d8

18 months ago[ABI/SysV] Remove more dead code. NFCI.
Davide Italiano [Sat, 18 Nov 2017 00:35:27 +0000 (00:35 +0000)]
[ABI/SysV] Remove more dead code. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318577 91177308-0d34-0410-b5e6-96231b3b80d8

18 months ago[Core] Garbage collect dead code untouched in years. NFCI.
Davide Italiano [Sat, 18 Nov 2017 00:34:09 +0000 (00:34 +0000)]
[Core] Garbage collect dead code untouched in years. NFCI.

This sketching can be resurrected if anybody needs it, although
I doubt is relevant these days.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318576 91177308-0d34-0410-b5e6-96231b3b80d8

18 months ago[lldb] Ensure that dwo/dwp are not double-indexed
Alexander Shaposhnikov [Fri, 17 Nov 2017 20:50:54 +0000 (20:50 +0000)]
[lldb] Ensure that dwo/dwp are not double-indexed

DWO/DWP should not be indexed directly.
Instead, the corresponding base file should be used.
This diff adds an assert to DWARFCompileUnit::Index
and adjusts the methods
SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE,
SymbolFileDWARF::GetObjCMethodDIEOffsets accordingly.

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318554 91177308-0d34-0410-b5e6-96231b3b80d8

18 months agoFix LLDB build.
Eugene Zemtsov [Fri, 17 Nov 2017 03:28:58 +0000 (03:28 +0000)]
Fix LLDB build.

It was broken by r318489.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318504 91177308-0d34-0410-b5e6-96231b3b80d8

18 months agoUpdate xcode project file to build new ppc64le files.
Jason Molenda [Fri, 17 Nov 2017 01:55:50 +0000 (01:55 +0000)]
Update xcode project file to build new ppc64le files.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318500 91177308-0d34-0410-b5e6-96231b3b80d8

18 months agoRecognize another magic token sent in the LaunchInfo's EventData.
Jim Ingham [Fri, 17 Nov 2017 01:22:34 +0000 (01:22 +0000)]
Recognize another magic token sent in the LaunchInfo's EventData.

<rdar://problem/32505028>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318496 91177308-0d34-0410-b5e6-96231b3b80d8

18 months ago"source list -a" was calling DisplaySourceLinesWithNumbers incorrectly.
Jim Ingham [Fri, 17 Nov 2017 01:19:59 +0000 (01:19 +0000)]
"source list -a" was calling DisplaySourceLinesWithNumbers incorrectly.

The parameters were just passed in the wrong order.

<rdar://problem/35150446>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318495 91177308-0d34-0410-b5e6-96231b3b80d8

18 months agoFixed up to use a class for the commands, renamed the commands and added a way to...
Greg Clayton [Thu, 16 Nov 2017 17:14:48 +0000 (17:14 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318424 91177308-0d34-0410-b5e6-96231b3b80d8

18 months agoImplement core dump debugging for PPC64le
Pavel Labath [Thu, 16 Nov 2017 13:38:57 +0000 (13:38 +0000)]
Implement core dump debugging for PPC64le

Summary: Implement core dump debugging for PPC64le.

Reviewers: labath

Reviewed By: labath

Subscribers: JDevlieghere, krytarowski, clayborg, labath, lbianc, nemanjai, gut, anajuliapc, mgorny, kbarton, lldb-commits

Differential Revision: https://reviews.llvm.org/D39681
Patch by Alexandre Yukio Yamashita <alexandre.yamashita@eldorado.org.br>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318399 91177308-0d34-0410-b5e6-96231b3b80d8

18 months agoFix alignment of arm64 fpu register context structure
Jason Molenda [Thu, 16 Nov 2017 00:50:29 +0000 (00:50 +0000)]
Fix alignment of arm64 fpu register context structure
so it has the same padding as the kernel's definition
which is written in terms of uint128_t.  Original patch
by Ryan Mansfield.

<rdar://problem/35468499>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318357 91177308-0d34-0410-b5e6-96231b3b80d8

18 months ago[POSIX] Replace assert with llvm_unreachable(). NFCI.
Davide Italiano [Wed, 15 Nov 2017 23:39:41 +0000 (23:39 +0000)]
[POSIX] Replace assert with llvm_unreachable(). NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318348 91177308-0d34-0410-b5e6-96231b3b80d8

18 months agoRoll back r318260 because it is causing the windows bot to
Jason Molenda [Wed, 15 Nov 2017 03:41:47 +0000 (03:41 +0000)]
Roll back r318260 because it is causing the windows bot to
break.  The alignas(__uint128_t) is not recognized with MSVC
it looks like.  Zachary, is there a similar type on windows?
I suppose I can go with alignas(16) here but I'd prefer to
specify the type alignment that I want & let the ABI dictate
how much padding is required.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318262 91177308-0d34-0410-b5e6-96231b3b80d8

18 months agoTwo small fixes to handle arm64 fpu register contexts in
Jason Molenda [Wed, 15 Nov 2017 03:18:24 +0000 (03:18 +0000)]
Two small fixes to handle arm64 fpu register contexts in
a Mach-O file load command correctly, patch by Ryan
Mansfield.

<rdar://problem/35468499>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318260 91177308-0d34-0410-b5e6-96231b3b80d8

18 months agoUpdate xcode project file to track ArchSpec.cpp
Jason Molenda [Tue, 14 Nov 2017 23:15:35 +0000 (23:15 +0000)]
Update xcode project file to track ArchSpec.cpp
move and LibCxxBitset.cpp addition.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318218 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAdd check for self-assignment. NFC
Don Hinton [Tue, 14 Nov 2017 18:19:41 +0000 (18:19 +0000)]
Add check for self-assignment.  NFC

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318164 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAdd a data formatter for libc++ std::bitset
Pavel Labath [Tue, 14 Nov 2017 11:15:03 +0000 (11:15 +0000)]
Add a data formatter for libc++ std::bitset

Reviewers: jingham, EricWF

Subscribers: mgorny, lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318145 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoReformat a comment. NFC.
Stephane Sezer [Mon, 13 Nov 2017 20:13:25 +0000 (20:13 +0000)]
Reformat a comment. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318079 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoFix netbsd, freebsd and osx builds for ArchSpec move
Pavel Labath [Mon, 13 Nov 2017 16:47:37 +0000 (16:47 +0000)]
Fix netbsd, freebsd and osx builds for ArchSpec move

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318052 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoMove ArchSpec to the Utility module
Pavel Labath [Mon, 13 Nov 2017 16:16:33 +0000 (16:16 +0000)]
Move ArchSpec to the Utility module

The rationale here is that ArchSpec is used throughout the codebase,
including in places which should not depend on the rest of the code in
the Core module.

This commit touches many files, but most of it is just renaming of
 #include lines. In a couple of cases, I removed the #include ArchSpec
line altogether, as the file was not using it. In one or two places,
this necessitated adding other #includes like lldb-private-defines.h.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318048 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoRemove last Host usage from ArchSpec
Pavel Labath [Mon, 13 Nov 2017 15:57:20 +0000 (15:57 +0000)]
Remove last Host usage from ArchSpec

Summary:
In D39387, I was quick to jump to conclusion that ArchSpec has no
external dependencies. It turns there still was one call to
HostInfo::GetArchitecture left -- for implementing the "systemArch32"
architecture and friends.

Since GetAugmentedArchSpec is the place we handle these "incomplete"
triples that don't specify os or vendor and "systemArch" looks very much
like an incomplete triple, I move its handling there.

After this ArchSpec *really* does not have external dependencies, and
I'll move it to the Utility module as a follow-up.

Reviewers: zturner, clayborg, jingham

Subscribers: lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318046 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoCompilerType: Add ability to retrieve an integral template argument
Pavel Labath [Mon, 13 Nov 2017 14:26:21 +0000 (14:26 +0000)]
CompilerType: Add ability to retrieve an integral template argument

Summary:
Despite it's name, GetTemplateArgument was only really working for Type
template arguments. This adds the ability to retrieve integral arguments
as well (which I've needed for the std::bitset data formatter).

I've done this by splitting the function into three pieces. The idea is
that one first calls GetTemplateArgumentKind (first function) to
determine the what kind of a parameter this is. Based on that, one can
then use specialized functions to retrieve the correct value. Currently,
I only implement two of these: GetTypeTemplateArgument and
GetIntegralTemplateArgument.

Reviewers: jingham, clayborg

Subscribers: lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318040 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoRevert "[lldb] Use OrcMCJITReplacement rather than MCJIT as the underlying JIT for...
Pavel Labath [Mon, 13 Nov 2017 14:03:17 +0000 (14:03 +0000)]
Revert "[lldb] Use OrcMCJITReplacement rather than MCJIT as the underlying JIT for LLDB"

This commit really did not introduce any functional changes (for most
people) but it turns out it's not for the reason we thought it was.

The reason wasn't that Orc is a perfect drop-in replacement for MCJIT,
but it was because we were never using Orc in the first place, as it was
not initialized.

Orc's initialization relies on a global constructor in the LLVMOrcJIT.a.
Since this archive does not expose any symbols referenced from other
object files, it does not get linked into liblldb when linking against
llvm components statically. However, in an LLVM_LINK_LLVM_DYLIB=On
build, LLVMOrcJit.a is linked into libLLVM.so using --whole-archive, so
the global constructor does end up firing.

The result of using Orc jit is pr34194, where lldb fails to evaluate
even very simple expressions. This bug can be reproduced in
non-LLVM_LINK_LLVM_DYLIB builds by making sure Orc jit is linked into
liblldb, for example by #including
llvm/ExecutionEngine/OrcMCJITReplacement.h in IRExecutionUnit.cpp (and
adding OrcJIT as a dependency to the relevant CMakeLists.txt file). The
bug reproduces (at least) on linux and osx.

The root cause of the bug seems to be related to relocation processing.
It seems Orc processes relocations earlier than the system it is
replacing. This means the relocation processing happens before we have
had a chance to remap section load addresses to reflect their address in
the target process memory, so they end up pointing to locations in the
lldb's address space instead.

I am not sure whether this is a bug in Orc jit, or in how we are using
it from lldb, but in any case it is preventing us from using Orc right
now. Reverting this fixes LLVM_LINK_LLVM_DYLIB build, and makes it clear
that we are in fact *not* using Orc, and we never really were.

This reverts commit r279327.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@318039 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAdded a way to dump the full paths to all source files in a module that has debug...
Greg Clayton [Fri, 10 Nov 2017 22:39:07 +0000 (22:39 +0000)]
Added a way to dump the full paths to all source files in a module that has debug info.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317945 91177308-0d34-0410-b5e6-96231b3b80d8

19 months ago[lldb] Remove unused method declaration
Alexander Shaposhnikov [Fri, 10 Nov 2017 19:40:53 +0000 (19:40 +0000)]
[lldb] Remove unused method declaration

FindCompleteObjCDefinitionType is not used anywhere and there is no implementation of it, only a declaration.

Test plan: make check-lldb

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317919 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoClean up NativeRegisterContext
Pavel Labath [Fri, 10 Nov 2017 11:05:49 +0000 (11:05 +0000)]
Clean up NativeRegisterContext

Summary:
This commit removes the concrete_frame_idx member from
NativeRegisterContext and related functions, which was always set to
zero and never used.

I also change the native thread class to store a NativeRegisterContext
as a unique_ptr (documenting the ownership) and make sure it is always
initialized (most of the code was already blindly dereferencing the
register context pointer, assuming it would always be present -- this
makes its treatment consistent).

Reviewers: eugene, clayborg, krytarowski

Subscribers: aemerson, sdardis, nemanjai, javed.absar, arichardson, kristof.beyls, kbarton, uweigand, alexandreyy, lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317881 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agollgs-tests: Replace the "log+return false" pattern with llvm::Error
Pavel Labath [Thu, 9 Nov 2017 15:45:09 +0000 (15:45 +0000)]
llgs-tests: Replace the "log+return false" pattern with llvm::Error

Summary:
These tests used to log the error message and return plain bool mainly
because at the time they we written, we did not have a nice way to
assert on llvm::Error values. That is no longer true, so replace this
pattern with a more idiomatic approach.

As a part of this patch, I also move the formatting of
GDBRemoteCommunication::PacketResult values out of the test code, as
that can be useful elsewhere.

Reviewers: zturner, eugene

Subscribers: mgorny, lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317795 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAdd a unit test for ClangASTContext template arguments handling
Pavel Labath [Thu, 9 Nov 2017 15:06:31 +0000 (15:06 +0000)]
Add a unit test for ClangASTContext template arguments handling

I am planning to make changes to this piece of code, so I wrote this
test to add more coverage to it first.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317792 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoSimplify NativeProcessProtocol::GetArchitecture/GetByteOrder
Pavel Labath [Thu, 9 Nov 2017 10:43:16 +0000 (10:43 +0000)]
Simplify NativeProcessProtocol::GetArchitecture/GetByteOrder

Summary:
These functions used to return bool to signify whether they were able to
retrieve the data. This is redundant because the ArchSpec and ByteOrder
already have their own "invalid" states, *and* because both of the
current implementations (linux, netbsd) can always provide a valid
result.

This allows us to simplify bits of the code handling these values.

Reviewers: eugene, krytarowski

Subscribers: javed.absar, lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317779 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoXfail TestConcurrentTwoWatchpointsOneSignal on arm
Pavel Labath [Wed, 8 Nov 2017 11:51:49 +0000 (11:51 +0000)]
Xfail TestConcurrentTwoWatchpointsOneSignal on arm

r317561 exposed an interesting bug (pr35228) in handling of simultaneous
watchpoint hits. Disabling the test until we can get that fixed.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317683 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoLog: delimit thread name in log message
Pavel Labath [Wed, 8 Nov 2017 10:48:54 +0000 (10:48 +0000)]
Log: delimit thread name in log message

The thread name was not followed by a space, which meant it was glued to
the log message. I also align the name as we do that with other log
fields. I align it to 16 chars instead of llvm::max_thread_name(), as
that can be 64 on darwin, which is rather long. If anybody feels
differently about that, we can change it.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317679 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoMake TestTopLevelExprs more robust in face of linker GC
Pavel Labath [Wed, 8 Nov 2017 10:48:50 +0000 (10:48 +0000)]
Make TestTopLevelExprs more robust in face of linker GC

Summary:
This test was failing in various configurations on linux in a fairly
unpredictible way. The success depended on whether the c++ abi library
was linked in statically or not and how well was the linker able to
strip parts of it. This introduces additional code to the "dummmy" test
executable, which ensures that all parts of the library needed to
evaluate the expressions are always present.

Reviewers: clayborg

Subscribers: srhines, tatyana-krasnukha, davide, lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317678 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoUpdate tuple/list/deque data formatters to work with newest libc++
Pavel Labath [Tue, 7 Nov 2017 22:17:29 +0000 (22:17 +0000)]
Update tuple/list/deque data formatters to work with newest libc++

Summary:
A couple of members of these data structures have been renamed in recent
months. This makes sure they still work with the latest libc++ version.

Reviewers: jingham, EricWF

Subscribers: lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317624 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoFix an issue in r317563 causing a clang assert
Tamas Berghammer [Tue, 7 Nov 2017 13:43:55 +0000 (13:43 +0000)]
Fix an issue in r317563 causing a clang assert

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317574 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoSupport scoped enums in the DWARF AST parser
Tamas Berghammer [Tue, 7 Nov 2017 10:39:22 +0000 (10:39 +0000)]
Support scoped enums in the DWARF AST parser

Subscribers: JDevlieghere

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317563 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agotest: Clean up finalize_build_dictionary
Pavel Labath [Tue, 7 Nov 2017 10:36:42 +0000 (10:36 +0000)]
test: Clean up finalize_build_dictionary

We only support API>=16 now, so we don't need to check the API level of
the android device.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317562 91177308-0d34-0410-b5e6-96231b3b80d8

19 months ago"Fix" concurrent events test for arm
Pavel Labath [Tue, 7 Nov 2017 10:36:36 +0000 (10:36 +0000)]
"Fix" concurrent events test for arm

Summary:
The test incremented an atomic varible to trigger the watchpoint event.
On arm64 this compiled to a ldaxr/stlxr loop, with the watchpoint being
triggered in the middle of the loop. Hitting the watchpoint resets the
exclusive monitor, and forces the process to loop one more time, hitting
the watchpoint again, etc.

While it would be nice if the debugger was able to resume from this
situation, this is not trivial, and is not what this test is about.
Therefore, I propose to change this to a simple store to a normal
variable (which should still trip the watchpoint everywhere, but without
atomic loops) and file a bug to investigate the possibilities of
handling the watchpoints in atomic loops in a more reasonable way.

Reviewers: clayborg

Subscribers: aemerson, kristof.beyls, lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317561 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoDisable tests in lang/c/shared_lib on Windows
Stephane Sezer [Tue, 7 Nov 2017 00:14:40 +0000 (00:14 +0000)]
Disable tests in lang/c/shared_lib on Windows

Summary: These fail because `-fPIC` is not supported on Windows.

Reviewers: zturner, jingham, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317529 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAdd a dependency from check-lldb on lld
Stephane Sezer [Mon, 6 Nov 2017 19:25:33 +0000 (19:25 +0000)]
Add a dependency from check-lldb on lld

Summary:
This is required when using the in-tree clang for building tests,
because -fuse-ld=lld is used by default.

Subscribers: mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317501 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoExtend android xfail in TestTopLevelExprs
Pavel Labath [Mon, 6 Nov 2017 12:34:27 +0000 (12:34 +0000)]
Extend android xfail in TestTopLevelExprs

The test fails on API level 19 as well. I'm going to assume that it
fails on every API level below 23.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317474 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoImprove the posix core file triple detection
Tamas Berghammer [Sat, 4 Nov 2017 18:25:51 +0000 (18:25 +0000)]
Improve the posix core file triple detection

Summary:
Posix core files sometime don't contain enough information to correctly
detect the OS. If that is the case we should use the OS from the target
instead as it will contain usable information in more cases and if the
target and the core contain different OS-es then we are already in a
pretty bad state so moving from an unknown OS to a known (but possibly
incorrect) OS will do no harm.

We already had similar code in place for MIPS. This change tries to make
it more generic by using ArchSpec::MergeFrom and extends it to all
architectures but some MIPS specific issue prevent us from getting rid
of special casing MIPS.

Reviewers: clayborg, nitesh.jain

Subscribers: aemerson, sdardis, arichardson, kristof.beyls, lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317411 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoRemove ProcessGdbRemote::m_flags
Pavel Labath [Fri, 3 Nov 2017 22:12:50 +0000 (22:12 +0000)]
Remove ProcessGdbRemote::m_flags

The member is completely unused. Discussed on lldb-dev.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317377 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAdd float/vector registers for ppc64le
Pavel Labath [Fri, 3 Nov 2017 15:22:36 +0000 (15:22 +0000)]
Add float/vector registers for ppc64le

Summary: Add read and write functions for VSX, VMX and float registers and fix watchpoint size

Reviewers: clayborg

Reviewed By: clayborg

Subscribers: eugene, labath, clayborg, nemanjai, kbarton, JDevlieghere, anajuliapc, gut, lbianc, lldb-commits

Differential Revision: https://reviews.llvm.org/D39487
Patch by: Alexandre Yukio Yamashita <alexandre.yamashita@eldorado.org.br>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317329 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAdd type to FileSpec::PathSyntax enum.
Don Hinton [Fri, 3 Nov 2017 14:59:36 +0000 (14:59 +0000)]
Add type to FileSpec::PathSyntax enum.

Summary:
Add type to FileSpec::PathSyntax enum to decrease size for
FileSpec on systems with 32 bit pointers.

Thanks to @zturner for pointing this out.

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317327 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoXfail test_stack_info_in_minidump test
Pavel Labath [Fri, 3 Nov 2017 14:42:37 +0000 (14:42 +0000)]
Xfail test_stack_info_in_minidump test

The test has been failing since we enabled the i386 ABI plugin on
windows. See pr35193 for details.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317326 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoFix classifications on two concurrent event tests
Pavel Labath [Fri, 3 Nov 2017 12:13:22 +0000 (12:13 +0000)]
Fix classifications on two concurrent event tests

I have classified one as a watchpoint test even though it wasn't and
vice versa. Fix that.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317319 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoRemove getCategories mechanism of specifying test categories
Pavel Labath [Thu, 2 Nov 2017 22:13:09 +0000 (22:13 +0000)]
Remove getCategories mechanism of specifying test categories

Summary:
This mechanism was mostly redundant with the file-based .categories
mechanism, and it was interfering with it, as any test which implemented
a getCategories method would not inherit the filesystem categories.

This patch removes it. The existing categories are preserved either by
adding a .categories file, or using the @add_test_categories decorator.

Reviewers: jingham, clayborg, zturner

Subscribers: lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317277 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoRemove android watchpoint xfails
Pavel Labath [Thu, 2 Nov 2017 22:12:55 +0000 (22:12 +0000)]
Remove android watchpoint xfails

Now that the wathpoint tests have their own category, we can easily skip
them on devices which don't have watchpoint support. Therefore, we don't
need an android xfail on each of these tests.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317276 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoFix some warnings found by ToT clang
Pavel Labath [Thu, 2 Nov 2017 21:35:26 +0000 (21:35 +0000)]
Fix some warnings found by ToT clang

These fall into two categories:
- unused variables
- (uint8_t *)NULL + X -- changed to reinterpret_cast(X)

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317270 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoRun clang-format on lldb.cpp
Stephane Sezer [Thu, 2 Nov 2017 16:56:52 +0000 (16:56 +0000)]
Run clang-format on lldb.cpp

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317219 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoUse LLVM version string
Stephane Sezer [Thu, 2 Nov 2017 16:56:19 +0000 (16:56 +0000)]
Use LLVM version string

Summary:
macOS builds of LLDB use the bundle version from
`tools/driver/lldb-Info.plist`. That file hasn't been updated since the 4.0
release so the version we print provides no value. I also think that even if it
were up to date, that number has no meaning and displaying the version from the
LLVM tree is more valuable.

I know that Apple folks have some form of override for the clang version to
match the Xcode version, so it'd make sense for them to do the same for LLDB.

Reviewers: clayborg

Subscribers: lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317218 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoRevert r317182 for https://reviews.llvm.org/D39128
Jason Molenda [Thu, 2 Nov 2017 03:17:07 +0000 (03:17 +0000)]
Revert r317182 for  https://reviews.llvm.org/D39128
we're still failing on android.  I'll ask Larry to
ask Pavel for any tips he might be able to give.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317183 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoCommit Lawrence D'Anna's patch to change
Jason Molenda [Thu, 2 Nov 2017 02:43:27 +0000 (02:43 +0000)]
Commit Lawrence D'Anna's patch to change
SetOututFileHandle to work with IOBase.

I did make one change after checking with Larry --
I renamed SBDebugger::Flush to FlushDebuggerOutputHandles
and added a short docstring to the .i file to make it
a little clearer under which context programs may need
to use this API.

Differential Revision: https://reviews.llvm.org/D39128
<rdar://problem/34870417>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317182 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAhhhh roll back that commit, I didn't see that Lawrence had filed
Jason Molenda [Thu, 2 Nov 2017 02:33:59 +0000 (02:33 +0000)]
Ahhhh roll back that commit, I didn't see that Lawrence had filed
a separate phabracator with the revised change.  This was his
first atttempt which broke on the bots the second time too.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317181 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoCommit Lawrence D'Anna's patch to change
Jason Molenda [Thu, 2 Nov 2017 02:02:56 +0000 (02:02 +0000)]
Commit Lawrence D'Anna's patch to change
SetOututFileHandle to work with IOBase.

I did make one change after checking with Larry --
I renamed SBDebugger::Flush to FlushDebuggerOutputHandles
and added a short docstring to the .i file to make it
a little clearer under which context programs may need
to use this API.

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317180 91177308-0d34-0410-b5e6-96231b3b80d8

19 months ago[Core] Comparison for unsigned >= 0 is redundant. NFCI.
Davide Italiano [Wed, 1 Nov 2017 23:49:23 +0000 (23:49 +0000)]
[Core] Comparison for unsigned >= 0 is redundant. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317145 91177308-0d34-0410-b5e6-96231b3b80d8

19 months ago[XML] Simplify lambda removing unused capture. NFCI.
Davide Italiano [Wed, 1 Nov 2017 23:48:07 +0000 (23:48 +0000)]
[XML] Simplify lambda removing unused capture. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317144 91177308-0d34-0410-b5e6-96231b3b80d8

19 months ago[Interpreter] Remove unused variable usage. NFCI.
Davide Italiano [Wed, 1 Nov 2017 23:46:21 +0000 (23:46 +0000)]
[Interpreter] Remove unused variable usage. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317143 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agodotest: consistently call finalize_build_dictionary in debug info variants
Pavel Labath [Wed, 1 Nov 2017 22:01:03 +0000 (22:01 +0000)]
dotest: consistently call finalize_build_dictionary in debug info variants

dwarf&dwo versions were doing it, but gmodules and dsym weren't. All
this function does right now is pass OS=Android to make when targeting
android. This enables us to run dotest without manually passing --env
OS=Android.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317130 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoadd LibCxxTuple.cpp, LibCxxQueue.cpp to xcode project file.
Jason Molenda [Wed, 1 Nov 2017 21:55:35 +0000 (21:55 +0000)]
add LibCxxTuple.cpp, LibCxxQueue.cpp to xcode project file.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317129 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAdd data formatter for libc++ std::queue
Pavel Labath [Wed, 1 Nov 2017 15:52:08 +0000 (15:52 +0000)]
Add data formatter for libc++ std::queue

Summary:
std::queue is just a fancy wrapper around another container, so all we
need to do is to delegate to the it.

Reviewers: jingham, EricWF

Subscribers: srhines, mgorny, lldb-commits, eugene

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317099 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAdd data formatter for libc++ std::tuple
Pavel Labath [Wed, 1 Nov 2017 15:19:52 +0000 (15:19 +0000)]
Add data formatter for libc++ std::tuple

Reviewers: jingham, EricWF

Subscribers: srhines, eugene, lldb-commits, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317095 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoRemove uint32_t assignment operator from Status
Pavel Labath [Wed, 1 Nov 2017 15:00:58 +0000 (15:00 +0000)]
Remove uint32_t assignment operator from Status

Summary:
It is not presently used, and it's quite dangerous to use -- it assumes the
integer is an osx kern_return_t, but very few of the integers we have lying
around are mach kernel error codes. The error can still be used to a
mach error using a slightly longer (but more explicit) syntax.

Reviewers: jingham

Subscribers: lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317093 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoRemove Sean Callanan from the CODE_OWNERS, he won't have time
Jason Molenda [Wed, 1 Nov 2017 01:38:42 +0000 (01:38 +0000)]
Remove Sean Callanan from the CODE_OWNERS, he won't have time
to participate in lldb going forward.  Jim Ingham is adopting
the areas he was responsible for.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317067 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoModernize the example cmdtemplate.py.
Jim Ingham [Tue, 31 Oct 2017 22:38:24 +0000 (22:38 +0000)]
Modernize the example cmdtemplate.py.

This version relies on a newer and more convenient way
to use a class to implement a command.  It has been in place
since early 2015, so it should be pretty safe to use.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317043 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAdd a "watchpoint" test category and annotate tests appropriately
Pavel Labath [Tue, 31 Oct 2017 15:27:19 +0000 (15:27 +0000)]
Add a "watchpoint" test category and annotate tests appropriately

Most of the watchpoint tests are organized into subtrees, so we can use the
file-based .categories approach to annotate them. The exception are the
concurrent_events tests, which needed to be annotated on a per-test basis.

The motivation behind this is to provide an easy way to disable watchpoint
tests on systems where the watchpoint functionality is not present/unreliable.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@317004 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoFix LLVM_LINK_LLVM_DYLIB build (pr35053)
Pavel Labath [Tue, 31 Oct 2017 13:23:19 +0000 (13:23 +0000)]
Fix LLVM_LINK_LLVM_DYLIB build (pr35053)

Summary:
r316368 broke this build when it introduced a reference to a pthread
function to the Utility module. This caused cmake to generate an
incorrect link line (wrong order of libs) because it did not see the
dependency from Utility to the system libraries. Instead these libraries
were being manually added to each final target.

This changes moves the dependency management from the individual targets
to the lldbUtility module, which is consistent with how llvm does it.
The final targets will pick up these libraries as they will be a part of
the link interface of the module.

Technically, some of these dependencies could go into the host module,
as that's where most of the os-specific code is, but I did not try to
investigate which ones.

Reviewers: zturner, sylvestre.ledru

Subscribers: lldb-commits, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316997 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoIncrease AdbClient read timeout
Pavel Labath [Tue, 31 Oct 2017 12:27:46 +0000 (12:27 +0000)]
Increase AdbClient read timeout

The previous value was not sufficient for Pixel 2 phones. One would have
hoped that the newer phones are faster, but that does not seem to be the
case here.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316993 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAdd data formatter for libc++'s forward_list
Pavel Labath [Tue, 31 Oct 2017 12:27:43 +0000 (12:27 +0000)]
Add data formatter for libc++'s forward_list

Summary:
This adds a data formatter for the implementation of forward_list in
libc++. I've refactored the existing std::list data formatter a bit to
enable more sharing of code (mainly the loop detection stuff).

Reviewers: jingham, EricWF

Subscribers: srhines, eugene, lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316992 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoFix mac build broken in r316987
Pavel Labath [Tue, 31 Oct 2017 11:48:33 +0000 (11:48 +0000)]
Fix mac build broken in r316987

Forgot one occurence of ArchSpec::SetTriple in mac-specific code.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316990 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoInvert ArchSpec<->Platform dependency
Pavel Labath [Tue, 31 Oct 2017 10:56:03 +0000 (10:56 +0000)]
Invert ArchSpec<->Platform dependency

Summary:
ArchSpec::SetTriple was taking a Platform as an argument, and used it to
fill in missing pieces of the specified triple. I invert the dependency
by moving this code to other classes. For this purpose, I've created
three new functions.
- HostInfo::GetAugmentedArchSpec: fills in the triple using the host
  platform (this used to be implemented by passing a null platform
  pointer). By putting this code in the Host module, we can provide a
  way to anyone who does not have a platform instance (lldb-server) an
  easy way to get Host data.
- Platform::GetAugmentedArchSpec: if you have a platform instance, you
  can call this to let it fill in the triple.
- static Platform::GetAugmentedArchSpec: implements the "if platform ==
  0 then use_host() else use_platform()" part.

Reviewers: zturner, jingham, clayborg

Subscribers: mgorny, javed.absar, lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316987 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAndroid.rules: build with "unified android headers"
Pavel Labath [Tue, 31 Oct 2017 10:33:03 +0000 (10:33 +0000)]
Android.rules: build with "unified android headers"

Unified headers will be the only way to build applications in NDK r16,
and it also works with NDK r15.

This also bumps the minimum supported android version to 16.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316985 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoSplit makefile for TestTopLevelExprs
Pavel Labath [Tue, 31 Oct 2017 10:01:30 +0000 (10:01 +0000)]
Split makefile for TestTopLevelExprs

this test was using a single makefile to build two executables. This
setup, although not supported by Makefile.rules, happened to
work in most configurations, except when building with the android ndk
r16.

Here I move the building of the second executable to a separate
makefile, which is the solution other tests use for multiple targets.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316982 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoRemove a stray space.
Jim Ingham [Mon, 30 Oct 2017 20:44:45 +0000 (20:44 +0000)]
Remove a stray space.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316954 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoFix windows build broken in r316915
Pavel Labath [Mon, 30 Oct 2017 16:21:18 +0000 (16:21 +0000)]
Fix windows build broken in r316915

I accidentally left a linux-specific include in generic code.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316919 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoMainLoop: work around an android libc bug
Pavel Labath [Mon, 30 Oct 2017 16:00:13 +0000 (16:00 +0000)]
MainLoop: work around an android libc bug

Versions of android before kitkat implemented pselect non-atomically,
which caused flakyness, as we were relying on it atomically setting the
signal mask to implement waiting for signals.

This patch implements a direct call to the the pselect kernel syscall,
which does not suffer from this problem. The code itself is not very
pretty, but fortunately the uglyness is contained in the
android version of the MainLoop::RunImpl::Poll function.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316915 91177308-0d34-0410-b5e6-96231b3b80d8

19 months ago[CMake] Build clang as dependency when using in-tree clang for tests.
Davide Italiano [Fri, 27 Oct 2017 21:22:57 +0000 (21:22 +0000)]
[CMake] Build clang as dependency when using in-tree clang for tests.

Discussed with Zachary Turner and Pavel Labath on lldb-dev.
Let's hope this doesn't break anything :)

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316800 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAdd specific ppc64le hardware watchpoint handler
Pavel Labath [Fri, 27 Oct 2017 17:02:32 +0000 (17:02 +0000)]
Add specific ppc64le hardware watchpoint handler

Summary: Add hardware watchpoint funcionality for ppc64le

Reviewers: clayborg, zturner

Reviewed By: clayborg

Subscribers: eugene, clayborg, zturner, lbianc, gut, nemanjai, alexandreyy, kbarton, lldb-commits

Differential Revision: https://reviews.llvm.org/D38897
Patch by Ana Julia Caetano <ana.caetano@eldorado.org.br>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316772 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoFix a use-after-free in lldb-server
Pavel Labath [Fri, 27 Oct 2017 04:53:24 +0000 (04:53 +0000)]
Fix a use-after-free in lldb-server

UriParser::Parse is returning a StringRef pointing the the parsed
string, but we were calling it with a temporary string. Change this to a
local variable to make sure the string persists as long as we need it.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316740 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoDefault to using in-tree clang for building test executables
Pavel Labath [Fri, 27 Oct 2017 02:24:04 +0000 (02:24 +0000)]
Default to using in-tree clang for building test executables

Summary:
Using the in-tree clang should be the default test configuration as that
is the one compiler that we can be sure everyone has (better
reproducibility of test results). Also, it should hopefully reduce the
impact of pr35040.

This also reduces the number of settings which control the compiler
used. LLDB_TEST_C_COMPILER is used for C files and
LLDB_TEST_CXX_COMPILER for C++ files. Both of the settings default to
the in-tree clang.

Reviewers: zturner

Subscribers: mgorny, davide, lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316728 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAdd Arm Architecture plugin to the xcode project file.
Jason Molenda [Fri, 27 Oct 2017 02:21:55 +0000 (02:21 +0000)]
Add Arm Architecture plugin to the xcode project file.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316727 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoFix TestMinidump for r316673
Pavel Labath [Thu, 26 Oct 2017 19:08:34 +0000 (19:08 +0000)]
Fix TestMinidump for r316673

The test was asserting that we can only find one frame in the minidump.
Now that we have the default unwind plan from the ABI plugin, we are
able to find 5 more frames using the frame pointer chaining. Correct the
expectation in the test.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316688 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAllow SysV-i386 ABI on everything other than Apple targets
Stephane Sezer [Thu, 26 Oct 2017 17:04:20 +0000 (17:04 +0000)]
Allow SysV-i386 ABI on everything other than Apple targets

Summary:
This matches other SysV ABIs that are different on Apple and non-Apple targets,
like `ABISysV_arm.cpp` for instance.

Reviewers: clayborg, emaste

Subscribers: aemerson, kristof.beyls, lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316673 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoMakefile.rules: move CFLAGS_EXTRAS to the end of compile line
Pavel Labath [Wed, 25 Oct 2017 23:56:17 +0000 (23:56 +0000)]
Makefile.rules: move CFLAGS_EXTRAS to the end of compile line

This makes sure that any options specified there override generic
compiler options.

This fixes TestBreakpointIt.py

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316629 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoMove StopInfoOverride callback to the new architecture plugin
Pavel Labath [Wed, 25 Oct 2017 21:05:31 +0000 (21:05 +0000)]
Move StopInfoOverride callback to the new architecture plugin

This creates a new Architecture plugin and moves the stop info override
callback to this place. The motivation for this is to remove complex
dependencies from the ArchSpec class because it is used in a lot of
places that (should) know nothing about Process instances and StopInfo
objects.

I also add a test for the functionality covered by the override
callback.

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316609 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoMove testcases/arm_emulation to testcases/arm/emulation
Pavel Labath [Wed, 25 Oct 2017 21:05:10 +0000 (21:05 +0000)]
Move testcases/arm_emulation to testcases/arm/emulation

This creates space for addidional arm-specific tests. I will be adding
one of those in a follow-up commit.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316608 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoFix a compile warning on linux
Stephane Sezer [Tue, 24 Oct 2017 23:46:00 +0000 (23:46 +0000)]
Fix a compile warning on linux

Can't cast directly between a pointer to function and a pointer to
object.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316533 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoAllow ObjectFilePECOFF to initialize with ARM binaries.
Stephane Sezer [Tue, 24 Oct 2017 23:40:59 +0000 (23:40 +0000)]
Allow ObjectFilePECOFF to initialize with ARM binaries.

Summary: This is required to start debugging WinPhone ARM targets.

Reviewers: compnerd, zturner, omjavaid

Reviewed By: compnerd

Subscribers: jasonmolenda, aemerson, rengolin, lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316532 91177308-0d34-0410-b5e6-96231b3b80d8

19 months ago[FreeBSD] Remove more dead code. NFCI.
Davide Italiano [Tue, 24 Oct 2017 23:31:53 +0000 (23:31 +0000)]
[FreeBSD] Remove more dead code. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316530 91177308-0d34-0410-b5e6-96231b3b80d8

19 months ago[ExpressionParser] Garbage-collect dead code. NFCI.
Davide Italiano [Tue, 24 Oct 2017 23:29:01 +0000 (23:29 +0000)]
[ExpressionParser] Garbage-collect dead code. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316529 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoRemove some unused function calls from ClangUserExpression.cpp
Stephane Sezer [Tue, 24 Oct 2017 23:01:33 +0000 (23:01 +0000)]
Remove some unused function calls from ClangUserExpression.cpp

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316527 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoRemove some dead code from ClangExpressionDeclMap.cpp
Stephane Sezer [Tue, 24 Oct 2017 22:56:05 +0000 (22:56 +0000)]
Remove some dead code from ClangExpressionDeclMap.cpp

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316526 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoRevert "[lldbtests] Handle errors instead of crashing."
Pavel Labath [Tue, 24 Oct 2017 16:07:50 +0000 (16:07 +0000)]
Revert "[lldbtests] Handle errors instead of crashing."

The commit breaks the case where you specify just a filename to the
compiler. Previously, it would look up the compiler in your path, now it
complains that the compiler is not found. One of the lldb buildbots is
depending on this. It seems like a nice feature to have, as it means
less typing and being able to avoid hard-coding the system compiler path
in the bot config.

This reverts commit r316393.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316451 91177308-0d34-0410-b5e6-96231b3b80d8

19 months ago[lldbtests] Handle errors instead of crashing.
Davide Italiano [Mon, 23 Oct 2017 23:17:53 +0000 (23:17 +0000)]
[lldbtests] Handle errors instead of crashing.

If you pass an invalid compiler/debugger path on the cmdline to `dotest.py`  this is what you get.

  Traceback (most recent call last):
  [...]
    File "dotest.py", line 7, in <module>
      lldbsuite.test.run_suite()
  [...]

And with the patch applied:

  /home/davide/work/build-lldb/bin/clandasfasg is not a valid path, exiting

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316393 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoUse ipv4 localhost address in lldb-server tests
Pavel Labath [Mon, 23 Oct 2017 23:15:37 +0000 (23:15 +0000)]
Use ipv4 localhost address in lldb-server tests

Since the ipv6 patch, we've experienced occasional flakyness in
lldb-server tests. This was due to the fact that lldb-server was trying
to listen on both v4 and v6 localhost sockets (and consider it a success
if at least one of them succeeded), while the test framework was only
trying to connect to the v4 one.

This change makes sure lldb-server only listens on the v4 socket.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316391 91177308-0d34-0410-b5e6-96231b3b80d8

19 months ago[Symbol] Remove dead code. NFCI.
Davide Italiano [Mon, 23 Oct 2017 23:14:17 +0000 (23:14 +0000)]
[Symbol] Remove dead code. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316390 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agoLogging: Disable logging after fork()
Pavel Labath [Mon, 23 Oct 2017 19:41:17 +0000 (19:41 +0000)]
Logging: Disable logging after fork()

Summary:
We had a bug where if we had forked (in the ProcessLauncherPosixFork)
while another thread was writing a log message, we would deadlock. This
happened because the fork child inherited the locked log rwmutex, which
would never get unlocked. This meant the child got stuck trying to
disable all log channels.

The bug existed for a while but only started being apparent after
D37930, which started using ThreadLauncher (which uses logging) instead
of std::thread (which does not) for launching TaskPool threads.

The fix is to use pthread_atfork to disable logging in the forked child.

Reviewers: zturner, eugene, clayborg

Subscribers: lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316368 91177308-0d34-0410-b5e6-96231b3b80d8

19 months ago[lldbtest] Simplify removing an unneeded else. NFCI.
Davide Italiano [Mon, 23 Oct 2017 17:51:22 +0000 (17:51 +0000)]
[lldbtest] Simplify removing an unneeded else. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316355 91177308-0d34-0410-b5e6-96231b3b80d8

19 months agolldb-server tests: Propagate environment variables (pr34192)
Pavel Labath [Fri, 20 Oct 2017 22:39:18 +0000 (22:39 +0000)]
lldb-server tests: Propagate environment variables (pr34192)

Summary:
Without this, the launching of the test inferior may fail if it depends
on some component of the environment (most likely LD_LIBRARY_PATH). This
makes sure we propagate the environment variable to the inferior
process.

Reviewers: eugene

Subscribers: lldb-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@316244 91177308-0d34-0410-b5e6-96231b3b80d8