These tests almost certainly work on Darwin anyway, I just wanted to
keep things in a fixed, working configuration, while pushing Dexter
up.
I've left Windows unsupported as the dexter command line will need further
adjustment to run dbgeng. This can be abstracted through the %dexter
substitution, but is a task for another time.
I baked the "test" subcommand into the %dexter substituion, as that's
what all of the dexter tests use. However I forgot about the internal
tests for whether dexters features are working. Install a %dexter_base
command to allow those tests to call dexter.py directly, and un-xfail
the tests on darwin.
Update too the list of paths the unittests shouldn't try and cover, as it
tries to load dbgeng on unix machines. Ideally we wouldn't be using this
method of test discovery in the future.
This reverts commit cb935f3456.
Discussion in D68708 advises that green dragon is being briskly
refurbished, and it's good to have this patch up testing it.
Dexter (Debug Experience Tester) is a test-driver for our debug info
integration tests, reading a set of debug experience expectations and
comparing them with the actual behaviour of a program under a debugger.
More about Dexter can be found in the RFC:
http://lists.llvm.org/pipermail/llvm-dev/2019-October/135773.html
and the phab review in D68708. Not all the debuginfo tests have been
transformed into Dexter tests, and we look forwards to doing that
incrementally.
This commit mostly aims to flush out buildbots that are running
debuginfo-tests but don't have python 3 installed, possibly
green-dragon and some windows bots.
This is a follow-up to r364466, but better implemented. Original
commit message still applies:
The breakpoint locations were in places where clang doesn't actually
emit a source location for and depend on the debugger's ability to
move the breakpoint forward onto a line that is already in the
function epilogue. In my testing older versions of LLDB fail to do
that, so I'm modifying the test to force a break-able location by
calling a noinline function.
<rdar://problem/52079841>
llvm-svn: 364589
The breakpoint locations were in places where clang doesn't actually
emit a source location for and depend on the debugger's ability to
move the breakpoint forward onto a line that is already in the
function epilogue. In my testing older versions of LLDB fail to do
that, so I'm modifying the test to force a break-able location by
calling a noinline function.
<rdar://problem/52079841>
llvm-svn: 364466
Summary: This creates an integration test for global constants
Reviewers: rnk
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62974
llvm-svn: 362745
This creates an integration test for inlined call line tables, and in
particular, ones that are discontiguous. We've had issues in the past
with discontiguous inline line tables, and until r362429 LLD didn't
write the inlinees section into the PDB.
The test was reduced from https://crbug.com/965670
Reviewers: thakis
Differential Revision: https://reviews.llvm.org/D62758
llvm-svn: 362431
This is an initial prototype of how we can run debugger integration
tests on Windows. cdb and windbg share a command language and debugger
engine. Visual Studio has its own, but we should at least be able to use
cdb as the basis for optimized debug info integration tests.
There's a lot of work to do here still. For example:
- Make fewer assumptions about the SDK location
- Don't assume x64 (important, I need x86 testing)
- More environment isolation, have lit setup vcvars instead of passing
LIB and INCLUDE down.
- Write a .py file to replace the grep+sed RUN line
But, this seemed like a good enough concept to commit as is, since it's
useful to me already.
Reviewers: aprantl, zturner
Differential Revision: https://reviews.llvm.org/D54187
llvm-svn: 361889
Check that the debugger can pretty-print unique_ptr and shared_ptr when
passed as a function argument.
This was reverted in r339961 because of a bug in the version of lldb
installed on the public Green Dragon builders.
rdar://42314305
llvm-svn: 340189
SafeStack support for Darwin has not been functional and was disabled in
r339719/r339720. Disable Darwin for the safestack debuginfo test.
llvm-svn: 339732
Some of Apple's public CI nodes ship an lldb which has trouble debugging
the asan-deque.cpp test. Specifically, that lldb appears to either parse
location lists in the test program incorrectly or to have a broken
std::deque data formatter.
We don't want to work around this by weakening the integration test, and
we're unable to update the lldb version on the CI node at the moment.
The compromise is to require AppleLLDB >= 1000 when AppleLLDB is being
used to debug this test.
Reviewed (in person) by Adrian Prantl.
Bot failure:
http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA/48074
rdar://42892721
llvm-svn: 338937
emplace_back was added in C++11, and its usage isn't critical to what's being
tested so using push_back instead will allow this test to work with more
compilers.
llvm-svn: 338371
LowerDbgDeclare inserts a dbg.value before each use of an address
described by a dbg.declare. When inserting a dbg.value before a CallInst
use, however, it fails to append DW_OP_deref to the DIExpression.
The DW_OP_deref is needed to reflect the fact that a dbg.value describes
a source variable directly (as opposed to a dbg.declare, which relies on
pointer indirection).
This patch adds in the DW_OP_deref where needed. This results in the
correct values being shown during a debug session for a program compiled
with ASan and optimizations (see https://reviews.llvm.org/D49520). Note
that ConvertDebugDeclareToDebugValue is already correct -- no changes
there were needed.
One complication is that SelectionDAG is unable to distinguish between
direct and indirect frame-index (FRAMEIX) SDDbgValues. This patch also
fixes this long-standing issue in order to not regress integration tests
relying on the incorrect assumption that all frame-index SDDbgValues are
indirect. This is a necessary fix: the newly-added DW_OP_derefs cannot
be lowered properly otherwise. Basically the fix prevents a direct
SDDbgValue with DIExpression(DW_OP_deref) from being dereferenced twice
by a debugger. There were a handful of tests relying on this incorrect
"FRAMEIX => indirect" assumption which actually had incorrect
DW_AT_locations: these are all fixed up in this patch.
Testing:
- check-llvm, and an end-to-end test using lldb to debug an optimized
program.
- Existing unit tests for DIExpression::appendToStack fully cover the
new DIExpression::append utility.
- check-debuginfo (the debug info integration tests)
Differential Revision: https://reviews.llvm.org/D49454
llvm-svn: 338069
/usr/bin/env is recommended as a cross-platform way to find python. But:
- we're only using lldb on darwin, where we know python (or at least,
the xcrun-style shortcut) is in /usr/bin/
- the python interpreter in LLDB comes from /S/L/F:
$ otool -L Contents/SharedFrameworks/LLDB.framework/LLDB | grep Python
/System/Library/Frameworks/Python.framework/Versions/2.7/Python
so when we use the lldb python module, it calls into the swig/python
support in the lldb framework, and if there's a mismatch between the
interpreter and the linked python, weird things occur.
In theory, I believe this should be done by:
- looking for the LLDB framework (llgdb.py does some of that)
- finding the binary inside the framework
- looking for the Python it was linked against (otool -L)
- finding the interpreter executable inside the Python.framework
But in practice, that's only different if we use a custom LLDB
framework/pythonpath when running these tests, and AFAIK nobody does
that right now, so the code would be dead anyway.
Don't pretend we can use any arbitrary python: just use the system one.
Differential Revision: https://reviews.llvm.org/D47967
llvm-svn: 334369
These sections will be retired. Also, explicitly list llvm-objdump
as a dependency. This should've been done in the previous commit,
but I failed to squash the two changes together.
Thanks to Adrian for pointing the first problem out in a comment.
llvm-svn: 326121
Summary:
Add cmake and lit files needed to run these tests as an
external project. Also, copy test_debuginfo.pl from llvm/utils since
it's only used here. The copy in llvm/utils must be maintained as
long as bots continue to include debuginfo-tests in clang/test.
This patch depends on clang patch https://reviews.llvm.org/D41055.
Reviewers: zturner, aprantl
Reviewed By: aprantl
Subscribers: mgorny, llvm-commits, JDevlieghere
Differential Revision: https://reviews.llvm.org/D40971
llvm-svn: 320495
This is still breaking greendragon.
At this point I give up until someone can fix the greendragon
bots, and I will probably abandon this effort in favor of using
a private github repository.
llvm-svn: 318722
This was reverted due to the tests being run twice on some
build bots. Each run had a slightly different configuration
due to the way in which it was being invoked. This fixes
the problem (albeit in a somewhat hacky way). Hopefully in
the future we can get rid of the workflow of running
debuginfo-tests as part of clang, and then this hack can
go away.
llvm-svn: 318697
This is still broken because it causes certain tests to be
run twice with slightly different configurations, which is
wrong in some cases.
You can observe this by running:
ninja -nv check-all | grep debuginfo-tests
And seeing that it passes clang/test and clang/test/debuginfo-tests
to lit, which causes it to run debuginfo-tests twice. The fix is
going to involve either:
a) figuring out that we're running in this "deprecated" configuration,
and then deleting the clang/test/debuginfo-tests path, which should
cause it to behave identically to before, or:
b) make lit smart enough that it doesn't descend into a sub-suite if
that sub-suite already has a lit.cfg file.
llvm-svn: 318486
This was reverted due to some failures on specific darwin buildbots,
the issue being that the new lit configuration was not setting the
SDKROOT environment variable. We've tested a fix locally and confirmed
that it works, so this patch resubmits everything with the fix
applied.
llvm-svn: 318435
This reverts the aforementioned patch and 2 subsequent follow-ups,
as some buildbots are still failing 2 tests because of it.
Investigation is ongoing into the cause of the failures.
llvm-svn: 318112
Previously, debuginfo-tests was expected to be checked out into
clang/test and then the tests would automatically run as part of
check-clang. This is not a standard workflow for handling
external projects, and it brings with it some serious drawbacks
such as the inability to depend on things other than clang, which
we will need going forward.
The goal of this patch is to migrate towards a more standard
workflow. To ease the transition for build bot maintainers,
this patch tries not to break the existing workflow, but instead
simply deprecate it to give maintainers a chance to update
the build infrastructure.
Differential Revision: https://reviews.llvm.org/D39605
llvm-svn: 317925
Summary:
Split asan.c into asan.c and asan-blocks.c, which will be
darwin-specific. I suspect we could make it pass on Linux by adding
cmake to build BlocksRuntime from compiler-rt, but I'm not shaving that
yak yet.
asan.c and safestack.c: GDB and LLDB appear to print aggregates
differently today. Print individual elements instead of the entire
aggregate.
dbg-arg.c: GDB doesn't appear to print leading zeros when printing
pointers.
stack-var.c: Add the optnone attribute so that LLVM won't optimize away
this no-op function call. This should be a cross-platform failure
observable on Mac, so this is surprising.
Reviewers: aprantl, dblaikie
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D37344
llvm-svn: 312265
When this testcase was migrated from IR to source the DEBUGGER
commands were not migrated together with the rest of the testcase. It
was also compiling without debug info.
Make the testcase slightly less useless by adding them back in :-)
llvm-svn: 299673
VLAs are special-cased in the frontend. This testcase ensures that the
contract between clang and llvm won't be accidentally broken by future
refactorings.
llvm-svn: 299668
clang tests were breaking, at least when compiling clang only, from an
installed llvm. Make the lit.cfg script deal with the case when we don't
have a host_triple available.
llvm-svn: 220152
Since these tests expect a working debugger, always compile them for the
host triple, assuming a working debugger is present.
This enables us to compile and run them, even when clang is, by default,
a cross-compiler (but can still target the host).
llvm-svn: 219992
This reverts commit 203504. We decided that it is better to disable this test on a per-buildbot basis in zorg rather than everywhere on Darwin.
llvm-svn: 203627
of lldb. This will be the new default method for executing the tests in
this repository on Darwin.
There is also a related patch for llvm/utils/test_debuginfo.pl coming.
I also relaxed some of the checks to work with both gdb's and lldb's
output.
llvm-svn: 190185
These are a burden to maintain & use hand crafted IR to test particular DWARF
generation cases in LLVM. If someone thinks there's high value coverage here
they can rephrase these as IR+dwarfdump tests in the LLVM regression suite so
they'll be portable/easily executed by all developers.
llvm-svn: 177182
be no functional change (the offsets in AT_data_member_location are still
correct). If the gdb testsuite itself needs changing then I'll revert this
and the clang patch.
llvm-svn: 149026