summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
Commit message (Collapse)AuthorAgeFilesLines
* [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
* [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
* 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
* 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
* Changing test names in TestDataFormatterLibcxxVariant.py and ↵Shafik Yaghmour2018-10-121-1/+1
| | | | | | TestStdFunctionStepIntoCallable.py to be unique, NFC llvm-svn: 344407
* Add support for artificial tail call framesVedant Kumar2018-10-0530-0/+567
| | | | | | | | | | | | | | | | 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
* 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-011-4/+0
| | | | | | | | This addresses PR36048 (http://llvm.org/bugs/show_bug.cgi?id=36048) rdar://problem/36776281 llvm-svn: 343545
* [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
* XFAIL some tests in TestTargetCreateDeps on linuxPavel Labath2018-09-251-0/+4
| | | | | | | | On linux, we do not support automatic loading of dependent modules, so the module list will always contain just one module (until the target is launched). llvm-svn: 343016
* Skip test if gcc version is less than 7.1 since it doesn't support ↵Tatyana Krasnukha2018-09-211-0/+4
| | | | | | -gcolumn-info option llvm-svn: 342732
* [target] Change target create's behavior wrt loading dependent files.Jonas Devlieghere2018-09-205-0/+151
| | | | | | | | | | | | | | | | | | | | When creating a target, lldb loads all dependent files (i.e. libs in LC_LOAD_DYLIB for Mach-O). This can be confusing, especially when two versions of the same library end up in the shared cache. It's possible to change this behavior, by specifying target create -d <target> these dependents are not loaded. This patch changes the default behavior to only load dependent files only when the target is an executable. When creating a target for a library, it is now no longer necessary to pass -d. The user can still override this behavior by specifying the -d option to change this behavior. rdar://problem/43721382 Differential revision: https://reviews.llvm.org/D51934 llvm-svn: 342634
* [DataFormatters] Add formatter for C++17 std::variantShafik Yaghmour2018-09-193-0/+148
| | | | | | | | | | rdar://problem/43691454 Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D51520 llvm-svn: 342563
* Allow use of self.filecheck in LLDB tests (c.f self.expect)Vedant Kumar2018-09-181-1/+6
| | | | | | | | | | | | | Add a "filecheck" method to the LLDB test base. This allows test authors to pattern match command output using FileCheck, making it possible to write stricter tests than what `self.expect` allows. For context (motivation, examples of stricter checking, etc), see the lldb-dev thread: "Using FileCheck in lldb inline tests". Differential Revision: https://reviews.llvm.org/D50751 llvm-svn: 342508
* Revert "[DataFormatters] Add formatter for C++17 std::variant"Shafik Yaghmour2018-09-173-148/+0
| | | | | | | | This reverts commit r342421. Because it breaks build bot http://green.lab.llvm.org/green/job/lldb-cmake-clang-5.0.2//418/console llvm-svn: 342424
* [DataFormatters] Add formatter for C++17 std::variantShafik Yaghmour2018-09-173-0/+148
| | | | | | | | | | rdar://problem/43691454 Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D51520 llvm-svn: 342421
* Make the eSearchDepthFunction searches work, add tests Jim Ingham2018-09-142-8/+31
| | | | | | | | using the scripted breakpoint resolver. Differential Revision: https://reviews.llvm.org/D52111 llvm-svn: 342259
* svn add the new files...Jim Ingham2018-09-134-0/+253
| | | | | | | | | I started from a clean slate to do the checkin, but forgot to svn add the new files. Do that now. Also add the one new source file to CMakeLists.txt llvm-svn: 342190
* Add support for descriptions with command completions.Raphael Isemann2018-09-131-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds a framework for adding descriptions to the command completions we provide. It also adds descriptions for completed top-level commands so that we can test this code. Completions are in general supposed to be displayed alongside the completion itself. The descriptions can be used to provide additional information about the completion to the user. Examples for descriptions are function signatures when completing function calls in the expression command or the binary name when providing completion for a symbol. There is still some boilerplate code from the old completion API left in LLDB (mostly because the respective APIs are reused for non-completion related purposes, so the CompletionRequest doesn't make sense to be used), so that's why I still had to change some function signatures. Also, as the old API only passes around a list of matches, and the descriptions are for these functions just another list, I had to add some code that essentially just ensures that both lists are always the same side (e.g. all the manual calls to `descriptions->AddString(X)` below a `matches->AddString(Y)` call). The initial command descriptions that come with this patch are just reusing the existing short help that is already added in LLDB. An example completion with descriptions looks like this: ``` (lldb) pl Available completions: platform -- Commands to manage and create platforms. plugin -- Commands for managing LLDB plugins. ``` Reviewers: #lldb, jingham Reviewed By: #lldb, jingham Subscribers: jingham, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D51175 llvm-svn: 342181
* [LLDB] - Improved DWARF5 support.George Rimar2018-09-132-0/+92
| | | | | | | | | This patch improves the support of DWARF5. Particularly the reporting of source code locations. Differential revision: https://reviews.llvm.org/D51935 llvm-svn: 342153
* Commit my attempt to test the change to ProcessGDBRemoteJason Molenda2018-09-122-0/+52
| | | | | | | | in r336956. This test doesn't actually test the change that was submitted by Venkata, but it's a good one to add. llvm-svn: 342085
* Add a basic test for 'memory region'Raphael Isemann2018-09-123-0/+73
| | | | | | | | | | | | | | | | Summary: The 'memory region' command is at the moment not tested at all by our test suite. This patch just adds a basic test that at least provides some basic testing. Reviewers: #lldb, davide Reviewed By: #lldb, davide Subscribers: vsk, davide, lldb-commits Differential Revision: https://reviews.llvm.org/D51930 llvm-svn: 342042
* Rollback "Fix raw address breakpoints not resolving".Davide Italiano2018-09-101-37/+0
| | | | | | | It broke a bunch of bots. Ted confirmed, but can't revert for now so I'm reverting on his behalf. llvm-svn: 341878
* Fix raw address breakpoints not resolvingTed Woodward2018-09-101-0/+37
| | | | | | | | | | | | | | Summary: An address breakpoint of the form "b 0x1000" won't resolve if it's created while the process isn't running. This patch deletes Address::SectionWasDeleted, renames Address::SectionWasDeletedPrivate to SectionWasDeleted (and makes it public), and changes the section check in Breakpoint::ModulesChanged back to its original form Reviewers: jingham, #lldb Reviewed By: jingham Subscribers: davide, lldb-commits Differential Revision: https://reviews.llvm.org/D51816 llvm-svn: 341849
* Print column info in backtraces et al. if availableAdrian Prantl2018-09-052-2/+3
| | | | | | | | | | | | This patch allows LLDB to print column info in backtraces et al. if available, which is useful when the backtrace contains a frame like the following: f(can_crash(0), can_crash(1)); Differential Revision: https://reviews.llvm.org/D51661 llvm-svn: 341506
* Avoid using short identifiers in some testsPavel Labath2018-08-311-1/+1
| | | | | | | | | This applies the same workaround as r321271 to other tests. The root problem is that lldb finds an internal symbol with the same name in the debug info of system libraries, and then fails to disambiguate between the two. llvm-svn: 341235
* Fix deadlock in gdb-client testsPavel Labath2018-08-301-1/+1
| | | | | | | | | | | | Using a listen queue of length 0 caused a deadlock on my machine in the gdb-client tests while attempting to establish the loopback socket connection. I am not sure if this is down to a different python or kernel version, but in either case, having queue of length zero sounds like a bad idea, so I'm bumping that to one (which also fixes the deadlock). llvm-svn: 341096
* Added initial code completion support for the `expr` commandRaphael Isemann2018-08-301-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds initial code completion support for the `expr` command. We now have a completion handler in the expression CommandObject that essentially just attempts to parse the given user expression with Clang with an attached code completion consumer. We filter and prepare the code completions provided by Clang and send them back to the completion API. The current completion is limited to variables that are in the current scope. This includes local variables and all types used by local variables. We however don't do any completion of symbols that are not used in the local scope (or in some other way already in the ASTContext). This is partly because there is not yet any code that manually searches for additiona information in the debug information. Another cause is that for some reason the existing code for loading these additional symbols when requested by Clang doesn't seem to work. This will be fixed in a future patch. Reviewers: jingham, teemperor Reviewed By: teemperor Subscribers: labath, aprantl, JDevlieghere, friss, lldb-commits Differential Revision: https://reviews.llvm.org/D48465 llvm-svn: 341086
* Support setting a breakpoint by FileSpec+Line+Column in the SBAPI.Adrian Prantl2018-08-305-5/+81
| | | | | | | | | | | | This patch extends the SBAPI to allow for setting a breakpoint not only at a specific line, but also at a specific (minimum) column. When a column is specified, it will try to find an exact match or the closest match on the same line that comes after the specified location. Differential Revision: https://reviews.llvm.org/D51461 llvm-svn: 341078
* Respect platform sysroot when loading core filesPavel Labath2018-08-281-9/+41
| | | | | | | Patch by Eugene Birukov <eugenebi@microsoft.com> Differential Revision: https://reviews.llvm.org/D49685 llvm-svn: 340841
* Disable exceptions for TestDataFormatterLibcxxOptional.pyFrederic Riss2018-08-251-1/+1
| | | | | | | | | | On macOS, some of the <optional> APIs used by the test are available only starting on macOS 10.14 when using exceptions. Build the test with -fno-exceptions so that the test builds on older systems too. rdar://problem/43700544 llvm-svn: 340676
* Add libc++ data formatter for std::functionAdrian Prantl2018-08-232-11/+30
| | | | | | | | | | | | - Added LibcxxFunctionSummaryProvider - Removed LibcxxFunctionFrontEnd - Modified data formatter tests to test new summary functionality Patch by Shafik Yaghmour! Differential Revision: https://reviews.llvm.org/D50864 llvm-svn: 340543
* Disable two flaky pexpect-backed tests on DarwinVedant Kumar2018-08-161-0/+2
| | | | | | | | These tests are sporadically timing out on our bots, e.g here: https://ci.swift.org/job/swift-PR-Linux/6841 llvm-svn: 339914
OpenPOWER on IntegriCloud