summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* Add char8_t support (C++20)Jonas Devlieghere2019-08-213-0/+53
| | | | | | | | | | | | This patch adds support for the char8_t type introduced in C++20 char8_t. The original patch was submitted by James Blachly on the LLDB mailing list [1]. I modified the patch a bit and added a test. [1] http://lists.llvm.org/pipermail/lldb-dev/2019-August/015393.html Differential revision: https://reviews.llvm.org/D66447 llvm-svn: 369582
* Change test to use uint64_t to support compiling for 32-bit architectures.Adrian Prantl2019-08-151-2/+2
| | | | llvm-svn: 369034
* Revert "[lldb] Fix dynamic_cast by no longer failing on variable without ↵Stella Stamenova2019-08-125-65/+0
| | | | | | | | metadata" This reverts commit b448d1bf212219febbb182d00c210bad1bd25e7f. llvm-svn: 368615
* [lldb] Fix dynamic_cast by no longer failing on variable without metadataRaphael Isemann2019-08-105-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Our IR rewriting infrastructure currently fails when it encounters a variable which has no metadata associated. This causes dynamic_cast to fail as in this case IRForTarget considers the type info pointers ('@_ZTI...') to be variables without associated metadata. As there are no variables for these internal variables, this is actually not an error and dynamic_cast would work fine if we didn't throw this error. This patch fixes this by removing this diagnostics code. In case we would actually hit a variable that has no metadata (but is supposed to have), we still have the error in the expression log so this shouldn't make it harder to diagnose any missing metadata errors. This patch should fix dynamic_cast and also adds a bunch of test coverage to that language feature. Fixes rdar://10813639 Reviewers: davide, labath Reviewed By: labath Subscribers: friss, labath, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65932 llvm-svn: 368511
* Adjust a ValueObjectChild's offset when the child is a bitfieldAdrian Prantl2019-08-072-0/+11
| | | | | | | | | | | | | | | | | | If a bitfield doesn't fit into the child_byte_size'd window at child_byte_offset, move the window forward until it fits. The problem here is that Value has no notion of bitfields and thus the Value's DataExtractor is sized like the bitfields CompilerType; a sequence of bitfields, however, can be larger than their underlying type. This was not in the big-endian-derived DWARF 2 bitfield attributes because their offsets were counted from the end of the window, so they always fit. rdar://problem/53132189 Differential Revision: https://reviews.llvm.org/D65492 llvm-svn: 368226
* Fix ClangASTContext::CreateParameterDeclaration to not call addDeclShafik Yaghmour2019-08-026-0/+71
| | | | | | | | | Summary: The change https://reviews.llvm.org/D55575 modified ClangASTContext::CreateParameterDeclaration to call decl_ctx->addDecl(decl); this caused a regression since the existing code in DWARFASTParserClang::ParseChildParameters is called with the containing DeclContext. So when end up with cases where we are parsing a parameter for a member function and the parameter is added to the CXXRecordDecl as opposed to the CXXMethodDecl. This example is given in the regression test TestBreakpointInMemberFuncWNonPrimitiveParams.py which without this fix in a modules build leads to assert on setting a breakpoint in a member function with non primitive parameters. This scenario would be common when debugging LLDB or clang. Differential Revision: https://reviews.llvm.org/D65414 llvm-svn: 367726
* [lldb][NFC] Remove unused imports in python testsRaphael Isemann2019-08-0285-185/+0
| | | | llvm-svn: 367663
* [lldb][test_suite] Update tests with unexpected pass on Android aarch64Alex Langford2019-07-232-1/+5
| | | | | | | | | | Summary: update some test decorates that can actually pass on andriod aarch64 Patch by Wanyi Ye <kusmour@gmail.com> Differential Revision: https://reviews.llvm.org/D64767 llvm-svn: 366858
* [lldb] Fix crash when looking up type coming from the ClangModuleDeclVendorRaphael Isemann2019-07-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We assume in LLDB that every type comes from an ASTContext with an associated ClangASTContext. However the types inside the ClangModuleDeclVendor don't have a ClangASTContext so we end up crashing whenever we create a CompilerType for one of these types. Simplest way to trigger this bug is to just look up NSObject from a module: (lldb) expr @import Foundation (lldb) type lookup NSObject Assertion failed: (m_type_system != nullptr), function CompilerType, file /Users/teemperor/llvm1/llvm-project/lldb/source/Symbol/CompilerType.cpp, line 39. This patch just creates a ClangASTContext for the ASTContext used by ClangModuleDeclVendor. Reviewers: davide, shafik Reviewed By: davide Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64989 llvm-svn: 366653
* Add an expectedFailure test for type finding.Jim Ingham2019-07-183-0/+83
| | | | | | | | | | | | When two .c files define a type of the same name, lldb just picks one and uses it regardless of context. That is not correct. When stopped in a frame in one of the .c files that define this type, it should use that local definition. This commit just adds a test that checks for the correct behavior. It is currently xfailed. llvm-svn: 366507
* Add offsetof support to expression evaluator.Raphael Isemann2019-07-186-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We currently don't support offsetof in the expression evaluator as it is implemented as a macro (which then calls __builtin_offsetof) in stddef.h. The best solution would be to include that header (or even better, import Clang's builtin module), but header-parsing and (cross-platform) importing modules is not ready yet. Until we get this working with modules I would say we add the macro to our existing macro list as we already do with other macros from stddef.h/stdint.h. We should be able to drop all of them once we can import the relevant modules by default. rdar://26040641 Reviewers: shafik, davide Reviewed By: davide Subscribers: clayborg, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64917 llvm-svn: 366476
* [ASTImporter] Fix LLDB lookup in transparent ctx and with ext srcGabor Marton2019-07-172-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With LLDB we use localUncachedLookup(), however, that fails to find Decls when a transparent context is involved and the given DC has external lexical storage. The solution is to use noload_lookup, which works well with transparent contexts. But, we cannot use only the noload_lookup since the slow case of localUncachedLookup is still needed in some other cases. These other cases are handled in ASTImporterLookupTable, but we cannot use that with LLDB since that traverses through the AST which initiates the load of external decls again via DC::decls(). We must avoid loading external decls during the import becuase ExternalASTSource is implemented with ASTImporter, so external loads during import results in uncontrolled and faulty import. Reviewers: shafik, teemperor, jingham, clayborg, a_sidorin, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits, lldb-commits Tags: #clang, #lldb Differential Revision: https://reviews.llvm.org/D61333 llvm-svn: 366325
* [ABI] Fix SystemV ABI to handle nested aggregate type returned in registerAlex Langford2019-06-041-1/+2
| | | | | | | | | | Add a function to flatten the nested aggregate type Differential Revision: https://reviews.llvm.org/D62702 Patch by Wanyi Ye <kusmour@gmail.com> llvm-svn: 362543
* Make sure GetObjectDescription falls back to the Objective-C runtime.Adrian Prantl2019-05-163-0/+42
| | | | | | | | | | | | | This fixes an unintended regression introduced by https://reviews.llvm.org/D61451 by making sure the Objective-C runtime is also tried when the "correct" language runtime failed to return an object description. rdar://problem/50791055 Differential Revision: https://reviews.llvm.org/D62015 llvm-svn: 360929
* [Target] Generalize some behavior in ThreadAlex Langford2019-05-151-3/+4
| | | | | | | | | | Summary: I don't think there's a good reason for this behavior to be considered ObjC-specific. We can generalize this. Differential Revision: https://reviews.llvm.org/D61776 llvm-svn: 360741
* Supply a default implementation of IsRuntimeSupportValue.Adrian Prantl2019-05-031-1/+0
| | | | | | Thanks to Pavel for pointing this out. llvm-svn: 359925
* Split TestVLA into two and XFAIL one partPavel Labath2019-05-031-3/+10
| | | | | | | The part which checks whether vla_expr shows up in the variable list does not pass on non-darwin platforms. Add the appropriate decorator. llvm-svn: 359867
* Fix tests on non-Darwin platforms.Adrian Prantl2019-05-022-1/+6
| | | | llvm-svn: 359846
* Hide runtime support values such as clang's __vla_expr from frame variableAdrian Prantl2019-05-024-2/+94
| | | | | | | | | | | | by respecting the "artificial" attribute on variables. Function arguments that are artificial and useful to end-users are being whitelisted by the language runtime. <rdar://problem/45322477> Differential Revision: https://reviews.llvm.org/D61451 llvm-svn: 359841
* Inject only relevant local variables in the expression evaluation contextRaphael Isemann2019-05-021-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In r259902, LLDB started injecting all the locals in every expression evaluation. This fixed a bunch of issues, but also caused others, mostly performance regressions on some codebases. The regressions were bad enough that we added a setting in r274783 to control the behavior and we have been shipping with the setting off to avoid the perf regressions. This patch changes the logic injecting the local variables to only inject the ones present in the expression typed by the user. The approach is fairly simple and just scans the typed expression for every local name. Hopefully this gives us the best of both world as it just realizes the types of the variables really used by the expression. Landing this requires the 2 other issues I pointed out today to be addressed but I wanted to gather comments right away. Original patch by Frédéric Riss! Reviewers: jingham, clayborg, friss, shafik Reviewed By: jingham, clayborg Subscribers: teemperor, labath, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D46551 llvm-svn: 359773
* Disabling test in TestClassTemplateParameterPack.py until we do template ↵Shafik Yaghmour2019-05-012-7/+9
| | | | | | | | | | | | | lookup correctly Summary: Some tests currently only work because we are pulling all the local variables when we are evaluating an expression. This will soon change and these test are working but for the wrong reasons. The details can be found in the discussion here: http://lists.llvm.org/pipermail/lldb-commits/Week-of-Mon-20180507/040689.html Differential Review: https://reviews.llvm.org/D61266 llvm-svn: 359699
* [TestTemplateFunction] Add a missing debug info variant.Davide Italiano2019-04-251-1/+1
| | | | llvm-svn: 359249
* Skip test introduced in r359140 on windowsFrederic Riss2019-04-241-0/+2
| | | | | | | Not sure what is or is not supposed to work on Windows and I have no way to investigate this. llvm-svn: 359145
* Fix infinite recursion when calling C++ template functionsFrederic Riss2019-04-243-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When we encounter a templated function in the debug information, we were creating an AST that looked like this: FunctionTemplateDecl 0x12980ab90 <<invalid sloc>> <invalid sloc> foo<int> |-TemplateTypeParmDecl 0x12980aad0 <<invalid sloc>> <invalid sloc> class depth 0 index 0 T |-FunctionDecl 0x12980aa30 <<invalid sloc>> <invalid sloc> foo<int> 'int (int)' extern | |-TemplateArgument type 'int' | `-ParmVarDecl 0x12980a998 <<invalid sloc>> <invalid sloc> t1 'int' `-FunctionDecl 0x12980aa30 <<invalid sloc>> <invalid sloc> foo<int> 'int (int)' extern |-TemplateArgument type 'int' `-ParmVarDecl 0x12980a998 <<invalid sloc>> <invalid sloc> t1 'int' Note that the FunctionTemplateDecl has 2 children which are identical (as in have the same address). This is not what Clang is doing: FunctionTemplateDecl 0x7f89d206c6f8 </tmp/template.cpp:1:1, line:4:1> line:2:5 foo |-TemplateTypeParmDecl 0x7f89d206c4a8 <line:1:10, col:19> col:19 referenced typename depth 0 index 0 T |-FunctionDecl 0x7f89d206c660 <line:2:1, line:4:1> line:2:5 foo 'int (T)' | `-ParmVarDecl 0x7f89d206c570 <col:9, col:11> col:11 t1 'T' `-FunctionDecl 0x7f89d206cb60 <line:2:1, line:4:1> line:2:5 used foo 'int (int)' |-TemplateArgument type 'int' `-ParmVarDecl 0x7f89d206ca68 <col:9, col:11> col:11 t1 'int':'int' The 2 chidlren are different and actually repesent different things: the first one is the unspecialized version and the second one is specialized. (Just looking at the names shows another major difference which is that we create the parent with a name of "foo<int>" when it should be just "foo".) The fact that we have those 2 identical children confuses the ClangImporter and generates an infinite recursion (reported in https://llvm.org/pr41473). We cannot create the unspecialized version as the debug information doesn't contain a mapping from the template parameters to their use in the prototype. This patch just creates 2 different FunctionDecls for those 2 children of the FunctionTemplateDecl. This avoids the infinite recursion and allows us to call functions. As the XFAILs in the added test show, we've still got issues in our handling of templates. I believe they are mostly centered on the fact that we create do not register "foo" as a template, but "foo<int>". This is a bigger change that will need changes to the debug information generation. I believe this change makes sense on its own. Reviewers: shafik, clayborg, jingham Subscribers: aprantl, javed.absar, kristof.beyls, lldb-commits Differential Revision: https://reviews.llvm.org/D61044 llvm-svn: 359140
* Rename C++ TestGlobalVariables.py to have a distinct name from C version.Adrian Prantl2019-04-221-0/+0
| | | | llvm-svn: 358924
* [lldb] Don't filter variable list when doing a lookup by mangled name in ↵Kuba Mracek2019-04-183-0/+63
| | | | | | | | SymbolFileDWARF::FindGlobalVariables Differential Revision: https://reviews.llvm.org/D60737 llvm-svn: 358629
* Fix undefined behavior in DWARFASTParser::ParseChildArrayInfo()Adrian Prantl2019-04-101-0/+2
| | | | | | | PR40827: https://bugs.llvm.org/show_bug.cgi?id=40827 <rdar://problem/48729057> llvm-svn: 358137
* [testsuite] Split Obj-C foundation testJonas Devlieghere2019-04-104-142/+154
| | | | | | | | TestObjCMethods2.py was the third-longest running test on Darwin. By splitting it up, lit can exploit parallelism to reduce the total wall clock time. llvm-svn: 358088
* [testsuite] Split Objective-C new syntax testJonas Devlieghere2019-04-055-204/+225
| | | | | | | This splits the second longest test into separate test cases. Similar to what we did for the Objective-C data formatters in r357786. llvm-svn: 357824
* Improve error handling for Clang module imports.Adrian Prantl2019-03-195-8/+22
| | | | | | | | rdar://problem/48883558 Differential Revision: https://reviews.llvm.org/D59524 llvm-svn: 356462
* Bring Doxygen comment syntax in sync with LLVM coding style.Adrian Prantl2019-03-111-1/+1
| | | | | | This changes '@' prefix to '\'. llvm-svn: 355841
* [lldb] [test] Mark a few tests flakey on NetBSDMichal Gorny2019-03-111-0/+1
| | | | llvm-svn: 355830
* [lldb] [test] Adjust XFAIL list to match buildbot resultsMichal Gorny2019-03-091-0/+2
| | | | | | | | Adjust the XFAIL-ing tests to match consistent results from buildbot. I'm going to work on differences between them and my local results following this. llvm-svn: 355774
* [lldb] [test] Mark failing tests XFAIL on NetBSDMichal Gorny2019-03-0418-6/+26
| | | | | | | | | | | | | | | | Add a convenience 'expectedFailureNetBSD' decorator and mark all tests currently failing on NetBSD with it. Also skip a few tests that hang the test suite. This should establish a baseline for the test suite and get us closer to enabling tests on buildbot. This will help us catch regressions while we still have a lot of work to do to get tests working. It seems that there are also some flaky tests. I am going to address them later on. Differential Revision: https://reviews.llvm.org/D58527 llvm-svn: 355320
* Pass arguments correctly to the objc object checker on arm64Jim Ingham2019-02-272-0/+30
| | | | | | | | | | | | | | | | | Traditionally objc had two entry points, objc_msgSend for scalar return methods, and objc_msgSend_stret for struct return convention methods. But on arm64 the second was not needed (since arm64 doesn't use an argument register for the struct return pointer) so it was removed. The code that dispatches to the objc object checker when it sees some flavor of objc_msgSend was not aware of this change so was sending the wrong arguments to the checker. <rdar://problem/48315890> Differential Revision: https://reviews.llvm.org/D58699 llvm-svn: 355026
* [Python3] Fix TestObjCMethods.py to work with py2 and 3.Davide Italiano2019-02-181-1/+1
| | | | llvm-svn: 354286
* [testsuite] Skip this test correctly also on macOS.Davide Italiano2019-02-161-3/+2
| | | | llvm-svn: 354204
* Temporarily disable test:Richard Smith2019-02-161-1/+4
| | | | | | | | | test/lang/cpp/class-template-parameter-pack/TestClassTemplateParameterPack.py It fails on Mac OS; apparently a VarDecl 'void *&C' is implicitly declared there, making the class template name C ambiguous. llvm-svn: 354185
* Add explicit language specifier to test.Adrian Prantl2019-02-141-1/+1
| | | | llvm-svn: 354048
* Deserialize Clang module search path from DWARFAdrian Prantl2019-02-136-0/+53
| | | | | | | | | | | | This patch properly extracts the full submodule path as well as its search paths from DWARF import decls and passes it on to the ClangModulesDeclVendor. rdar://problem/47970144 Differential Revision: https://reviews.llvm.org/D58090 llvm-svn: 353961
* [lldb] Make frame recognizers vend synthesized eValueTypeVariableArgument valuesKuba Mracek2019-02-071-0/+1
| | | | llvm-svn: 353363
* Update stale comment in lang/c/struct_types/main.cJonas Devlieghere2019-02-041-2/+2
| | | | | | rdar://47322760 llvm-svn: 353087
* Adjust documentation for git migration.James Y Knight2019-01-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes most references to the paths: llvm.org/svn/ llvm.org/git/ llvm.org/viewvc/ github.com/llvm-mirror/ github.com/llvm-project/ reviews.llvm.org/diffusion/ to instead point to https://github.com/llvm/llvm-project. This is *not* a trivial substitution, because additionally, all the checkout instructions had to be migrated to instruct users on how to use the monorepo layout, setting LLVM_ENABLE_PROJECTS instead of checking out various projects into various subdirectories. I've attempted to not change any scripts here, only documentation. The scripts will have to be addressed separately. Additionally, I've deleted one document which appeared to be outdated and unneeded: lldb/docs/building-with-debug-llvm.txt Differential Revision: https://reviews.llvm.org/D57330 llvm-svn: 352514
* [testsuite] Remove unused seven module imports.Jonas Devlieghere2019-01-281-10/+0
| | | | llvm-svn: 352398
* Add decorator support for the DWARF version produced by the compilerAdrian Prantl2019-01-243-0/+10
| | | | | | | and mark up some tests failing in http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/ llvm-svn: 352072
OpenPOWER on IntegriCloud