summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
* [DWARF] Evaluate DW_OP_entry_valueVedant Kumar2019-09-114-1/+192
| | | | | | | | | | | | Add support for evaluating DW_OP_entry_value. This involves parsing DW_TAG_call_site_parameter and wiring the information through to the expression evaluator. rdar://54496008 Differential Revision: https://reviews.llvm.org/D67376 llvm-svn: 371668
* Ah, only skip this for embedded darwin targets.Jason Molenda2019-09-111-1/+1
| | | | llvm-svn: 371583
* Skip a test in TestProcessIO.py when running against ios devices.Jason Molenda2019-09-111-0/+1
| | | | llvm-svn: 371582
* [lldbtest] Add an "expected_cmd_failure" option to the filecheck helperVedant Kumar2019-09-101-1/+5
| | | | llvm-svn: 371544
* [lldb] Readd missing functionalities/breakpoint testsRaphael Isemann2019-09-10108-0/+5369
| | | | | | | It seems when I restructured the test folders the functionalities/breakpoint was deleted. This just reverts this change and re-adds the tests. llvm-svn: 371512
* Fix ELF core file memory reading for PT_LOAD program headers with no p_fileszGreg Clayton2019-09-091-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this fix, ELF files might contain PT_LOAD program headers that had a valid p_vaddr, and a valid file p_offset, but the p_filesz would be zero. For example in llvm-project/lldb/test/testcases/functionalities/postmortem/elf-core/thread_crash/linux-i386.core we see: Program Headers: Index p_type p_flags p_offset p_vaddr p_paddr p_filesz p_memsz p_align ======= ---------------- ---------- ------------------ ------------------ ------------------ ------------------ ------------------ ------------------ [ 0] PT_NOTE 0x00000000 0x0000000000000474 0x0000000000000000 0x0000000000000000 0x0000000000001940 0x0000000000000000 0x0000000000000000 [ 1] PT_LOAD 0x00000005 0x0000000000002000 0x0000000008048000 0x0000000000000000 0x0000000000000000 0x0000000000003000 0x0000000000001000 [ 2] PT_LOAD 0x00000004 0x0000000000002000 0x000000000804b000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000 [ 3] PT_LOAD 0x00000006 0x0000000000002000 0x000000000804c000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000 [ 4] PT_LOAD 0x00000006 0x0000000000002000 0x0000000009036000 0x0000000000000000 0x0000000000000000 0x0000000000025000 0x0000000000001000 [ 5] PT_LOAD 0x00000000 0x0000000000002000 0x00000000f63a1000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000 [ 6] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f63a2000 0x0000000000000000 0x0000000000000000 0x0000000000800000 0x0000000000001000 [ 7] PT_LOAD 0x00000000 0x0000000000002000 0x00000000f6ba2000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000 [ 8] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f6ba3000 0x0000000000000000 0x0000000000000000 0x0000000000804000 0x0000000000001000 [ 9] PT_LOAD 0x00000005 0x0000000000002000 0x00000000f73a7000 0x0000000000000000 0x0000000000000000 0x00000000001b1000 0x0000000000001000 [ 10] PT_LOAD 0x00000004 0x0000000000002000 0x00000000f7558000 0x0000000000000000 0x0000000000000000 0x0000000000002000 0x0000000000001000 [ 11] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f755a000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000 [ 12] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f755b000 0x0000000000000000 0x0000000000000000 0x0000000000003000 0x0000000000001000 [ 13] PT_LOAD 0x00000005 0x0000000000002000 0x00000000f755e000 0x0000000000000000 0x0000000000000000 0x0000000000019000 0x0000000000001000 [ 14] PT_LOAD 0x00000004 0x0000000000002000 0x00000000f7577000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000 [ 15] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f7578000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000 [ 16] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f7579000 0x0000000000000000 0x0000000000000000 0x0000000000002000 0x0000000000001000 [ 17] PT_LOAD 0x00000005 0x0000000000002000 0x00000000f757b000 0x0000000000000000 0x0000000000000000 0x000000000001c000 0x0000000000001000 [ 18] PT_LOAD 0x00000004 0x0000000000002000 0x00000000f7597000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000 [ 19] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f7598000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000 [ 20] PT_LOAD 0x00000005 0x0000000000002000 0x00000000f7599000 0x0000000000000000 0x0000000000000000 0x0000000000053000 0x0000000000001000 [ 21] PT_LOAD 0x00000004 0x0000000000002000 0x00000000f75ec000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000 [ 22] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f75ed000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000 [ 23] PT_LOAD 0x00000005 0x0000000000002000 0x00000000f75ee000 0x0000000000000000 0x0000000000000000 0x0000000000176000 0x0000000000001000 [ 24] PT_LOAD 0x00000004 0x0000000000002000 0x00000000f7764000 0x0000000000000000 0x0000000000000000 0x0000000000006000 0x0000000000001000 [ 25] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f776a000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000 [ 26] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f776b000 0x0000000000000000 0x0000000000000000 0x0000000000003000 0x0000000000001000 [ 27] PT_LOAD 0x00000006 0x0000000000002000 0x00000000f778a000 0x0000000000000000 0x0000000000000000 0x0000000000002000 0x0000000000001000 [ 28] PT_LOAD 0x00000004 0x0000000000002000 0x00000000f778c000 0x0000000000000000 0x0000000000002000 0x0000000000002000 0x0000000000001000 [ 29] PT_LOAD 0x00000005 0x0000000000004000 0x00000000f778e000 0x0000000000000000 0x0000000000002000 0x0000000000002000 0x0000000000001000 [ 30] PT_LOAD 0x00000005 0x0000000000006000 0x00000000f7790000 0x0000000000000000 0x0000000000000000 0x0000000000022000 0x0000000000001000 [ 31] PT_LOAD 0x00000004 0x0000000000006000 0x00000000f77b3000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000 [ 32] PT_LOAD 0x00000006 0x0000000000006000 0x00000000f77b4000 0x0000000000000000 0x0000000000000000 0x0000000000001000 0x0000000000001000 [ 33] PT_LOAD 0x00000006 0x0000000000006000 0x00000000ffa25000 0x0000000000000000 0x0000000000000000 0x0000000000022000 0x0000000000001000 Prior to this fix if users tried to read memory from one of these addresses like 0x8048000, they would end up incorrectly reading from the next memory region that actually had a p_filesz which would be 0x00000000f778c000 in this case. This fix correctly doesn't include program headers with zero p_filesz in the ProcessELFCore::m_core_aranges that is used to read memory. I found two cores files that have this same issue and added tests. Differential Revision: https://reviews.llvm.org/D67370 llvm-svn: 371457
* [Windows] Add support of watchpoints to `ProcessWindows`Aleksandr Urakov2019-09-0620-91/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support of watchpoints to the old `ProcessWindows` plugin. The `ProcessWindows` plugin uses the `RegisterContext` to set and reset watchpoints. The `RegisterContext` has some interface to access watchpoints, but it is very limited (e.g. it is impossible to retrieve the last triggered watchpoint with it), that's why I have implemented a slightly different interface in the `RegisterContextWindows`. Moreover, I have made the `ProcessWindows` plugin responsible for search of a vacant watchpoint slot, because watchpoints exist per-process (not per-thread), then we can place the same watchpoint in the same slot in different threads. With this scheme threads don't need to have their own watchpoint lists, and it simplifies identifying of the last triggered watchpoint. Reviewers: asmith, stella.stamenova, amccarth Reviewed By: amccarth Subscribers: labath, zturner, leonid.mashinskiy, abidh, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67168 llvm-svn: 371166
* Remove `bugreport` commandJonas Devlieghere2019-09-051-1/+1
| | | | | | | | | | | | The bugreport command exists to create domain-specific bug reports. Currently it has one implementation for filing bugs on the unwinder. As far as we can tell, it has never been of use. Although not exactly the same as the reproducers, it's a bit confusing to have two parallel command trees for (kind of) the same thing. Differential revision: https://reviews.llvm.org/D65469 llvm-svn: 371132
* [lldb][NFC] Add dimensions to pexpect tests failing on sanitizer botRaphael Isemann2019-09-052-2/+2
| | | | | | | | | | I'm still unable to reproduce this locally, so let's see if this is enough to make the bots happy. The missing dimension parameter seems to be the biggest difference between these tests and TestIOHandlerCompletion.py which runs just fine on the same bot, so that's the motivation for trying this out. llvm-svn: 371077
* [lldb][NFC] Stabilize gui/basic test by waiting on promptRaphael Isemann2019-09-051-0/+1
| | | | | | We should wait on the GUI to exit before tearing down the test. llvm-svn: 371028
* [dotest] Remove top-level MakefilePavel Labath2019-09-051-32/+0
| | | | | | | | This appears to be a really ancient way of running the test suite. It is also completely disfunctional now, and probably has been for a long time. llvm-svn: 371020
* [dotest] Centralize initialization commands even morePavel Labath2019-09-054-28/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: In r367234 we introduced a central place to hold the set up commands for the various ways we have of launching lldb. However, a number of commands still remained outside of that. This patch moves the remaining set up commands into this function, which allows us to remove manual clang module path setting code in TestBatchMode. One unfortunate victim of this approach is TestSTTYBeforeAndAfter which, due to how it launches lldb (pexpect->expect->lldb), fails get the quoting right. It would be possible to fix the quoting there, it would be a bit icky, and none of the commands in this list are really relevant for what this test is doing, so I just remove the commands outright. Reviewers: JDevlieghere, jankratochvil Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D67173 llvm-svn: 371019
* [dotest] Delete trivial inline test makefilesPavel Labath2019-09-0530-77/+0
| | | | | | inline tests are able to generate these automatically llvm-svn: 371015
* [test] Escape path to match the literal stringJonas Devlieghere2019-09-041-1/+1
| | | | | | This test was failing when you had things like `+` in your build path. llvm-svn: 370983
* Revert "[test] Address TestConcurrentMany*.py flakiness on macOS"Jonas Devlieghere2019-09-041-9/+16
| | | | | | | This reverts my change to pseudo_barrier.h which isn't necessary anymore after Fred's fix to debugserver and caused TestThreadStepOut to fail. llvm-svn: 370963
* [Python] Implement __next__ for value_iterJonas Devlieghere2019-09-041-0/+7
| | | | | | | | | Python 3 iteration calls the next() method instead of next() and value_iter only implemented the Python 2 version. Differential revision: https://reviews.llvm.org/D67184 llvm-svn: 370954
* [Python] Implement truth testing for lldb.valueJonas Devlieghere2019-09-041-0/+4
| | | | | | | | | Python 3 calls __bool__() instead of __len__() and lldb.value only implemented the __len__ method. This adds the __bool__() implementation. Differential revision: https://reviews.llvm.org/D67183 llvm-svn: 370953
* Upstream macCatalyst support in debugserver and the macOS dynamic loaderAdrian Prantl2019-09-048-2/+78
| | | | | | | | | | | plugin. Unfortunately the test is currently XFAILed because of missing changes to the clang driver. Differential Revision: https://reviews.llvm.org/D67124 llvm-svn: 370931
* Workaround TestConcurrentMany* flakiness in a more pricipled wayFrederic Riss2019-09-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | The flakiness on our local machines seems to come for a race in the kernel between task_suspend and the creation of the Mach exceptions for the threads that hit breakpoints. The debugserver code is written with the assumption that the kernel will be able to provide us with all the exceptions for a given task once task_suspend returns. On machines with higher core counts, this seems not to be the case. The first batch of exceptions we get after task_suspend does not contain exceptions for all the threads that have hit a breakpoint, thus they get misreprorted in the first stop packet. Adding a 1ms timeout to the call that retrieves the batch of exceptions seems to workaround the issue reliably on our machines, and it shoulnd't impact standard debugging scenarios too much (a stop will incur an additional 1ms delay). We'll be talking to the kernel team to figure out the right contract for those APIs. This patch also reverts part of Jonas' previous workaround for the issue (r370785). llvm-svn: 370916
* [lldb] Limit the amount of zeroes we use for padding when printing small floatsRaphael Isemann2019-09-043-0/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We got a radar that printing small floats is not very user-friendly in LLDB as we print them with up to 100 leading zeroes before starting to use scientific notation. This patch changes this by already using scientific notation when we hit 6 padding zeroes by default and moves this value into a target setting so that users can just set this number back to 100 if they for some reason preferred the old behaviour. This new setting is influencing how we format data, so that's why we have to reset the data visualisation cache when it is changed. Note that we have always been using scientific notation for large numbers because it seems that the LLVM implementation doesn't support printing out the padding zeroes for them. I would have fixed that if it was trivial, but looking at the LLVM implementation for this it seems that this is not as trivial as it sounds. I would say we look into this if we ever get a bug report about someone wanting to have a large amount of trailing zeroes in their numbers instead of using scientific notation. Fixes rdar://39744137 Reviewers: #lldb, clayborg Reviewed By: clayborg Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67001 llvm-svn: 370880
* Port TestBatchMode to PExpectTest classPavel Labath2019-09-042-91/+56
| | | | | | | | | | | | | | | Summary: I'm doing this mainly for consistency, but there are also other cleanups that will be enabled by this (e.g., the automatic setting of clang-modules-cache-path setting). Reviewers: teemperor, JDevlieghere Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D67082 llvm-svn: 370858
* [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-04557-1581/+552
| | | | | | | | | | | | | | | | | | | | | | | 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-045-0/+5
| | | | llvm-svn: 370842
* [lldb] [test] Un-mark two commands/register tests XFAILMichal Gorny2019-09-041-2/+0
| | | | llvm-svn: 370840
* [lldb][NFC] Remove lldbcurses.pyRaphael Isemann2019-09-031-1306/+0
| | | | | | | | | | | | | | | | Summary: This doesn't seem to be used anymore (at least I can't find any reference to this in the LLDB repo and it doesn't seem to be a standalone script). Git says this was once some new curses mode for viewing test results. Reviewers: clayborg, JDevlieghere Reviewed By: JDevlieghere Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67064 llvm-svn: 370804
* [test] Addres TestConcurrentMany*.py flakiness on macOSJonas Devlieghere2019-09-031-16/+11
| | | | | | | | | | On "fast" macOS machines, the TestConcurrentMany*.py tests would fail randomly with different numbers of breakpoints, watchpoints, etc. This seems to be avoidable by giving the threads a little time to breath after the passing the synchronization barrier. This is far from a structural fix but it reduces the flakiness. llvm-svn: 370785
* [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] Disable added frame select and all log option test on windowsRaphael Isemann2019-09-032-0/+2
| | | | llvm-svn: 370776
* [lldb] Test 'frame select -r' and fix that INT32_MIN breaks the option parserRaphael Isemann2019-09-033-0/+56
| | | | llvm-svn: 370734
* [lldb][NFC] Test 'command delete'Raphael Isemann2019-09-031-0/+17
| | | | llvm-svn: 370733
* [lldb][NFC] Test that enabling all log options doesn't crash anythingRaphael Isemann2019-09-031-0/+11
| | | | llvm-svn: 370724
* [lldb][NFC] Remove unnecessary constructors from invalid-args testsRaphael Isemann2019-09-033-9/+0
| | | | llvm-svn: 370719
* [lldb][NFC] Simplify script_alias testRaphael Isemann2019-09-031-4/+1
| | | | llvm-svn: 370718
* [lldb][NFC] Also test unaliasing in nested_alias testRaphael Isemann2019-09-031-0/+9
| | | | llvm-svn: 370717
* [lldb] Test 'command' commands and fix the found crashesRaphael Isemann2019-09-031-0/+58
| | | | llvm-svn: 370712
* [lldb][NFC] Unify log files in commands/log/basicRaphael Isemann2019-09-031-9/+7
| | | | llvm-svn: 370706
* [lldb][NFC] Remove setup boilerplate from types/ testsRaphael Isemann2019-09-037-52/+1
| | | | | | This code doesn't seem to be necessary anymore. llvm-svn: 370702
* [dotest] Add @skipIfCursesSupportMissing and annotate the new gui testPavel Labath2019-09-023-8/+12
| | | | | | | | | | | | | | | Summary: The gui command requires curses support, which can be disabled at compile time. This patch adds the ability to detect this situation in the test suite and skip the test accordingly. Reviewers: teemperor, jankratochvil Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D67073 llvm-svn: 370658
* [lldb][NFC] Add test for invalid gui commandRaphael Isemann2019-09-021-0/+15
| | | | llvm-svn: 370647
* [lldb][NFC] Remove unused imports from TestIntegerTypesExpr.pyRaphael Isemann2019-09-021-7/+0
| | | | llvm-svn: 370645
* [lldb][NFC] Remove unused imports from TestIntegerTypes.pyRaphael Isemann2019-09-021-6/+0
| | | | llvm-svn: 370641
* [lldb][NFC] Add test for source infoRaphael Isemann2019-09-024-0/+26
| | | | llvm-svn: 370638
* [lldb] Add description to option completions.Raphael Isemann2019-09-021-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Right now our argument completions are rather cryptic for command options as they only list the letters: ``` (lldb) breakpoint set - Available completions: -G -C -c -d -i -o -q -t -x [...] ``` With the new completion API we can easily extend this with the flag description so that it looks like this now: ``` (lldb) breakpoint set - Available completions: -G -- The breakpoint will auto-continue after running its commands. -C -- A command to run when the breakpoint is hit, can be provided more than once, the commands will get run in order left to right. -c -- The breakpoint stops only if this condition expression evaluates to true. -d -- Disable the breakpoint. -i -- Set the number of times this breakpoint is skipped before stopping. -o -- The breakpoint is deleted the first time it stop causes a stop. -q -- The breakpoint stops only for threads in the queue whose name is given by this argument. -t -- The breakpoint stops only for the thread whose TID matches this argument. -x -- The breakpoint stops only for the thread whose index matches this argument. ``` The same happens with --long-options now. Reviewers: #lldb, labath Reviewed By: labath Subscribers: labath, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67063 llvm-svn: 370628
* [lldb][NFC] Add basic test for GUI commandRaphael Isemann2019-09-023-0/+65
| | | | | | | | | | | | | | | | | | | | Summary: This adds a basic test for the GUI command. Just tests that it starts up, that we can quit the gui and help window, and that the basic UI elements are rendered. Mostly testing the waters how testing this command will do on the bots or if that will cause some serious issues when we do fancy ncurses stuff. Reviewers: labath, clayborg Reviewed By: labath Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67018 llvm-svn: 370625
* [lldb][NFC] Remove unnecessary lldb_enable_attach in TestMultilineCompletionRaphael Isemann2019-09-021-1/+0
| | | | | | We don't actually need to call this for this test. llvm-svn: 370623
* [lldb] Test and fix invalid log command invocationsRaphael Isemann2019-09-011-0/+25
| | | | llvm-svn: 370619
* [lldb][NFC] Add test for invalid expression command argsRaphael Isemann2019-09-011-0/+48
| | | | llvm-svn: 370618
* [lldb][NFC] Fix failing tests on macOS after restructuring test folderRaphael Isemann2019-09-0127-28/+28
| | | | llvm-svn: 370616
* [lldb][NFC] Fix failing tests after restructuring test folderRaphael Isemann2019-09-0186-89/+89
| | | | | | | | Just adjusts all the relative paths in the Makefiles (and the breakpoint test which seems to rely on the name of its folder). llvm-svn: 370611
OpenPOWER on IntegriCloud