summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
* [lldb][tests] Platform triple can be NoneTatyana Krasnukha2019-12-261-1/+6
| | | | If a remote target is not connected, SBPlatform's GetTriple function returns None.
* [lldb][tests] Posix function strdup requires macro _POSIX_C_SOURCETatyana Krasnukha2019-12-261-0/+2
|
* test: ensure that we dead-strip in the linkerSaleem Abdulrasool2019-12-241-0/+1
| | | | | `/OPT:REF` is needed for link to dead strip functions, `/Gy` by itself is not sufficient.
* test: correct flags for WindowsSaleem Abdulrasool2019-12-231-0/+2
| | | | | Adjust the flags for the LLDB test on Windows. This test was previously not running, but after the fix to the python detection, we now run this.
* [lldb/test] Skip editline tests when LLDB_ENABLE_LIBEDIT is off.Jonas Devlieghere2019-12-205-0/+8
| | | | | Add a new decorator that checks if LLDB was build with editline support and mark the relevant tests as skipped when that's not the case.
* [lldb/pexpect] Force-set the TERM environment variablePavel Labath2019-12-201-1/+7
| | | | | | | | | In some environments (typically, buildbots), this variable may not be available. This can cause tests to behave differently. Explicitly set the variable to "vt100" to ensure consistent test behavior. It should not matter that we do not inherit the process TERM variable, as the child process runs in a new virtual terminal anyway.
* [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] Remove XFAIL from TestDeadStrip.pyPavel Labath2019-12-201-2/+0
| | | | Fixed by 92211b.
* [ASTImporter][LLDB] Modifying ImportDeclContext(...) to ensure that we ↵shafik2019-12-193-1/+44
| | | | | | | | | | complete each FieldDecl of a RecordDecl when we are importing the definiton This fix was motivated by a crashes in expression parsing during code generation in which we had a RecordDecl that had incomplete FieldDecl. During code generation when computing the layout for the RecordDecl we crash because we have several incomplete FieldDecl. This fixes the issue by assuring that during ImportDefinition(...) for a RecordDecl we also import the definitions for each FieldDecl. Differential Revision: https://reviews.llvm.org/D71378
* Add prototype for a function we call.Jason Molenda2019-12-181-0/+2
|
* [lldb] Remove modern-type-lookupRaphael Isemann2019-12-1712-145/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As discussed on the mailing list [1] we have to make a decision for how to proceed with the modern-type-lookup. This patch removes modern-type-lookup from LLDB. This just removes all the code behind the modern-type-lookup setting but it does *not* remove any code from Clang (i.e., the ExternalASTMerger and the clang-import-test stay around for now). The motivation for this is that I don't think that the current approach of implementing modern-type-lookup will work out. Especially creating a completely new lookup system behind some setting that is never turned on by anyone and then one day make one big switch to the new system seems wrong. It doesn't fit into the way LLVM is developed and has so far made the transition work much more complicated than it has to be. A lot of the benefits that were supposed to come with the modern-type-lookup are related to having a better organization in the way types move across LLDB and having less dependencies on unrelated LLDB code. By just looking at the current code (mostly the ClangASTImporter) I think we can reach the same goals by just incrementally cleaning up, documenting, refactoring and actually testing the existing code we have. [1] http://lists.llvm.org/pipermail/lldb-dev/2019-December/015831.html Reviewers: shafik, martong Subscribers: rnkovacs, christof, arphaman, JDevlieghere, usaxena95, lldb-commits, friss Tags: #lldb Differential Revision: https://reviews.llvm.org/D71562
* [lldb-vscode] Centrally skip debug info variants for vscode testsPavel Labath2019-12-1710-25/+2
| | | | Previously each test was annotated manually. This does the same thing.
* [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-164-0/+6
| | | | 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-167-87/+190
| | | | | | | | | 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
* [lldb] Use file-based synchronization in TestVSCode_attachPavel Labath2019-12-162-14/+26
| | | | The is the best method we have at the moment for attach-style tests.
* [lldb/CMake] Rename LLDB_DISABLE_PYTHON to LLDB_ENABLE_PYTHONJonas Devlieghere2019-12-131-1/+1
| | | | | | | This matches the naming scheme used by LLVM and all the other optional dependencies in LLDB. Differential revision: https://reviews.llvm.org/D71482
* LanguageRuntime: Simplify NSException::GetSummary() outputMed Ismail Bennani2019-12-133-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | 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-1355-202/+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-13514-536/+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][NFC] Add reminder to TestSampleTest that setUp should be deleted if ↵Raphael Isemann2019-12-131-0/+2
| | | | it not needed.
* [lldb] Remove xpasses after pr44037 fix committedMuhammad Omair Javaid2019-12-134-24/+1
| | | | | | | This patch removes xpass decorator from tests which were failing due to pr44037. pr44037 was fixed by rev 6ce1a897b6a82e18059fd3b75b8d52ff12c2a605
* [lldb][dotest] Add `#include <algorithm>` to libc++ detectionJordan Rupprecht2019-12-111-1/+1
| | | | | | | | | | | | Summary: Speculative fix after 34ef51b5f979 broke the lldb buildbot on libc++ tests. Reviewers: echristo, EricWF Subscribers: ldionne, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71376
* [lldb][dotest] Improve libc++ detectionJordan Rupprecht2019-12-111-3/+10
| | | | | | | | | | | | Summary: The test logic for running libc++ tests only looks to see if `/usr/include/c++/v1` exists. This adds a fallback for including libc++ tests as long as `$(CC) -stdlib=libc++` works. Reviewers: labath, EricWF Subscribers: ldionne, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71319
* 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.
* update TestThreadStepOut.py to expect correct source line on arm64.Jason Molenda2019-12-112-3/+3
|
* Don't run expect based tests remotely.Jason Molenda2019-12-112-2/+2
|
* Change the mtc Makefile to check $SDKROOT value insteadJason Molenda2019-12-101-3/+8
| | | | | | | | | | of depending on it being set in the environment. Fred's change from October assumed that SDKROOT was set in the environment so that 'xcrun --show-sdk-path' would print the path. If it was passed in as a Makefile variable, it wouldn't be set in the environment and xcrun --show-sdk-path would always show the macOS SDK path. When running the lldb testsuite against an ios device via lit, this seems to be the case.
* Do not cache hardcoded formats in FormatManagerAdrian Prantl2019-12-104-0/+45
| | | | | | | | | | | | | | The cache in FormatCache uses only a type name as key. The hardcoded formats, synthetic children, etc inspect an entire ValueObject to determine their eligibility, which isn't modelled in the cache. This leads to bugs such as the one in this patch (where two similarly named types in different files have different hardcoded summary providers). The problem is exaggerated in the Swift language plugin due to the language's dynamic nature. rdar://problem/57756763 Differential Revision: https://reviews.llvm.org/D71233
* Skip TestGuiBasic.py on ios etc device testing.Jason Molenda2019-12-101-0/+1
|
* Skip TestMultilineCompletion.py on ios testsuite runs.Jason Molenda2019-12-101-0/+1
|
* Assert launch success in run_to_breakpoint_do_runVedant Kumar2019-12-101-0/+2
|
* [lldb] Actually enable wchar support in Editline when it is defined in the ↵Raphael Isemann2019-12-101-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | host config Summary: Our Editline implementation in LLDB supports using the wchar interface of Editline which should improve handling of unicode input when using Editline. At the moment we essentially just ignore unicode input and echo the escaped unicode code point (`\U1234`) to the command line (which we then also incorrectly treat as multiple characters, so console navigation is also broken afterwards). This patch just adds the include to the host config file which already contains the LLDB_EDITLINE_USE_WCHAR define to enable the Editline support (we just never included it in the file before). With this we now actually echo back unicode characters on macOS and we no longer ignore unicode input. On Linux this doesn't seem to improve the echoing back of characters but at least it fixes that we ignore unicode input. Reviewers: labath Reviewed By: labath Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71251
* The field ‘totalFrames’ which is total number of frames available, is ↵Serhiy Redko2019-12-092-7/+27
| | | | | | | | | | | | mandatory in StackTraces response for VSCode extension that implements DAP and declares capability 'supportsDelayedStackTraceLoading': "The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and the 'totalFrames' result of the 'StackTrace' request are supported." Lack of this field makes VSCode incorrectly display stack traces information D71034
* [lldb] Clean up accidentally passing TestDeadStrip.pyPavel Labath2019-12-092-11/+5
| | | | | | | | | | | | | | | | | This test was accidentally passing on non-darwin OS because it was explicitly setting the CFLAGS make variable. This meant that (in the default config) it was building with absolutely no debug info, and so setting a breakpoint on a stripped symbol failed, because there was really no trace of it remaining. In other configurations, we were generating the debug info (-gsplit-dwarf implies -g) and the test failed because we did not treat the zeroed out debug info address specially. The test was also xfailed in pretty much every non-standard configuration. This patch fixes the makefile to avoid messing with CFLAGS (use CFLAGS_EXTRAS instead). This causes it to fail in all configurations (except darwin), and so I replace the various decorators with a simple os!=darwin check.
* [lldb] Remove Xfail decorators from steadily passing testsMuhammad Omair Javaid2019-12-0913-70/+5
| | | | | This patch removes xfail decorator from some lldb testcases which are passing steadily now for past few week/months on aarch64/linux buildbot.
* [lldb] Xfail TestCallOverriddenMethod.py for aarch64/linuxMuhammad Omair Javaid2019-12-091-0/+1
| | | | | | | This test still fails on Linux aarch64. Tested by buildbot running Ubuntu Bionic Differential Revision: https://reviews.llvm.org/D70722
* [lldb] Add a test for how we lazily create Clang AST nodesRaphael Isemann2019-12-093-0/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: One of the ways we try to make LLDB faster is by only creating the Clang declarations (and loading the associated types) when we actually need them for something. For example an evaluated expression might need to load types to type check and codegen the expression. Currently this mechanism isn't really tested, so we currently have no way to know how many Clang nodes we load and when we load them. In general there seems to be some confusion when and why certain Clang nodes are created. As we are about to make some changes to the code which is creating Clang AST nodes we probably should have a test that at least checks that the current behaviour doesn't change. It also serves as some kind of documentation on the current behaviour. The test in this patch is just evaluating some expressions and checks which Clang nodes are created due to this in the module AST. The check happens by looking at the AST dump of the current module and then scanning it for the declarations we are looking for. I'm aware that there are things missing in this test (inheritance, template parameters, non-expression evaluation commands) but I'll expand it in follow up patches. Also this test found two potential bugs in LLDB which are documented near the respective asserts in the test: 1. LLDB seems to always load all types of local variables even when we don't reference them in the expression. We had patches that tried to prevent this but it seems that didn't work as well as it should have (even though we don't complete these types). 2. We always seem to complete the first field of any record we run into. This has the funny side effect that LLDB is faster when all classes in a project have an arbitrary `char unused;` as their first member. We probably want to fix this. Reviewers: shafik Subscribers: abidh, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71056
* [lldb][test] Handle .categories lookup for inline tests.Jordan Rupprecht2019-12-061-2/+9
| | | | | | | | | | | | | | | Summary: When creating a test with `lldbinline.MakeInlineTest()`, the reported `inspect.getfile(test.__class__)` is `lldbtest.pyc`, meaning any `.categories` file will be ineffective for those tests. Check for the test_filename first, which inline tests will set. Additionally, raise an error with the starting dir if `.categories` is not found. This makes the problem more obvious when it occurs: when the test is separated from the test framework tree. Reviewers: labath, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71099
* [lldb/IRExecutionUnit] Stop searching based on demangled namesPavel Labath2019-12-061-1/+0
| | | | | | | | | | | | | | | | | | | | | Summary: This was causing problems on linux, where we'd end up calling the deleting destructor instead of a regular one (because they have the same demangled name), making a lot of mischief in the process. The only place where this was necessary (according to the test suite, at least) was to call a base structor instead of a complete one, but this is now handled in a more targeted fashion. TestCallOverriddenMethod is now re-enabled as it now passes reliably. Reviewers: teemperor, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70722
* [lldb] Update hardcoded Makefile.rules inclusions.Jordan Rupprecht2019-12-054-9/+3
| | | | | | 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.
* Reland "[LiveDebugValues] Introduce entry values of unmodified params"Djordje Todorovic2019-12-053-16/+60
| | | | Relanding this after resolving the cause of the test failure.
* Clear out the python class name in OptionParsingStarted for the ↵Jim Ingham2019-12-041-2/+18
| | | | | | | | OptionGroupPythonClassWithDict options class. This value was hanging around so for instance if you made a scripted breakpoint resolver, then went to set another breakpoint, it would still think you had passed in a class name and the breakpoint wouldn't do what you expected.
* Change Target::FindBreakpointsByName to return Expected<vector>Joseph Tremoulet2019-12-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Using a BreakpointList corrupts the breakpoints' IDs because BreakpointList::Add sets the ID, so use a vector instead, and update the signature to return the vector wrapped in an llvm::Expected which can propagate any error from the inner call to StringIsBreakpointName. Note that, despite the similar name, SBTarget::FindBreakpointsByName doesn't suffer the same problem, because it uses a SBBreakpointList, which is more like a BreakpointIDList than a BreakpointList under the covers. Add a check to TestBreakpointNames that, without this fix, notices the ID getting mutated and fails. Reviewers: jingham, JDevlieghere Reviewed By: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70907
* [lldb] s/assertTrue/assertEqual in TestStepTarget.pyPavel Labath2019-12-041-9/+7
| | | | this improves error messages.
* Revert "[LiveDebugValues] Introduce entry values of unmodified params"Djordje Todorovic2019-12-032-59/+15
| | | | This reverts commit rG4cfceb910692 due to LLDB test failing.
* [lldb] Remove all remaining tabs from TestReturnValue.pyRaphael Isemann2019-12-031-5/+5
| | | | | | I assumed this was just a single typo, but it seems we actually have a whole bunch of tabs in this file which cause Python to complain about mixing tabs and spaces.
* [lldb][NFC] Test going up/down one line in the multiline expression editorRaphael Isemann2019-12-031-0/+67
|
* Fixup 6d18e53: xfail TestShowLocationDwarf5.py properlyDiana Picus2019-12-031-1/+1
| | | | Forgot to squash this...
OpenPOWER on IntegriCloud