This renames llvm-dotest to lldb-dotest and makes it a custom target so
you can run `ninja lldb-dotest` to rebuild whatever is necessary before
rerunning the tests.
Differential revision: https://reviews.llvm.org/D44473
llvm-svn: 327519
The OS plugins might have updated the thread list after a core file has
been loaded. The physical thread in the core file may no longer be the
one that should be selected. Hence we should run the thread selection
logic after loading the core.
Differential revision: https://reviews.llvm.org/D44139
llvm-svn: 327501
Summary:
To make this build work, I needed to add detection code for the pthread
library. This is necessary, because we have direct calls to these
libraries (instead of going through llvm) and in the standalone build we
cannot rely on llvm to detect these for us. In a standalone non-dylib
build this was accidentaly working because these libraries were pulled
in as an interface dependency of the .a files, but in a dylib build
these are no longer part of the link interface, and so we need to add
them explicitly.
Reviewers: krytarowski, zturner
Subscribers: lldb-commits, mgorny
Differential Revision: https://reviews.llvm.org/D44379
llvm-svn: 327490
The expression-hits tracking logic is not available on any platform. The
reason this tests happens to pass on some platforms is that the test is
written poorly -- it relies on the fact that post-main cleanup code will
write to the stack memory once occupied by the watched variable, but
this is not the case everywhere (e.g. linux glibc does not seem to do
this, but android's bionic library does).
llvm-svn: 327483
Summary:
The types for the compiland's children are parsed when parsing types for a PDB compiland. Global types also need to be parsed but unfortunately PDBs do not have compiland information about each global type. So we parse them all on the first call to ParseTypes.
If a sc.function is provided then parse the types for that function. Otherwise parse the types for the overall sc.comp_unit.
The ParseTypes method can be very slow if a program has a long list of compile units containing needed modules. Debugging clang-cl with lldb will show the problem.
Reviewers: zturner, rnk, lldb-commits
Reviewed By: zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D44253
llvm-svn: 327473
clang-3.8 complains that constructor for '...' must explicitly
initialize the const member. Newer clangs and gcc seem to be fine with
this, but explicitly initializing the member does not hurt.
llvm-svn: 327380
Typical example, illformed comparisons (operator== where LHS and
RHS are not compatible). If a symbol matched `operator==` in any
of the object files lldb inserted a generic function declaration
in the ASTContext on which Sema operates. Maintaining the AST
context invariants is fairly tricky and sometimes resulted in
crashes inside clang (or assertions hit).
The real reason why this feature exists in the first place is
that of allowing users to do something like:
(lldb) call printf("patatino")
even if the debug informations for printf() is not available.
Eventually, we might reconsider this feature in its
entirety, but for now we can't remove it as it would break
a bunch of users. Instead, try to limit it to non-C++ symbols,
where getting the invariants right is hopefully easier.
Now you can't do in lldb anymore
(lldb) call _Zsomethingsomething(1,2,3)
but that doesn't seem to be such a big loss.
<rdar://problem/35645893>
llvm-svn: 327356
This is a more principled approach to disabling Spotlight .dSYM
lookups while running the testsuite, most importantly it also works
for the LIT-based tests, which I overlooked in my initial fix
(renaming the test build dir to lldb-tests.noindex).
Differential Revision: https://reviews.llvm.org/D44342
llvm-svn: 327330
This reverts commit r327318. It breaks the Xcode and CMake Darwin
builders:
clang: error: no such file or directory:
'.../source/Plugins/Architecture/PPC64/ArchitecturePPC64.cpp'
clang: error: no input files
More details are in https://reviews.llvm.org/D42582.
llvm-svn: 327327
Summary:
r327219 adds wrappers to sort which shuffle the container before sorting.
This causes lldb bots to break as the call to sort is now ambiguous:
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-buildserver/builds/20725/steps/ninja%20build%20local/logs/stdio
So we need use llvm::sort instead of sort to avoid ambiguity with std::sort.
Note: This patch is just to unbreak the bots. I plan to have subsequent patches which will convert all
calls to std::sort to llvm::sort.
Reviewers: RKSimon, k8stone, jingham, labath, zturner
Subscribers: andreadb, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D44354
llvm-svn: 327224
I want to extend the properties on ModuleList to also contain other
more general settings and renaming the settings category to symbols
seems to be the least bad of choices.
llvm-svn: 327193
The test I added in r327110 is failing on windows because of "import
pexpect". However, this import is no longer necessary as these tests
don't use pexpect anymore.
In fact, it seems that all TestCompletion tests are passing on windows
after this, so I enable all of them.
llvm-svn: 327133
Summary:
Besides being superfluous, this double merging was actually wrong and
causing some sections to be added twice. The reason for that was that
the code assumes section IDs are unique in the section list, but this is
only true if all sections in the list come from the same object file.
Reviewers: fjricci, jankratochvil
Subscribers: emaste, lldb-commits, arichardson
Differential Revision: https://reviews.llvm.org/D44157
llvm-svn: 327123
Summary:
The args class is used in plenty of places (a lot of them in the lower lldb
layers) for representing a list of arguments, and most of these places don't
care about option parsing. Moving the option parsing out of the class removes
the largest external dependency (there are a couple more, but these are in
static functions), and brings us closer to being able to move it to the
Utility module).
The new home for these functions is the Options class, which was already used
as an argument to the parse calls, so this just inverts the dependency between
the two.
The functions are themselves are mainly just copied -- the biggest functional
change I've made to them is to avoid modifying the input Args argument (getopt
likes to permute the argument vector), as it was weird to have another class
reorder the entries in Args class. So now the functions don't modify the input
arguments, and (for those where it makes sense) return a new Args vector
instead. I've also made the addition of a "fake arg0" (required for getopt
compatibility) an implementation detail rather than a part of interface.
While doing that I noticed that ParseForCompletion function was recording the
option indexes in the shuffled vector, but then the consumer was looking up the
entries in the unshuffled one. This manifested itself as us not being able to
complete "watchpoint set variable foo --" (because getopt would move "foo" to
the end). Surprisingly all other completions (e.g. "watchpoint set variable foo
--w") were not affected by this. However, I couldn't find a comprehensive test
for command argument completion, so I consolidated the existing tests and added
a bunch of new ones.
Reviewers: davide, jingham, zturner
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D43837
llvm-svn: 327110
stuff. Activate it when an internal SDK is selected. Update the name of
the LDFLAGS to match the rest of the settings. Update the default arch for
ios builds.
llvm-svn: 327095
There is a mailing list discussion re: r325927 about why this test fails
in the dsym variant. I've marked it skipped for now, until the issue is
resolved.
llvm-svn: 327089
1. Link against libpmenergy and pmsample unconditionally. It is available on
macOS 10.10 ("Yosemite") and newer. We're already linking against libcompression
unconditionally which is only available on macOS 10.11 & newer.
2. Change a few "sdk=macosx.internal"'s to sdk=macosx.
3. Clean up a few places where libcompression was being enabled inconsistently.
Note: the -DLLDB_ENERGY define is only set when building against the macosx.internal
SDK; it includes a header file that is not public. We link against the dylibs
unconditionally for simplicity.
llvm-svn: 327084
The test "test_fp_special_purpose_register_read" in TestRegisters.py
fails on Darwin machines configured to use an out-of-tree debugserver.
The error message is: 'register read ftag' returns expected result, got
'ftag = 0x80'. This indicates that the debugserver in use is too old.
This commit introduces a decorator which can be used to skip tests which
rely on having a just-built debugserver. This resolves the issue:
$ ./bin/llvm-dotest -p TestRegisters.py -v
1 out of 617 test suites processed - TestRegisters.py
Test Methods: 7
Success: 6
Skip: 1
...
llvm-svn: 327052
These were removed in r309021 in what looks like an accidentally
committed change. This brings them back.
I also rename the header component to lldb-headers (instead of
lldb_headers) to match the llvm style and add a special
install-lldb-headers target, which installs just the headers.
llvm-svn: 327016
Summary:
On PPC64, the tested functions were being entered through their local entry point, while the tests expected the program to stop at the function start address, that, for PPC64, corresponds to the global entry point.
To fix the issue, the test program was modified to call the functions to be tested through function pointers, which, on PPC64, force the calls through the global entry point, while not affecting the test on other platforms.
Reviewers: clayborg, labath
Reviewed By: labath
Subscribers: alexandreyy, lbianc
Differential Revision: https://reviews.llvm.org/D43768
Patch by Leandro Lupori <leandro.lupori@gmail.com>.
llvm-svn: 327013
There's now a test using llvm-objcopy in lit/.
This doesn't fail on the bot(s) because `llvm-objcopy` is probably
already available there, but if you get a fresh checkout and run
`ninja check-lldb` you'll observe the failure as it's not tracking
the dependency correctly. This fixes the problem on my machine,
and probably everywhere else.
llvm-svn: 326919
Summary:
- Complete element type of PDBSymbolTypeArray.
- Add a test to check types of multi-dimensional array and pointers with CVR.
Reviewers: zturner, rnk, lldb-commits
Reviewed By: zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D44167
llvm-svn: 326859
Test that "lldb-mi --interpreter" can interpret "target list" CLI command.
Patch by Alex Polyakov!
Differential Revision: https://reviews.llvm.org/D44040
llvm-svn: 326847
Summary:
The test was failing in remote debugging scenario with windows as a host
as cmd.exe is not able to parse the complicated shell commands in the
Makefile.
The test seemed like a perfect candidate for a more focused testing
approach, so I have rewritten in on top of lldb-test's module-sections
functionality. The slight gotcha there was that the
Module::GetSectionList does not include the sections from the symbol
file until someone manually calls Module::GetSymbolVendor. Normally,
this is not an issue, because someone will have initialized the symbol
vendor by the time anyone starts looking at the sections. However, when
all one this is dump the section list, we run into this problem.
I've tried making this behavior more automatic, but it turns out it's
not that easy, so for now, I just manually initialize the Symbol Vendor
before dumping out the sections in lldb-test.
Reviewers: jankratochvil
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D42914
llvm-svn: 326805
Summary:
In an effort to understand the function's operation, I've split it into logical
pieces. Parsing of a single segment is moved to a separate function (and the
parsing state that is carried from one segment to another is explicitly
captured in the SegmentParsingContext object). I've also extracted some pieces
of code which were already standalone (validation of the segment load command,
determining the section type, determining segment permissions) into
separate functions.
Parsing of a single section within the segment should probably also be a
separate function, but I've left that for a separate patch.
This patch is intended to be NFC.
Reviewers: clayborg, davide
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D44074
llvm-svn: 326791
Summary:
- reg_nums were missing the end marker entry
- marked FP test to be skipped for ppc64
Reviewers: labath, clayborg
Reviewed By: labath, clayborg
Subscribers: alexandreyy, lbianc, nemanjai, kbarton
Differential Revision: https://reviews.llvm.org/D43767
Patch by Leandro Lupori <leandro.lupori@gmail.com>
llvm-svn: 326775
were originally written by Chris Bieneman, they've undergone a
number of changes since then.
Also including the debugserver bridgeos support, another arm
environment that runs Darwin akin to ios. These codepaths are
activated when running in a bridgeos environment which we're not
set up to test today.
There's additional (small) lldb changes to handle bridgeos binaries
that still need to be merged up.
Tested on a darwin system with avx512 hardware and without.
<rdar://problem/36424951>
llvm-svn: 326756
LLDB.framework to point to the build directory where it is expected by
the top-level CMakeLists.txt.
This should be a no-op in any other configurations.
rdar://problem/38005302
llvm-svn: 326743
These tests fail with a relatively frequently on Darwin machines with
errors such as:
File ".../lldb/third_party/Python/module/pexpect-2.4/pexpect.py", line 1444, in expect_loop
raise EOF(str(e) + '\n' + str(self))
EOF: End Of File (EOF) in read_nonblocking(). Empty string style platform.
The unpredictable failures make these tests noisy.
rdar://37046976
llvm-svn: 326739