summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Rename Target::GetSharedModule to Target::GetOrCreateModule.Jason Molenda2019-04-083-0/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a flag to control whether the ModulesDidLoad notification is called when a module is added. If the notifications are disabled, the caller must call ModulesDidLoad after adding all the new modules, but postponing this notification until they're all batched up can allow for better efficiency than notifying one-by-one. Change the name of the ModuleList notifier functions that a subclass can implement to start with 'Notify' to make it clear what they are. Add a NotifyModulesRemoved. Add header documentation for the changed/updated methods. Added defaulted-value 'notify' argument to ModuleList Append, AppendIfNeeded, and Remove because callers working with a local ModuleList don't have an obvious idea of what notify means in this context. When the ModuleList is a part of the Target class, the notify behavior matters. DynamicLoaderDarwin has been updated so that libraries being added/removed are correctly batched up before notifications are sent. Added the TestModuleLoadedNotifys.py test to run on Darwin to test this. <rdar://problem/48293064> Differential Revision: https://reviews.llvm.org/D60172 llvm-svn: 357955
* [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
* [Test] Remove no_debug_info_test decorator from Obj-C data formatters.Jonas Devlieghere2019-04-0511-11/+0
| | | | | | As discussed in https://reviews.llvm.org/D60300. llvm-svn: 357813
* [testsuite] Split Objective-C data formatterJonas Devlieghere2019-04-0514-530/+584
| | | | | | | | | | | | | The testcase for objective-c data formatters is very big as it checks a bunch of stuff. This is annoying when using the lit test driver, because it prevents us from running the different cases in parallel. As a result, it's always one of the last few tests that complete. This patch splits the test into multiple files that share a common base class. This way lit can run the different tests in parallel. Differential revision: https://reviews.llvm.org/D60300 llvm-svn: 357786
* TestVCCode_step: replace assertTrue with more specific assertionsPavel Labath2019-04-051-10/+10
| | | | | | | | | When this test fails (flakes) all we get is an error message like "False is not True". This replaces patterns like assertTrue(a == b) with assertEqual(a, b), so we get a better error message (and hopefully a hint as to why the test is flaky). llvm-svn: 357747
* modify-python-lldb.py: (Re)move __len__ and __iter__ supportPavel Labath2019-04-041-0/+1
| | | | | | | | | | | | | | | | Summary: This patch moves the modify-python-lldb code for adding new functions to the SBModule class into the SBModule interface file. As this is the last class using this functionality, I also remove all support for this kind of modifications from modify-python-lldb.py. Reviewers: amccarth, clayborg, jingham Subscribers: zturner, lldb-commits Differential Revision: https://reviews.llvm.org/D60195 llvm-svn: 357680
* Un-xfail one of the TestMiniDumpUUID tests on WindowsStella Stamenova2019-04-031-1/+0
| | | | | | The test is passing on Windows and the windows bot is failing because of the unexpected pass llvm-svn: 357641
* Re-enable most lldb-vscode tests on Linux.Jorge Gorbe Moya2019-04-034-20/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: After https://reviews.llvm.org/D59828 and https://reviews.llvm.org/D59849, I believe the problems with these tests hanging have been solved. I tried enabling all of them on my machine, and got two failures: - One of them was spawning a child process that lives for 5 seconds, waited for 5 seconds to attach to the child, and failed because the child wasn't there. - The other one was a legit failure because shell expansion of arguments doesn't work on Linux. This tests enables all lldb-vscode tests on Linux except for "launch process with shell expansion of args" (which doesn't work), and fixes the other broken test by reducing the time it waits before attaching to its child process. Reviewers: zturner, clayborg Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D60153 llvm-svn: 357633
* Attempt #2 to get this patch working. I will watch the build bots carefully ↵Greg Clayton2019-04-035-0/+81
| | | | | | | | | | | | | | | | today. Allow partial UUID matching in Minidump core file plug-in Breakpad had bugs in earlier versions where it would take a 20 byte ELF build ID and put it into the minidump file as a 16 byte PDB70 UUID with an age of zero. This would make it impossible to do postmortem debugging with one of these older minidump files. This fix allows partial matching of UUIDs. To do this we first try and match with the full UUID value, and then fall back to removing the original directory path from the module specification and we remove the UUID requirement, and then manually do the matching ourselves. This allows scripts to find symbols files using a symbol server, place them all in a directory, use the "setting set target.exec-search-paths" setting to specify the directory, and then load the core file. The Target::GetSharedModule() can then find the correct file without doing any other matching and load it. Tests were added to cover a partial UUID match where the breakpad file has a 16 byte UUID and the actual file on disk has a 20 byte UUID, both where the first 16 bytes match, and don't match. Differential Revision: https://reviews.llvm.org/D60001 llvm-svn: 357603
* modify-python-lldb.py: clean up __iter__ and __len__ supportPavel Labath2019-04-036-0/+13
| | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of modifying the swig-generated code, just add the appropriate methods to the interface files in order to get the swig to do the generation for us. This is a straight-forward move from the python script to the interface files. The single class which has nontrivial handling in the script (SBModule) has been left for a separate patch. For the cases where I did not find any tests exercising the iteration/length methods (i.e., no tests failed after I stopped emitting them), I tried to add basic tests for that functionality. Reviewers: zturner, jingham, amccarth Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D60119 llvm-svn: 357572
* Revert r357504, r357491, r357482 because of bot breakage.Adrian Prantl2019-04-025-86/+1
| | | | | | | | | | | | | See discussion in https://reviews.llvm.org/D60001. Revert Clean up windows build bot. This reverts r357504 (git commit 380c2420ecb0c3e809b04f385d37b89800df1ecf) Revert Fix buildbot where paths were not matching up. This reverts r357491 (git commit 5050586860140b55a0cc68c77dd1438f44a23ca5) Revert Allow partial UUID matching in Minidump core file plug-in This reverts r357482 (git commit 838bba9c34bf1e5500c2e100327bc764afc8d367) llvm-svn: 357534
* Clean up windows build bot. Greg Clayton2019-04-021-0/+2
| | | | llvm-svn: 357504
* Fix buildbot where paths were not matching up.Greg Clayton2019-04-021-1/+4
| | | | llvm-svn: 357491
* Allow partial UUID matching in Minidump core file plug-inGreg Clayton2019-04-025-0/+80
| | | | | | | | | | | | Breakpad had bugs in earlier versions where it would take a 20 byte ELF build ID and put it into the minidump file as a 16 byte PDB70 UUID with an age of zero. This would make it impossible to do postmortem debugging with one of these older minidump files. This fix allows partial matching of UUIDs. To do this we first try and match with the full UUID value, and then fall back to removing the original directory path from the module specification and we remove the UUID requirement, and then manually do the matching ourselves. This allows scripts to find symbols files using a symbol server, place them all in a directory, use the "setting set target.exec-search-paths" setting to specify the directory, and then load the core file. The Target::GetSharedModule() can then find the correct file without doing any other matching and load it. Tests were added to cover a partial UUID match where the breakpad file has a 16 byte UUID and the actual file on disk has a 20 byte UUID, both where the first 16 bytes match, and don't match. Differential Revision: https://reviews.llvm.org/D60001 llvm-svn: 357482
* Fix flakyness in TestCommandScriptImmediateOutputPavel Labath2019-04-022-5/+7
| | | | | | | | | | | | | | | I'm not sure why this surfaced at this particular point, but TestCommandScriptImmediateOutput (a pexpect test) had a synchronization issue, where the (lldb) promts it was expecting were getting out of sync. This happened for two reasons: - it did not expect the initial (lldb) prompt we print at startup - launchArgs() returned None, which resulted in an extra "target create None" command being issued to lldb (and an extra unhandled prompt being printed). Resolving these two issues seems to fix (or at least, improve) the test. llvm-svn: 357459
* Fix llvm_unreachable in TestWriteMemoryPavel Labath2019-04-021-1/+1
| | | | | | | | | | The test was hitting llvm_unreachable in Platform::GetSoftwareBreakpointTrapOpcode because it could not figure out the architecture of the process. Since that is not the purpose of the test, I change the test to use an explicit CreateTargetWithFileAndTargetTriple command to specify it. llvm-svn: 357456
* Simplify TestGdbRemoteRegisterStatePavel Labath2019-04-021-9/+0
| | | | | | | | While reviewing D56233 it became clear to me that this test can be simplified. There's no need for a start-stop cycle in the inferior -- we can start fiddling with its registers as soon as it is launched. llvm-svn: 357451
* [lldb-vscode] Add logic to handle EOF when reading from lldb-vscode stdout.Jorge Gorbe Moya2019-04-011-31/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change prevents the lldb-vscode test harness from hanging up waiting for new messages when the lldb-vscode subprocess crashes. Now, when an EOF from the subprocess pipe is detected we enqueue a `None` packet in the received packets list. Then, during the message processing loop, we can use this `None` packet to tell apart the case where lldb-vscode has terminated unexpectedly from the normal situation where no pending messages means blocking and waiting for more data. I believe this should be enough to fix the issues with these tests hanging on multiple platforms. Once this lands, I'll prepare and test a separate change removing the @skipIfLinux annotations. Reviewers: clayborg, zturner Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D59849 llvm-svn: 357426
* [Process] Fix WriteMemory return valueMed Ismail Bennani2019-04-011-0/+29
| | | | | | | | | | | | | | | | | | | | | Summary: In case of a breakpoint site overlapping with the destination address, the WriteMemory method reported an incorrect memory size. Instead of returning the right amount of bytes written, it falls through the scope and returned 0. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Reviewers: jasonmolenda, friss, jingham Subscribers: JDevlieghere, davide, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D60022 llvm-svn: 357420
* [lldb] [Process/elf-core] Support aarch64 NetBSD core dumpsMichal Gorny2019-04-017-0/+15
| | | | | | | | | | | Include support for NetBSD core dumps from evbarm/aarch64 system, and matching test cases for them. Based on earlier work by Kamil Rytarowski. Differential Revision: https://reviews.llvm.org/D60034 llvm-svn: 357399
* Fix for regression test, since we rely on the formatter for std::vector in ↵Shafik Yaghmour2019-03-281-0/+1
| | | | | | | | the test we need a libc++ category. See differential https://reviews.llvm.org/D59847 for initial change that this fixes llvm-svn: 357210
* Fix the swig typemap for "uint32_t *versions, uint32_t num_versions".Jim Ingham2019-03-282-0/+267
| | | | | | | | | It was making a list of a certain size but not always filling in that many elements, which would lead to a crash iterating over the list. Differential Revision: https://reviews.llvm.org/D59913 llvm-svn: 357207
* Regression test to ensure that we handling importing of std::vector of enums ↵Shafik Yaghmour2019-03-283-0/+47
| | | | | | | | | | | correctly Summary: https://reviews.llvm.org/D59845 added a fix for the IsStructuralMatch(...) specialization for EnumDecl this test should pass once this fix is committed. Differential Revision: https://reviews.llvm.org/D59847 llvm-svn: 357188
* [Platform] Remove Kalimba PlatformJonas Devlieghere2019-03-271-2/+0
| | | | | | | | | This patch removes the Kalimba platform. For more information please refer to the corresponding thread on the mailing list. http://lists.llvm.org/pipermail/lldb-dev/2019-March/014921.html llvm-svn: 357086
* Rename some variables in the std-module testsPavel Labath2019-03-272-2/+2
| | | | | | | They cause failures on some systems due to an unrelated bug (pr35043). This works around that. llvm-svn: 357080
* Reapply minidump changes reverted in r356806Pavel Labath2019-03-258-0/+134
| | | | | | | | | The changes were reverted due to ubsan errors (unaligned accesses). Here I fix those errors by first copying the data into aligned storage. Besides fixing alignment issues, this also fixes reading of minidump strings on big-endian systems. llvm-svn: 356896
* Revert minidump changesJonas Devlieghere2019-03-228-134/+0
| | | | | | | | | | | | | | This reverts the following two commits: Revert "Extend r356573 (minidump UUID handling) to cover elf build-ids too" Revert "Fix UUID decoding from minidump files" Greg's original commit broke the sanitizer bot which has been red for several days now. http://green.lab.llvm.org/green/view/LLDB/job/lldb-sanitized/ llvm-svn: 356806
* Extend r356573 (minidump UUID handling) to cover elf build-ids tooPavel Labath2019-03-222-0/+13
| | | | | | | | Breakpad (but not crashpad) will insert an empty (all-zero) build-id record for modules which do not have a build-id. This tells lldb to treat such records as empty/invalid uuids. llvm-svn: 356751
* Makefile.rules: Normalize use of trailing slashes in path variables.Adrian Prantl2019-03-211-4/+4
| | | | llvm-svn: 356711
* Use list comprehension instead of map/filter to prepare Python2/3 compatSerge Guelton2019-03-211-2/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D59579 llvm-svn: 356647
* Fix UUID decoding from minidump filesGreg Clayton2019-03-207-0/+121
| | | | | | | | | | | | | This patch fixes: UUIDs now don't include the age field from a PDB70 when the age is zero. Prior to this they would incorrectly contain the zero age which stopped us from being able to match up the UUID with real files. UUIDs for Apple targets get the first 32 bit value and next two 16 bit values swapped. Breakpad incorrectly swaps these values when it creates darwin minidump files, so this must be undone so we can match up symbol files with the minidump modules. UUIDs that are all zeroes are treated as invalid UUIDs. Breakpad will always save out a UUID, even if one wasn't available. This caused all files that have UUID values of zero to be uniqued to the first module that had a zero UUID. We now don't fill in the UUID if it is all zeroes. Added tests for PDB70 and ELF build ID based CvRecords. Differential Revision: https://reviews.llvm.org/D59433 llvm-svn: 356573
* 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
* Skip TestVSCode_setFunctionBreakpoints on linuxPavel Labath2019-03-181-0/+1
| | | | | | Test hangs under heavy load. llvm-svn: 356379
* Fix TestCommandScriptImmediateOutput for python3Pavel Labath2019-03-181-3/+3
| | | | | | s/iteritems/items llvm-svn: 356370
* Implement a better way of not passing the sanitizer environment on to tests.Adrian Prantl2019-03-151-3/+2
| | | | | | rdar://problem/48889580 llvm-svn: 356275
* Fix a double-overrelease in the TestDataFormatterObjC test program.Adrian Prantl2019-03-141-4/+5
| | | | llvm-svn: 356160
* Make sure that a sanitizer LLDB's environment doesn't get passed onAdrian Prantl2019-03-141-0/+5
| | | | | | to test binaries. llvm-svn: 356113
* [Python] Fix TestDataFormatterSmartArray to work across python versions.Davide Italiano2019-03-131-4/+4
| | | | | | | | | | | Python 3 default encoding is utf-8, so taking random bytes and interpreting them as a string might result in invalid unicode sequences. As the only thing we care about here is that the formatter shows the elements of the underyling array, relax the string matching (this is good enough as all the elements are distinct so they resolve to different strings). llvm-svn: 356096
* [lldbsuite] Un-xfail TestPyObjSynthProvider on WindowsStella Stamenova2019-03-131-1/+0
| | | | | | One of Davide's changes yesterday fixed the behavior on Windows, so the test is now passing. llvm-svn: 356065
* [TestBatchMode] We already log this output to a file.Davide Italiano2019-03-131-12/+0
| | | | llvm-svn: 356003
* [testsuite] Remove other traces broken in python 3.Davide Italiano2019-03-131-31/+0
| | | | | | | They can be reinstated in case somebody needs to debug this test in the future. llvm-svn: 356002
* [testsuite] Remove dead code in TestFormats.Davide Italiano2019-03-131-27/+0
| | | | llvm-svn: 356000
* [test] Some unicode sequences can't be printed, and Py 3 is more picky.Davide Italiano2019-03-131-4/+0
| | | | | | | | Given this was under trace, it can just be removed. If somebody ever needs to debug this testcase again and print the data, they can add a new statement. llvm-svn: 355999
* [Python] Fix another batch of python 2/python 3 portability issues.Davide Italiano2019-03-133-5/+19
| | | | llvm-svn: 355998
* Fix the broken Batch test by passing a custom module cache to the inferior lldb.Adrian Prantl2019-03-121-4/+7
| | | | llvm-svn: 355991
* Revert "Temporarily add more logging to TestBatchMode"Adrian Prantl2019-03-121-6/+0
| | | | llvm-svn: 355990
* Temporarily add more logging to TestBatchModeAdrian Prantl2019-03-121-0/+6
| | | | llvm-svn: 355986
* [lldb-mi] Make this test more reliable. NFC.Davide Italiano2019-03-121-0/+6
| | | | | | Except that it will probably stop failing on and off on my machine. llvm-svn: 355968
OpenPOWER on IntegriCloud