summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
* Refactor ClangASTContext::AddEnumerationValueToEnumerationType() to remove ↵Shafik Yaghmour2018-11-083-0/+66
| | | | | | | | | | redundant parameter which can be calculated from other parameter. rdar://problem/43822994 Differential Revision: https://reviews.llvm.org/D54003 llvm-svn: 346428
* [TestVLA] Fix a python decorator.Davide Italiano2018-11-061-1/+2
| | | | llvm-svn: 346186
* Skip this test on older versions of clang.Adrian Prantl2018-11-051-0/+1
| | | | llvm-svn: 346172
* Fix (and improve) the support for C99 variable length array typesAdrian Prantl2018-11-053-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang recently improved its DWARF support for C VLA types. The DWARF now looks like this: 0x00000051: DW_TAG_variable [4] DW_AT_location( fbreg -32 ) DW_AT_name( "__vla_expr" ) DW_AT_type( {0x000000d3} ( long unsigned int ) ) DW_AT_artificial( true ) ... 0x000000da: DW_TAG_array_type [10] * DW_AT_type( {0x000000cc} ( int ) ) 0x000000df: DW_TAG_subrange_type [11] DW_AT_type( {0x000000e9} ( __ARRAY_SIZE_TYPE__ ) ) DW_AT_count( {0x00000051} ) Without this patch LLDB will naively interpret the DIE offset 0x51 as the static size of the array, which is clearly wrong. This patch extends ValueObject::GetNumChildren to query the dynamic properties of incomplete array types. See the testcase for an example: 4 int foo(int a) { 5 int vla[a]; 6 for (int i = 0; i < a; ++i) 7 vla[i] = i; 8 -> 9 pause(); // break here 10 return vla[a-1]; 11 } (lldb) fr v vla (int []) vla = ([0] = 0, [1] = 1, [2] = 2, [3] = 3) (lldb) quit rdar://problem/21814005 Differential Revision: https://reviews.llvm.org/D53530 llvm-svn: 346165
* Remove Go debugger pluginJonas Devlieghere2018-11-0513-774/+2
| | | | | | | | | | | | | | | | | | | In January Davide sent an e-mail to the mailing list to suggest removing unmaintained language plugins such as Go and Java. The plan was to have some cool down period to allow users to speak up, however after that the plugins were never actually removed. This patch removes the Go debugger plugin. The plugin can be added again in the future if it is mature enough both in terms of testing and maintenance commitment. Discussion on the mailing list: http://lists.llvm.org/pipermail/lldb-dev/2018-January/013171.html Differential revision: https://reviews.llvm.org/D54057 llvm-svn: 346157
* Fix duplicate testcase filenameJan Kratochvil2018-11-041-0/+0
| | | | | | | | | dotest.py started reporting: Exception: Found multiple tests with the name TestSampleTest.py After the commit of: https://reviews.llvm.org/D54056 llvm-svn: 346089
* Add an SBExpressionOptions setting mirroring the "exec" command's --allow-jit.Jim Ingham2018-11-023-0/+115
| | | | | | | | <rdar://problem/44809176> Differential Revision: https://reviews.llvm.org/D54056 llvm-svn: 346053
* When no FileCheck binary is specified, look in the llvm/clang binJason Molenda2018-11-011-0/+32
| | | | | | | dirs relative to the source directory (Xcode build style) to find one, use it if found. llvm-svn: 345912
* Makefile.rules: Don't use code signing on macOS; it isn't necessary.Adrian Prantl2018-10-311-2/+3
| | | | llvm-svn: 345768
* [lldb] Introduce StackFrameRecognizer [take 3]Kuba Mracek2018-10-314-0/+161
| | | | | | | | This patch introduces a concept of "frame recognizer" and "recognized frame". This should be an extensible mechanism that retrieves information about special frames based on ABI, arguments or other special properties of that frame, even without source code. A few examples where that could be useful could be 1) objc_exception_throw, where we'd like to get the current exception, 2) terminate_with_reason and extracting the current terminate string, 3) recognizing Objective-C frames and automatically extracting the receiver+selector, or perhaps all arguments (based on selector). Differential Revision: https://reviews.llvm.org/D44603 llvm-svn: 345693
* Revert r345686 due to build failuresKuba Mracek2018-10-314-161/+0
| | | | llvm-svn: 345688
* [lldb] Introduce StackFrameRecognizer [take 2]Kuba Mracek2018-10-314-0/+161
| | | | | | | | This patch introduces a concept of "frame recognizer" and "recognized frame". This should be an extensible mechanism that retrieves information about special frames based on ABI, arguments or other special properties of that frame, even without source code. A few examples where that could be useful could be 1) objc_exception_throw, where we'd like to get the current exception, 2) terminate_with_reason and extracting the current terminate string, 3) recognizing Objective-C frames and automatically extracting the receiver+selector, or perhaps all arguments (based on selector). Differential Revision: https://reviews.llvm.org/D44603 llvm-svn: 345686
* Revert r345678 (build failure on Linux machines).Kuba Mracek2018-10-314-161/+0
| | | | llvm-svn: 345680
* [lldb] Introduce StackFrameRecognizerKuba Mracek2018-10-314-0/+161
| | | | | | | | This patch introduces a concept of "frame recognizer" and "recognized frame". This should be an extensible mechanism that retrieves information about special frames based on ABI, arguments or other special properties of that frame, even without source code. A few examples where that could be useful could be 1) objc_exception_throw, where we'd like to get the current exception, 2) terminate_with_reason and extracting the current terminate string, 3) recognizing Objective-C frames and automatically extracting the receiver+selector, or perhaps all arguments (based on selector). Differential Revision: https://reviews.llvm.org/D44603 llvm-svn: 345678
* [testsuite] Skip an already failing test on MacOS.Davide Italiano2018-10-301-0/+1
| | | | | | | | Due to some libcxx changes to inlining, this now also crashes, so it gets reported as "failure" by the bot. This commit doesn't really change the status quo, just placates the bots. llvm-svn: 345668
* [DataFormatters] Adding formatters for libc++ std::u16string and std::u32stringShafik Yaghmour2018-10-263-3/+9
| | | | | | | | rdar://problem/41302849 Differential Revision: https://reviews.llvm.org/D53656 llvm-svn: 345402
* Update test that checks auto-completion for settings set.Jonas Devlieghere2018-10-261-0/+5
| | | | | | | This reverts r345350 and updates the test rather than removing it. Now we check that `--g` auto-completes to `--global`. llvm-svn: 345351
* Remove test that checks auto-completion for settings set.Jonas Devlieghere2018-10-261-5/+0
| | | | | | | With the new `-f` option for `settings set`, `-` (dash) no longer auto-complete to `-g`. llvm-svn: 345350
* [API] Extend the `SBThreadPlan` interfaceAleksandr Urakov2018-10-254-0/+93
| | | | | | | | | | | | | | | | | | Summary: This patch extends the `SBThreadPlan` to allow retrieving of thread plans for scripted steps. Reviewers: labath, zturner, jingham Reviewed By: jingham Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D53361 llvm-svn: 345247
* Support nwere versions of the Segger J-Link jtag board software.Jason Molenda2018-10-232-2/+154
| | | | | | | | | | | | | | | | | | | | | | Add support in ProcessGDBRemote::GetGDBServerRegisterInfo for recognizing a generic "arm" architecture that will be used if nothing better is available so that we don't ignore the register definitions if we didn't already have an architecture set. Also in ProcessGDBRemote::DoConnectRemote don't set the target arch unless we have a valid architecture to set it to. Platform::ConnectProcess will try to get the current target's architecture, or the default architecture, when creating the target for the connection to be attempted. If lldb was started with a target binary, we want to create this target with that architecture in case the remote gdb stub doesn't supply a qHostInfo arch. Add logging to Target::MergeArchitecture. <rdar://problem/34916465> llvm-svn: 345106
* Skip test with older versions of clangJonas Devlieghere2018-10-231-0/+1
| | | | | | | | | This was failing for the bots that build with older clangs: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-clang-5.0.2/ http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-clang-6.0.1/ llvm-svn: 345061
* [lldbsuite, windows] Disable two tail call frames tests that fail on WindowsStella Stamenova2018-10-192-0/+5
| | | | | | | | | | | | | | Summary: These tests fail on Windows because of known limitations (a.k.a. bugs) with the current implementation of GetFrameAtIndex Reviewers: asmith, vsk Reviewed By: vsk Subscribers: abidh, lldb-commits Differential Revision: https://reviews.llvm.org/D53415 llvm-svn: 344788
* [lldbsuite] Mark the TestScriptedResolver tests as XFAIL on WindowsStella Stamenova2018-10-181-0/+4
| | | | | | | | | | | | Summary: They fail similarly to some of the other breakpoint tests on Windows, so I suspect the cause is the same. I've linked to the same bug. Reviewers: asmith, zturner, jingham Subscribers: abidh, lldb-commits Differential Revision: https://reviews.llvm.org/D53331 llvm-svn: 344744
* Revert "Return a named error in the result object of an expression with no ↵Krasimir Georgiev2018-10-183-60/+0
| | | | | | | | | | | | | | | | | result" This reverts commit r344647. This causes build failures with [-Werror, -Wswitch]. Some cases where the newly introduced enum value is not handled in particular are in: lldb/source/Expression/REPL.cpp:350 lldb/source/Interpreter/CommandInterpreter.cpp:1529 (maybe there could be more) As I don't understand lldb to make sure the likely trivial fixes are correct and also as they might need additional tests, leaving to the author to resolve. llvm-svn: 344722
* Return a named error in the result object of an expression with no resultJim Ingham2018-10-163-0/+60
| | | | | | | | | | | | Before we returned an error that was not exposed in the SB API and no useful error message. This change returns eExpressionProducedNoResult and an appropriate error string. <rdar://problem/44539514> Differential Revision: https://reviews.llvm.org/D53309 llvm-svn: 344647
* Tiny testsuite tweaks. Don't run the apple simulatorJason Molenda2018-10-163-0/+11
| | | | | | | | | | tests when targetting a device. Add an include to safe-to-call-func to work around a modules issue with a certain combination of header files. Add rules for Darwin systems to ad-hoc codesign binaries that the testsuite builds. llvm-svn: 344635
* Use a relaxed substring check for function names in a testVedant Kumar2018-10-161-2/+7
| | | | | | | | | | | The TestTailCallFrameSBAPI.py test checks that function names in a backtrace are equal to an expected value. Use a relaxed substring check because function dislpay names are platform-dependent. E.g we see "void sink(void)" on Windows, but "sink()" on Darwin. This seems like a bug -- just work around it for now. llvm-svn: 344634
* Don't run TestBreakpointIt.py on arm64 devices;Jason Molenda2018-10-161-0/+2
| | | | | | it is armv7 specific. llvm-svn: 344633
* [lldbsuite] Fix the mac version decorator to work on non-mac platformsStella Stamenova2018-10-161-2/+2
| | | | | | | | | | | | | | Summary: On non-mac platforms, mac_ver returns an empty string which when converted to LooseVersion has no "version" property. This causes a failure when the decorator executes. Instead, check whether the value returned from mac_ver is an empty string and avoid the LooseVersion comparison. Reviewers: labath, davide, asmith, shafik, jingham Reviewed By: jingham Subscribers: jingham, lldb-commits Differential Revision: https://reviews.llvm.org/D53208 llvm-svn: 344623
* Use assertEqual to improve test failure loggingVedant Kumar2018-10-162-12/+12
| | | | | | | Some tests in test/functionalities/tail_call_frames are failing on non-Darwin platforms. Use assertEqual to improve logging on failure. llvm-svn: 344581
* [lldbsuite] Make the names of test classes uniqueStella Stamenova2018-10-151-1/+1
| | | | | | | | | | | | | | | Summary: If the names are not unique, the tests overwrite each other's results and logs. This also causes failures on platforms where the files are locked for writing. The names of the class/test pairs *have to* always be unique. The easiest way to achieve that is to name each class differently (usually the same as the file name). Reviewers: jasonmolenda, asmith Subscribers: clayborg, nemanjai, kbarton, lldb-commits Differential Revision: https://reviews.llvm.org/D53297 llvm-svn: 344547
* [lldbsuite] Disable Test128BitsInteger on WindowsStella Stamenova2018-10-151-1/+4
| | | | | | | | | | | | | | Summary: This test is failing on Windows because lldb does not support JIT on Windows. Reviewers: davide, asmith Reviewed By: davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D53226 llvm-svn: 344543
* Fix failure in get_filecheck_path when filecheck is NoneStella Stamenova2018-10-121-1/+1
| | | | | | If the path was not specified (and it's None), lexists throws an exception rather than returning False. get_filecheck_path now checks whether filecheck is set before calling lexists llvm-svn: 344410
* Changing test names in TestDataFormatterLibcxxVariant.py and ↵Shafik Yaghmour2018-10-122-2/+2
| | | | | | TestStdFunctionStepIntoCallable.py to be unique, NFC llvm-svn: 344407
* [dotest] Make a missing FileCheck binary a warning, not an errorVedant Kumar2018-10-123-6/+12
| | | | | | | | | | This allows bots which haven't updated to pass in --filecheck to dotest.py to run more tests. FileCheck-dependent tests will continue to fail. Differential Revision: https://reviews.llvm.org/D53175 llvm-svn: 344401
* [lldbsuite] Fix the filecheck functionality to work with Python 3Stella Stamenova2018-10-121-1/+1
| | | | | | | | | | | | | | Summary: This is another string/byte conversion issue between Python 2 and 3. In Python 2, the subprocess communication expects a byte string, but in Python 3, it expects bytes. Since both versions are capable of using strings when universal_newlines is set to True AND filecheck operates on strings, force the use of strings. Reviewers: zturner, asmith, vsk Reviewed By: zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D53166 llvm-svn: 344386
* Adding support to step into the callable wrapped by libc++ std::functionShafik Yaghmour2018-10-123-0/+116
| | | | | | | | rdar://problem/14365983 Differential Revision: https://reviews.llvm.org/D52851 llvm-svn: 344371
* Add support for artificial tail call framesVedant Kumar2018-10-0531-0/+591
| | | | | | | | | | | | | | | | This patch teaches lldb to detect when there are missing frames in a backtrace due to a sequence of tail calls, and to fill in the backtrace with artificial tail call frames when this happens. This is only done when the execution history can be determined from the call graph and from the return PC addresses of calls on the stack. Ambiguous sequences of tail calls (e.g anything involving tail calls and recursion) are detected and ignored. Depends on D49887. Differential Revision: https://reviews.llvm.org/D50478 llvm-svn: 343900
* Relax a data formatter testVedant Kumar2018-10-051-0/+1
| | | | | | | Before inspecting the contents of a list, make sure that we've stepped past the push_back() that inserts the element we're interested in. llvm-svn: 343899
* TestMultilineExpr: validate evaluation for expressions that span multiple linesStefan Granitz2018-10-053-101/+0
| | | | | | | | | | | | | | Summary: When LLDB successfully parses a command (like "expression" in this case) and determines incomplete input, the user can continue typing on multiple lines (in this case "2+3"). This should provide the correct result. Note that LLDB reverts input from the additional lines, so they are not present in the output. Reviewers: vsk, davide, aprantl Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D52270 llvm-svn: 343860
* Fix typos.Bruce Mitchener2018-10-041-1/+1
| | | | | | | | | | Reviewers: lldb-commits Subscribers: srhines, ki.stfu Differential Revision: https://reviews.llvm.org/D52884 llvm-svn: 343825
* Fix buildbot regression by rL339929: NameError: global name 'test_directory' ↵Jan Kratochvil2018-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | is not defined With buildbot slave under test - I get after rL339929: http://lab.llvm.org:8014/builders/lldb-x86_64-fedora-28-cmake/builds/243/steps/test1/logs/stdio File "/home/buildbot/lldbroot/lldb-x86_64-fedora-28-cmake/scripts/../llvm/tools/lldb/test/dotest.py", line 7, in <module> lldbsuite.test.run_suite() File "/quad/home/buildbot/lldbroot/lldb-x86_64-fedora-28-cmake/llvm/tools/lldb/packages/Python/lldbsuite/test/dotest.py", line 1177, in run_suite configuration.results_formatter_object) File "/quad/home/buildbot/lldbroot/lldb-x86_64-fedora-28-cmake/llvm/tools/lldb/packages/Python/lldbsuite/test/dosep.py", line 1692, in main dst = core.replace(test_directory, "")[1:] NameError: global name 'test_directory' is not defined Patch by Vedant Kumar. Differential Revision: https://reviews.llvm.org/D51874 llvm-svn: 343726
* Adding skipIf to std::variant libc++ data-formatter test since get is not ↵Shafik Yaghmour2018-10-031-0/+2
| | | | | | | | available before macOS 10.14 Patch by Shafik Yaghmour llvm-svn: 343718
* Skip test with older versions of clangAdrian Prantl2018-10-031-0/+1
| | | | llvm-svn: 343695
* Remove unnecessary fieldAdrian Prantl2018-10-021-1/+1
| | | | llvm-svn: 343624
* DWARFExpression: Resolve file addresses in the linked moduleAdrian Prantl2018-10-024-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to https://reviews.llvm.org/D46362. When evaluating a complex expression in DWARFExpression::Evaluate, file addresses must be resolved to load addresses before we can perform operations such as DW_OP_deref on them. For this the address goes through three steps 1. Read the file address as stored in the DWARF 2. Link/relocate the file address (when reading from a .dSYM, this is a no-op) 3. Convert the file address to a load address. D46362 implemented step (3) by resolving the file address using the Module that the original DWARF came from. In the case of a dSYM that is correct, but when reading from .o files, we need to look up relocated/linked addresses, so the right place to look them up is the current frame's module. This patch fixes that by setting the expression's Module to point to the linked debugmap object. A word a bout the unorthodox testcase: The motivating testcase for this fix is in Swift, but I managed to hand-modify LLVM-IR for a trivial C program to exhibit the same problem, so we can fix this in llvm.org. rdar://problem/44689915 Differential Revision: https://reviews.llvm.org/D52678 llvm-svn: 343612
* Enable C++ tests to run in the -gmodules configuration on Darwin.Adrian Prantl2018-10-012-4/+4
| | | | | | | | This addresses PR36048 (http://llvm.org/bugs/show_bug.cgi?id=36048) rdar://problem/36776281 llvm-svn: 343545
* Fix tests affected by printing change.Jonas Devlieghere2018-10-012-2/+2
| | | | | | | I forgot to update some tests that were affected by the escaping of backticks in the format string, landed in r343471. llvm-svn: 343502
* [SBAPI/Target] Expose SetStatistics(bool enable)/GetStatistics().Davide Italiano2018-09-281-0/+9
| | | | | | <rdar://problem/44875808> llvm-svn: 343368
* Change the unwinder to not use a hard-coded limit on theJason Molenda2018-09-253-0/+50
| | | | | | | | | | max number of stack frames to backtrace, make it a setting, target.process.thread.max-backtrace-depth. Add a test case for the setting. <rdar://problem/28759559> llvm-svn: 343029
OpenPOWER on IntegriCloud