summaryrefslogtreecommitdiffstats
path: root/debuginfo-tests
Commit message (Collapse)AuthorAgeFilesLines
* Add test for GDB pretty printers.Christian Sigg2020-01-115-0/+83
| | | | | | | | | | | | Reviewers: dblaikie, aprantl, davide, JDevlieghere Reviewed By: aprantl Subscribers: jmorse, aprantl, merge_guards_bot, mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72321
* [debuginfo] Update test to account for missing __debug_macinfoJonas Devlieghere2019-11-111-2/+1
| | | | We no longer emit this section if it's empty.
* Don't attempt to upgrade debug-info-tests to Python3.Adrian Prantl2019-11-081-35/+0
| | | | | | | | There was CMake code that would attempt to detect Python 3 even if LLVM was configured with Python 2, but it messed with the environment for the other LLVM projects. This commit removes this functionality and just lkeaves a hard error if Python < 3 is detected and debuginfo-tests are required.
* [dexter] Fix feature tests on WindowsReid Kleckner2019-11-053-2/+9
| | | | | | | | | | | | | | | | | | | | | First, add LLD as a dependency on Windows. The windows batch scripts pass -fuse-ld=lld, so they need it. Second, decode builder stdout/stderr even if the command fails. Otherwise it gets printed as b'line 1\n\rline 2\n\r'. Last, make the batch script one line less noisy. We might want to try to do more here, though. It would be nice if we could get as close to possible as lit, where you can literally copy & paste the failing command to re-run it. With the two changes above, now the feature tests that use clang++.bat pass for me. The clang-cl_vs2015 ones still fail, and I'll fix them separately. Reviewers: jmorse Differential Revision: https://reviews.llvm.org/D69725
* [dexter] Remove lit check for python 3Reid Kleckner2019-11-051-6/+0
| | | | | | | | | | | | | | | This is checking the version of Python used to run lit, which is not necessarily the same as the version used to run the dexter tests. If the tests are run via the build/bin/llvm-lit[.py] helper script, then that is likely to pick up whatever version of Python is on PATH. Conventionally, this will find Python 2. CMake already checks that Python 3 is in use and puts the path to it in the lit site config, so this check is redundant, and Python 3 will ultimately be used to run dexter. Reviewers: jmorse Differential Revision: https://reviews.llvm.org/D69724
* [debuginfo-tests] Don't look for Python 3 if we already have itReid Kleckner2019-11-011-25/+34
| | | | | | | | | | | | | LLDB already requires Python 3 on Windows, so I already configure it that way. For some reason CMake fails to find the one that Visual Studio automatically installs at this standard location: C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python37_64/python.exe CMake prefers the python on path, which happens to be python 2.7. Reviewers: aprantl, jmorse Differential Revision: https://reviews.llvm.org/D69684
* [Dexter] Continue sprinking no-location fixesJeremy Morse2019-11-011-1/+1
| | | | | | | | | Example failure: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/3255/testReport/junit/debuginfo-tests/dexter-tests/asan_c/ The tests themselves seem to be working, it's just unexplored paths within dexter that are flaking out.
* [Dexter] Account for another no-lineno scenarioJeremy Morse2019-11-011-1/+2
| | | | | This is another part of Dexter that had never seen a missing source location before, now newly turning up on Darwin.
* [Dexter] Cope better with empty source locationsJeremy Morse2019-11-011-0/+2
| | | | | | When running a program, Dexter single steps if it's in one of the source files under test, or free-runs if it isn't. Handle the circumstance where the current source file simply isn't known.
* Unmask dexter debuginfo tests on DarwinJeremy Morse2019-11-018-8/+16
| | | | | | | | | | 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.
* Fix a brain-fail with debuginfo-tests/dexter internal testsJeremy Morse2019-11-0129-40/+40
| | | | | | | | | | | | 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.
* Quote path to Python 3 executable in case it contains spacesReid Kleckner2019-10-311-1/+1
|
* Fix undefined variable bug in debuginfotests lit.cfg.pyReid Kleckner2019-10-311-0/+1
|
* XFAIL dexter tests on Darwin.Adrian Prantl2019-10-319-0/+9
| | | | These fail parsing command line arguments.
* Reapply "Import Dexter to debuginfo-tests""Jeremy Morse2019-10-31166-313/+9920
| | | | | | | This reverts commit cb935f345683194e42e6e883d79c5a16479acd74. Discussion in D68708 advises that green dragon is being briskly refurbished, and it's good to have this patch up testing it.
* Revert "Import Dexter to debuginfo-tests"Jeremy Morse2019-10-31166-9920/+313
| | | | | | This reverts commit f78c236efda85af1e526ac35ed535ef4786450e3. Green dragon breakage was observed; I'll take a look at why.
* Import Dexter to debuginfo-testsJeremy Morse2019-10-31166-313/+9920
| | | | | | | | | | | | | | | | | 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.
* Make nrvo-string test more robust.Adrian Prantl2019-06-271-3/+4
| | | | | | | | | | | | | | | | 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
* Make nrvo-string test more robust.Adrian Prantl2019-06-261-2/+5
| | | | | | | | | | | | | 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
* [Python 3] Decode check_ouput result as UTF-8Jonas Devlieghere2019-06-251-1/+1
| | | | llvm-svn: 364325
* Store a pointer to the return value in a static alloca and let the debugger ↵Amy Huang2019-06-202-2/+72
| | | | | | | | | | | | | | use that as the variable address for NRVO variables. Subscribers: hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D63361 llvm-svn: 363952
* llgdb.py: Make sure to clean up the debugger on exit.Adrian Prantl2019-06-171-1/+6
| | | | | | <rdar://problem/51807962> llvm-svn: 363611
* Add cdb test for global constantsAmy Huang2019-06-061-0/+33
| | | | | | | | | | | | | | 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
* Add cdb test for inline line tablesReid Kleckner2019-06-031-0/+45
| | | | | | | | | | | | | | | 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
* Move the pybool logic from CMake to Python for simplicityReid Kleckner2019-05-292-4/+1
| | | | | | | This is how similar booleans are handled, and seems to work for me locally. llvm-svn: 362039
* Add debuginfo-tests that use cdb on WindowsReid Kleckner2019-05-287-5/+90
| | | | | | | | | | | | | | | | | | | | | | | 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
* Set config.lit_tools_dir, which is needed by lit.llvm.initialize.Reid Kleckner2018-11-061-0/+1
| | | | llvm-svn: 346271
* [debuginfo-tests] commands.getoutput -> subprocess.check_outputFangrui Song2018-11-031-2/+2
| | | | | | | We should also make Darwin Python3 happy after r346059 The output has an extra newline but it is fine in this particular case. llvm-svn: 346066
* Update debuginfo tests lit for r341135Reid Kleckner2018-11-031-1/+2
| | | | llvm-svn: 346060
* [debuginfo-tests] Avoid "import commands" which was deprecated in Py3Reid Kleckner2018-11-031-1/+1
| | | | llvm-svn: 346059
* Revert "(Retry) Add a basic integration test for C++ smart pointers"Vedant Kumar2018-08-201-41/+0
| | | | | | | This reverts r340189. The new test is still failing on some Apple-internal bots. llvm-svn: 340204
* (Retry) Add a basic integration test for C++ smart pointersVedant Kumar2018-08-201-0/+41
| | | | | | | | | | | | 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
* Revert "Add a basic integration test for C++ smart pointers"Bruno Cardoso Lopes2018-08-181-41/+0
| | | | | | | | | | | This reverts commit 73786631984289b3d601034b2bf4ba2b8f5845eb. Revert r339961 since its causing debuginfo-tests to fail: http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/48514/ rdar://problem/43449629 llvm-svn: 340119
* Add a basic integration test for C++ smart pointersVedant Kumar2018-08-161-0/+41
| | | | | | | | | Check that the debugger can pretty-print unique_ptr and shared_ptr when passed as a function argument. rdar://42314305 llvm-svn: 339961
* SafeStack: Disable Darwin supportVlad Tsyrklevich2018-08-141-0/+1
| | | | | | | SafeStack support for Darwin has not been functional and was disabled in r339719/r339720. Disable Darwin for the safestack debuginfo test. llvm-svn: 339732
* Disable the asan-deque.cpp integration test for AppleLLDB < v1000Vedant Kumar2018-08-042-1/+10
| | | | | | | | | | | | | | | | | | | | | | 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
* [DWARF] Change a test to ensure the creation of a __debug_ranges section.Wolfgang Pieb2018-07-311-0/+3
| | | | | Reviewer: aprantl llvm-svn: 338424
* [debuginfo-tests] tweak new test to be compatible with wider range of compilers.Tim Northover2018-07-311-2/+2
| | | | | | | | 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
* [DebugInfo] LowerDbgDeclare: Add derefs when handling CallInst usersVedant Kumar2018-07-261-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "[CMake] Sort dependency list and add safestack to it"Vedant Kumar2018-07-181-2/+1
| | | | | | | | | This reverts commit r337412. An Apple-internal bot cannot find the safestack dependency, and fails to configure with this change. llvm-svn: 337421
* [CMake] Sort dependency list and add safestack to itVedant Kumar2018-07-181-1/+2
| | | | | | The 'safestack.c' test requires safestack as a dependency. llvm-svn: 337412
* [debuginfo-tests] Always use the system python to invoke llgdb.py.Ahmed Bougacha2018-06-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | /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
* [Darwin] Specify DWARF 2/4 when running apple accelerator tests.Davide Italiano2018-02-262-1/+6
| | | | | | | | | | 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
* [Darwin] Add a test to make sure clang emits __apple accelerator tables.Davide Italiano2018-02-231-0/+17
| | | | llvm-svn: 325928
* [debuginfo-tests] Support moving debuginfo-tests to llvm/projectsDon Hinton2017-12-125-0/+197
| | | | | | | | | | | | | | | | | | | | 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
* Revert "Temporarily pin tests to DWARF v2 until a more recent version of LLDB"Adrian Prantl2017-12-075-6/+6
| | | | | | | | This reverts commit 319790. We worked around the bug in LLVM instead. llvm-svn: 320076
* Temporarily pin tests to DWARF v2 until a more recent version of LLDBAdrian Prantl2017-12-055-6/+6
| | | | | | is available on green dragon. llvm-svn: 319790
* Re-revert "Refactor debuginfo-tests."Zachary Turner2017-11-2122-146/+16
| | | | | | | | | | 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
* Resubmit "Refactor debuginfo-tests" again.Zachary Turner2017-11-2022-16/+146
| | | | | | | | | | | | 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
* Re-revert "Refactor debuginfo-tests"Zachary Turner2017-11-1722-136/+16
| | | | | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud