summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang
Commit message (Collapse)AuthorAgeFilesLines
* [lldb/Test] Move @skipIfAsan from test class to test methods.Jonas Devlieghere2020-01-061-1/+2
| | | | skipTestIfFn can only be used to decorate a test method.
* [lldb/Test] Temporarily skip TestFoundationDisassembly on the ASan bot.Jonas Devlieghere2020-01-061-0/+1
| | | | | This test is timing out on the sanitized bot on GreenDragon. Temporarily disable it to increase the signal-to-noise ration.
* [lldb] Added test for objc_direct calls with categoriesRaphael Isemann2019-12-201-0/+13
| | | | As pointed out in D71694 this wasn't tested before in LLDB.
* [lldb] Add support for calling objc_direct methods from LLDB's expression ↵Raphael Isemann2019-12-173-0/+88
| | | | | | | | | | | | | | | | | | | | | evaluator. Summary: D69991 introduced `__attribute__((objc_direct))` that allows directly calling methods without message passing. This patch adds support for calling methods with this attribute to LLDB's expression evaluator. The patch can be summarised in that LLDB just adds the same attribute to our module AST when we find a method with `__attribute__((objc_direct))` in our debug information. Reviewers: aprantl, shafik Reviewed By: shafik Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71196
* Explicitly specify -std=c++11 and include <mutex> and <condition_variable>.Jim Ingham2019-12-162-0/+3
| | | | These files built on macos but not on Debian Linux. Let's see if this fixes it.
* Run all threads when extending a next range over a call.Jim Ingham2019-12-163-0/+110
| | | | | | | | | If you don't do this you end up running arbitrary code with only one thread allowed to run, which can cause deadlocks. <rdar://problem/56422478> Differential Revision: https://reviews.llvm.org/D71440
* LanguageRuntime: Simplify NSException::GetSummary() outputMed Ismail Bennani2019-12-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Right now, NSException::GetSummary() has the following output: "name: $exception_name - reason: $exception_reason" It would be better to simplify the output by removing the name and only showing the exception's reason. This way, annotations would look nicer in the editor, and would be a shorter summary in the Variables Inspector. Accessing the exception's name can still be done by expanding the NSException object in the Variables Inspector. rdar://54770115 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71311 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
* [lldb/Test] C++ test should use CXXFLAGS_EXTRASJonas Devlieghere2019-12-131-1/+1
| | | | Thanks Ted Woodward for noticing this.
* [lldb][NFC] Remove all `setUp` overrides that only call the parent ↵Raphael Isemann2019-12-1311-38/+0
| | | | | | | | | | | | | | | | | | | | | | | | | implementation Summary: A lot of our tests copied the setUp code from our TestSampleTest.py: ``` def setUp(self): # Call super's setUp(). TestBase.setUp(self) ``` This code does nothing unless we actually do any setUp work in there, so let's remove all these method definitions. Reviewers: labath, JDevlieghere Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71454
* [lldb][NFC] Remove 'from __future__ import print_function' from all tests ↵Raphael Isemann2019-12-1396-102/+0
| | | | | | | | | | | | | | | | | | | | | that don't actually call 'print()' Summary: A lot of tests do this trick but the vast majority of them don't even call `print()`. Most of this patch was generated by a script that just looks at all the files and deletes the line if there is no `print (` or `print(` anywhere else in the file. I checked the remaining tests manually and deleted the import if we never call print (but instead do stuff like `expr print(...)` and similar false-positives). I also corrected the additional empty lines after the import in the files that I manually edited. Reviewers: JDevlieghere, labath, jfb Reviewed By: labath Subscribers: dexonsmith, wuzish, nemanjai, kbarton, christof, arphaman, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71452
* [lldb] Remove xpasses after pr44037 fix committedMuhammad Omair Javaid2019-12-132-11/+1
| | | | | | | This patch removes xpass decorator from tests which were failing due to pr44037. pr44037 was fixed by rev 6ce1a897b6a82e18059fd3b75b8d52ff12c2a605
* return-object-by-reference ("non trivial") xfail on arm64 in TestTrivialABI.pyJason Molenda2019-12-112-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't think this test case can be handled correctly on AAPCS64. The ABI says that the caller passes the address of the return object in x8. x8 is a caller-spilled (aka "volatile") register, and the function is not required to preserve x8 or to copy the address back into x8 on function exit like the SysV x86_64 ABI does with rax. (from aapcs64: "there is no requirement for the callee to preserve the value stored in x8") From my quick reading of ABISysV_arm64, I worry that it may actually be using the value in x8 at function exit, assuming it still has the address of the return object - if (is_return_value) { // We are assuming we are decoding this immediately after returning from // a function call and that the address of the structure is in x8 reg_info = reg_ctx->GetRegisterInfoByName("x8", 0); This will work on trivial test programs / examples, but if the function does another function call, or overwrites x8 as a scratch register, lldb will provide incorrect values to the user. ABIMacOSX_arm64 doesn't do this, but it also doesn't flag the value as unavailable so we're providing incorrect values to the user all the time. I expect my fix will be to make ABIMacOSX_arm64 flag the return value as unretrievable, unless I've misread the ABI.
* [lldb] Remove Xfail decorators from steadily passing testsMuhammad Omair Javaid2019-12-092-11/+0
| | | | | This patch removes xfail decorator from some lldb testcases which are passing steadily now for past few week/months on aarch64/linux buildbot.
* [lldb] Update hardcoded Makefile.rules inclusions.Jordan Rupprecht2019-12-051-2/+1
| | | | | | This replaces `include $(LEVEL)/Makefile.rules` with `include Makefile.rules`. The lldb test driver already passes the include path when running make, and specifically looking for "../../Makefile.rules" forces the test to be in a specific location. Removing this hardcoded relative path will make it possible to move this test as-is.
* [lldb] s/assertTrue/assertEqual in TestStepTarget.pyPavel Labath2019-12-041-9/+7
| | | | this improves error messages.
* Mark some tests as xfail on AArch64 LinuxDiana Picus2019-12-031-0/+4
| | | | | | | | | I have either opened new bug reports for these tests, or added links to existing bugs. This should help make the lldb-aarch64-ubuntu buildbot green (there will still be some unexpected passes that someone should look into, but those can be handled later).
* Complete complete types early when importing types from Clang module DWARF.Adrian Prantl2019-11-226-0/+95
| | | | | | | | | | | | | | | | | | | | | This affects -gmodules only. Under normal operation pcm_type is a shallow forward declaration that gets completed later. This is necessary to support cyclic data structures. If, however, pcm_type is already complete (for example, because it was loaded for a different target before), the definition needs to be imported right away, too. Type::ResolveClangType() effectively ignores the ResolveState inside type_sp and only looks at IsDefined(), so it never calls ClangASTImporter::ASTImporterDelegate::ImportDefinitionTo(), which does extra work for Objective-C classes. This would result in only the forward declaration to be visible. An alternative implementation would be to sink this into Type::ResolveClangType ( https://github.com/llvm/llvm-project/blob/88235812a71d99c082e7aa2ef9356d43d1f83a80/lldb/source/Symbol/Type.cpp#L5809) though it isn't clear to me how to best do this from a layering perspective. rdar://problem/52134074 Differential Revision: https://reviews.llvm.org/D70415
* Mark PR44037 tests as XFAIL on AArch64 Linux dwoDiana Picus2019-11-192-1/+12
| | | | | | | | | | | | These tests are failing with various assertion failures, but they all throw the following error message first: error: a.out 0x0000002d: adding range [0x14-0x24) which has a base that is less than the function's low PC 0x40060c. See llvm.org/pr44037. Differential Revision: https://reviews.llvm.org/D70381
* Add a testcase for Clang modules being updated within one LLDB session.Adrian Prantl2019-11-156-0/+87
| | | | This actually works as expected, but wasn't explicitly tested before.
* [-gmodules] Let LLDB log a warning if the Clang module hash mismatches.Adrian Prantl2019-11-154-0/+75
| | | | | | | | This feature is mostly there to aid debugging of Clang module issues, since the only useful actual the end-user can to is to recompile their program. Differential Revision: https://reviews.llvm.org/D70272
* [LLDB][Formatters] Re-enable std::function formatter with fixes to improve ↵shafik2019-11-122-6/+10
| | | | | | | | | non-cached lookup performance Performance issues lead to the libc++ std::function formatter to be disabled. We addressed some of those performance issues by adding caching see D67111 This PR fixes the first lookup performance by not using FindSymbolsMatchingRegExAndType(...) and instead finding the compilation unit the std::function wrapped callable should be in and then searching for the callable directly in the CU. Differential Revision: https://reviews.llvm.org/D69913
* [lldb] [test] Un-XFAIL tests that work on NetBSD 9Michał Górny2019-11-091-2/+0
|
* XFAIL TestLocalVariables.py on WindowsJonas Devlieghere2019-10-211-0/+1
| | | | | | | | This test has been failing for a while on the Windows bot. https://bugs.llvm.org/show_bug.cgi?id=43752 llvm-svn: 375459
* Speed up accelerator table lookupsAdrian Prantl2019-10-1011-0/+92
| | | | | | | | | | | | | | | | | | | When debugging a large program like clang and doing "frame variable *this", the ValueObject pretty printer is doing hundreds of scoped FindTypes lookups. The ones that take longest are the ones where the DWARFDeclContext ends in something like ::Iterator which produces many false positives that need to be filtered out *after* extracting the DIEs. This patch demonstrates a way to filter out false positives at the accerator table lookup step. With this patch lldb clang-10 -o "b EmitFunctionStart" -o r -o "f 2" -o "fr v *this" -b -- ... goes (in user time) from 5.6s -> 4.8s or (in wall clock) from 6.9s -> 6.0s. Differential Revision: https://reviews.llvm.org/D68678 llvm-svn: 374401
* Add test coverage to printing of enums and fix display of unsigned valuesFrederic Riss2019-10-082-29/+57
| | | | | | | | | | | | | | | TestCPP11EnumTypes.py should have covered all our bases when it comes to typed enums, but it missed the regression introduced in r374066. The reason it didn't catch it is somewhat funny: the test was copied over from another test that recompiled a source file with a different base type every time, but neither the test source nor the python code was adapted for testing enums. As a result, this test was just running 8 times the exact same checks on the exact same binary. This commit fixes the coverage and addresses the issue revealed by the new tests. llvm-svn: 374108
* [Testsuite] Get rid of most of the recursive shared library MakefilesFrederic Riss2019-10-086-49/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the secondary Makefiles we have are just a couple variable definitions and then an include of Makefile.rules. This patch removes most of the secondary Makefiles and replaces them with a direct invocation of Makefile.rules in the main Makefile. The specificities of each sub-build are listed right there on the recursive $(MAKE) call. All the variables that matter are being passed automagically by make as they have been passed on the command line. The only things you need to specify are the variables customizating the Makefile.rules logic for each image. This patch also removes most of the clean logic from those Makefiles and from Makefile.rules. The clean rule is not required anymore now that we run the testsuite in a separate build directory that is wiped with each run. The patch leaves a very crude version of clean in Makefile.rules which removes everything inside of $(BUILDDIR). It does this only when the $(BUILDDIR) looks like a sub-directory of our standard testsuite build directory to be extra safe. Reviewers: aprantl, labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68558 llvm-svn: 374076
* Add pretty printing of Clang "bitfield" enumsFrederic Riss2019-10-082-3/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Using enumerators as flags is standard practice. This patch adds support to LLDB to display such enum values symbolically, eg: (E) e1 = A | B If enumerators don't cover the whole value, the remaining bits are displayed as hexadecimal: (E) e4 = A | 0x10 Detecting whether an enum is used as a bitfield or not is complicated. This patch implements a heuristic that assumes that such enumerators will either have only 1 bit set or will be a combination of previous values. This patch doesn't change the way we currently display enums which the above heuristic would not consider as bitfields. Reviewers: jingham, labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D67520 llvm-svn: 374067
* [lldb] Fix evaluation of nested classes with parent from other CURaphael Isemann2019-10-025-0/+81
| | | | | | | | | | | | | | This makes sure that we associate DIEs that are imported from other CUs with the appropriate decl context. Without this fix, nested classes can be dumped directly into their CU context if their parent was imported from another CU. Reviewed By: teemperor, labath Differential Revision: https://reviews.llvm.org/D68278 Patch by Jaroslav Sevcik! llvm-svn: 373470
* [lldb] [test] Add NetBSD to XFAIL list for thread_local testMichal Gorny2019-09-251-1/+2
| | | | llvm-svn: 372840
* Canonicalize variable usage in testsuite MakefilesAdrian Prantl2019-09-2547-75/+71
| | | | | | | | | | | | This test streamlines our use of variables that are expected by Makefile.rules throughout the test suite. Mostly it replaced potentially dangerous overrides and updates of variables like CFLAGS with safe assignments to variables reserved for this purpose like CFLAGS_EXTRAS. Differential Revision: https://reviews.llvm.org/D67984 llvm-svn: 372795
* [lldb] Print better diagnostics for user expressions and modulesRaphael Isemann2019-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently our expression evaluators only prints very basic errors that are not very useful when writing complex expressions. For example, in the expression below the user made a type error, but it's not clear from the diagnostic what went wrong: ``` (lldb) expr printf("Modulos are:", foobar%mo1, foobar%mo2, foobar%mo3) error: invalid operands to binary expression ('int' and 'double') ``` This patch enables full Clang diagnostics in our expression evaluator. After this patch the diagnostics for the expression look like this: ``` (lldb) expr printf("Modulos are:", foobar%mo1, foobar%mo2, foobar%mo3) error: <user expression 1>:1:54: invalid operands to binary expression ('int' and 'float') printf("Modulos are:", foobar%mo1, foobar%mo2, foobar%mo3) ~~~~~~^~~~ ``` To make this possible, we now emulate a user expression file within our diagnostics. This prevents that the user is exposed to our internal wrapper code we inject. Note that the diagnostics that refer to declarations from the debug information (e.g. 'note' diagnostics pointing to a called function) will not be improved by this as they don't have any source locations associated with them, so caret or line printing isn't possible. We instead just suppress these diagnostics as we already do with warnings as they would otherwise just be a context message without any context (and the original diagnostic in the user expression should be enough to explain the issue). Fixes rdar://24306342 Reviewers: JDevlieghere, aprantl, shafik, #lldb Reviewed By: JDevlieghere, #lldb Subscribers: usaxena95, davide, jingham, aprantl, arphaman, kadircet, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65646 llvm-svn: 372203
* Clean up this test.Jim Ingham2019-09-181-46/+11
| | | | | | | | | | | | | I don't know what the intent of parts of this test were. We set a bunch of breakpoints and ran from one to the other, doing "self.runCmd("thread backtrace")" then continuing to the next one. We didn't actually verify the contents of the backtrace, nor that we hit the breakpoints we set in any particular order. The only actual test was to run sel_getName at two of these stops. So I reduced the test to just stopping at the places where we were actually going to run an expression, and tested the expression. llvm-svn: 372196
* TestFoundationDisassembly.py is not dependent on debug information.Jim Ingham2019-09-181-0/+2
| | | | | | | This test is about disassembling symbols in a framework without debug information. So we don't need to run it once per debug info flavor. llvm-svn: 372193
* [dotest] Delete trivial inline test makefilesPavel Labath2019-09-0514-36/+0
| | | | | | inline tests are able to generate these automatically llvm-svn: 371015
* [lldb][NFC] Add a simple test for thread_local storage.Raphael Isemann2019-09-043-0/+25
| | | | | | | Seems we fail to read TLS data on Linux, so the test only runs on macOS for now. We will see how this test runs on the BSD bots. llvm-svn: 370848
* [dotest] Avoid the need for LEVEL= makefile boilerplatePavel Labath2019-09-04140-402/+140
| | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of each test case knowing its depth relative to the test root, we can just have dotest add the folder containing Makefile.rules to the include path. This was motivated by r370616, though I have been wanting to do this ever since we moved to building tests out-of-tree. The only manually modified files in this patch are lldbinline.py and plugins/builder_base.py. The rest of the patch has been produced by this shell command: find . \( -name Makefile -o -name '*.mk' \) -exec sed --in-place -e '/LEVEL *:\?=/d' -e '1,2{/^$/d}' -e 's,\$(LEVEL)/,,' {} + Reviewers: teemperor, aprantl, espindola, jfb Subscribers: emaste, javed.absar, arichardson, christof, arphaman, lldb-commits Differential Revision: https://reviews.llvm.org/D67083 llvm-svn: 370845
* [lldb] [test] Mark 'reenabled' tests XFAIL on NetBSDMichal Gorny2019-09-041-0/+1
| | | | llvm-svn: 370842
* [test] Remove print statements and verify that the symbol existsJonas Devlieghere2019-09-031-10/+1
| | | | | | | This removes some (commented out) print statements and adds a line that verifies that uses image list to check the symbol. llvm-svn: 370777
* [lldb][NFC] Also test operator new/new[]/delete/delete[]/comma/addr-ofRaphael Isemann2019-08-291-0/+18
| | | | llvm-svn: 370315
* [TestCppOperators] Enable TestCppOperators on Windows.Jonas Devlieghere2019-08-281-2/+1
| | | | | | | | | This test is passing on the Windows bot: Unexpected Passing Tests (1): lldb-Suite :: lang/cpp/operators/TestCppOperators.py llvm-svn: 370227
* [lldb][NFC] Test named operators like new and function names that might ↵Raphael Isemann2019-08-281-0/+18
| | | | | | confuse LLDB llvm-svn: 370199
* [lldb][NFC] Actually run all expects in lang/cpp/operatorsRaphael Isemann2019-08-281-12/+6
| | | | | | | | | | | | Apparently inline tests stop running anything after an empty line behind an self.expect, which is a very good approach that could never cause people to write tests that never run. This patch removes all the empty lines so that all this test is actually run. Also fixes the broken expects that only passed because they weren't run before. llvm-svn: 370195
* [lldb][NFC] Extend operator test case with conversion operatorsRaphael Isemann2019-08-281-0/+9
| | | | llvm-svn: 370194
* [lldb][NFC] Test custom C++ operatorsRaphael Isemann2019-08-283-0/+150
| | | | llvm-svn: 370186
* Fix TestStdCXXDisassembly.pyPavel Labath2019-08-271-1/+1
| | | | | | missing decorator import. llvm-svn: 370020
* [test] Disable two of the recently (re)enabled tests on Windows.Jonas Devlieghere2019-08-271-0/+1
| | | | | | This disables two tests on Windows that I re-enabled in r369995. llvm-svn: 370003
* [dotest] Remove long running test "decorator" and re-enable tests.Jonas Devlieghere2019-08-272-10/+0
| | | | | | | | | | | | Today I discovered the skipLongRunningTest decorator and to my surprise all the tests were passing without the decorator. They don't seem to be that expensive either, they take a few seconds but we have tests that take much longer than that. As such I propose to remove the decorator and enable them by default. Differential revision: https://reviews.llvm.org/D66774 llvm-svn: 369995
* [LLDB] Address post-commit code review feedback.Jonas Devlieghere2019-08-231-2/+0
| | | | | | | This patch addresses Adrian McCarthy's code review feedback in https://reviews.llvm.org/D66447 llvm-svn: 369731
* [test] Update test so it matches the Windows outputJonas Devlieghere2019-08-211-3/+3
| | | | llvm-svn: 369595
* When building file without debug info, include the architectureJason Molenda2019-08-211-1/+5
| | | | | | setting in the cflags on Darwin systems. llvm-svn: 369584
OpenPOWER on IntegriCloud