summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add libc++ data formatters for std::optional.Adrian Prantl2018-08-153-0/+124
| | | | | | | | | | Patch by Shafik Yaghmour! This reapplies an earlier version after addressing some post-commit feedback. Differential Revision: https://reviews.llvm.org/D49271 llvm-svn: 339828
* Update TestTargetXMLArch.py test for llvm triple change with unspecifiedJason Molenda2018-08-131-1/+1
| | | | | | components in r339294. llvm-svn: 339615
* [tests, libstdcxx] Add missing test category on the ↵Stella Stamenova2018-08-101-0/+1
| | | | | | | | TestDataFormatterStdUniquePtr tests Each test needs to be marked with the add_test_categories decorator individually. llvm-svn: 339457
* If a function starts with line number 0, don't try to check if a breakpoint ↵Jim Ingham2018-08-072-1/+7
| | | | | | | | | | crossed function boundaries. clang doesn't use line number 0 (to mean artifically generated code) very often, but swift does it quite often. We were rejecting all by line breakpoints in functions that started at line 0. But that's a special marker so we can just not do this test in that case. llvm-svn: 339182
* Add support for ARM and ARM64 breakpad generated minidump files (version 2).Greg Clayton2018-08-064-0/+155
| | | | | | | | | | | | | | | | In this patch I add support for ARM and ARM64 break pad files. There are two flavors of ARM: Apple where FP is R7, and non Apple where FP is R11. Added minimal tests that load up ARM64 and the two flavors or ARM core files with a single thread and known register values in each register. Each register is checked for the exact value. This is a fixed version of: https://reviews.llvm.org/D49750 The changes from D49750 are: Don't init the m_arch in the Initialize call as a system info isn't required. This keeps the thread list, module list and other tests from failing Added -Wextended-offsetof to Xcode project so we catch use extended usages of offsetof before submission Fixed any extended offset of warnings Differential Revision: https://reviews.llvm.org/D50336 llvm-svn: 339032
* Revert "Add support for ARM and ARM64 breakpad generated minidump files"Pavel Labath2018-08-034-155/+0
| | | | | | | | This reverts commit r338734 (and subsequent fixups in r338772 and r338746), because it breaks some minidump unit tests and introduces a lot of compiler warnings. llvm-svn: 338828
* [lldbsuite, windows] Mark tests as XFAIL on Windows or skip themStella Stamenova2018-08-026-2/+22
| | | | | | | | | | | | | | Summary: 1) Several tests that are flakey on windows fail the run even if they are marked as expected to be flakey. This is because they fail frequently enough that even a retry won't help 2) Skip several tests on Windows that will occasionally hang rather than failing or exiting. This is causing the entire test suite to hang Reviewers: asmith, labath, zturner Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D50198 llvm-svn: 338769
* Add support for ARM and ARM64 breakpad generated minidump filesGreg Clayton2018-08-024-0/+155
| | | | | | | | In this patch I add support for ARM and ARM64 break pad files. There are two flavors of ARM: Apple where FP is R7, and non Apple where FP is R11. Added minimal tests that load up ARM64 and the two flavors or ARM core files with a single thread and known register values in each register. Each register is checked for the exact value. Differential Revision: https://reviews.llvm.org/D49750 llvm-svn: 338734
* Remove unnecessary target from TestCompletion patchRaphael Isemann2018-08-011-1/+0
| | | | | | | | | | As Jim pointed out, we don't need to manually create a target here because we already create a target implicitly in the very next line (which means we just created a target and don't use it). This patch just removes the line that creates the first unused target. llvm-svn: 338657
* Add the actually calculated completions to COMPLETION_MSGRaphael Isemann2018-07-271-2/+2
| | | | | | | | | | Summary: Otherwise this assertion message is not very useful to whoever is reading the log. Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49947 llvm-svn: 338179
* Add missing boundary checks to variable completion.Raphael Isemann2018-07-272-2/+49
| | | | | | | | | | Summary: Stopgap patch to at least stop all the crashes I get from this code. Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49949 llvm-svn: 338177
* Fix whitespace in the python test suite.Raphael Isemann2018-07-2730-95/+91
| | | | | | | | | | | | | Summary: The test suite has often unnecessary trailing whitespace, and sometimes unnecessary trailing lines or a missing final new line. This patch just strips trailing whitespace/lines and adds missing newlines at the end. Subscribers: ki.stfu, JDevlieghere, christof, lldb-commits Differential Revision: https://reviews.llvm.org/D49943 llvm-svn: 338171
* Revert "Recommit [DataFormatters] Add formatter for C++17 std::optional."Davide Italiano2018-07-273-93/+0
| | | | | | | This broke a linux bot which doesn't support -std=c++17. The solution is to add a decorator to skip these tests on machines with older compilers. llvm-svn: 338162
* Recommit [DataFormatters] Add formatter for C++17 std::optional.Davide Italiano2018-07-273-0/+93
| | | | | | | | | | This should have all the correct files now. <rdar://problem/41471112> Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D49271 llvm-svn: 338156
* Fix duplicate suggestions after an ambiguous commandRaphael Isemann2018-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: So far lldb is printing this when it finds an ambiguous command: ``` (lldb) g Ambiguous command 'g'. Possible matches: gdb-remote gui gdb-remote gui ``` The duplicates come from the fact that we call the same query twice with the same parameters and add it to the same list. This patch just removes the second query call to `GetCommandObject`. As `GetCommandObject` is const and the name parameter is also not modified, this shouldn't break anything else. I didn't merge the remaining if statement into the else as I think otherwise the `if obj==nullptr do X else Y` pattern in there becomes hard to recognize. Reviewers: davide Reviewed By: davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49866 llvm-svn: 338043
* Don't print two errors for unknown commands.Raphael Isemann2018-07-262-0/+40
| | | | | | | | | | | | | | | | | | | Summary: We always print two error messages when we hit an unknown command. As the function `CommandInterpreter::HandleCommand` that prints the second error message unconditionally called the `CommandInterpreter::ResolveCommandImpl` before (which prints the first error message), we can just remove that second error message. Fixes https://bugs.llvm.org/show_bug.cgi?id=38312 Reviewers: labath Reviewed By: labath Subscribers: labath, lldb-commits Differential Revision: https://reviews.llvm.org/D49831 llvm-svn: 338040
* Revert "[DataFormatters] Add formatter for C++17 std::optional."Davide Italiano2018-07-253-93/+0
| | | | | | | I forgot to git add some files. I'm going to recommit the correct version at once soon. llvm-svn: 337963
* [DataFormatters] Add formatter for C++17 std::optional.Davide Italiano2018-07-253-0/+93
| | | | | | | | | | <rdar://problem/41471112> Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D49271 llvm-svn: 337959
* Defend LoadImageUsingPaths against a path listJim Ingham2018-07-201-2/+19
| | | | | | with empty paths on it. llvm-svn: 337515
* Fix TestDataFormatterUnordered for older libc++ versionsPavel Labath2018-07-161-0/+5
| | | | | | | | | | | | | | clang recently started diagnosing "exception specification in declaration does not match previous declaration" errors. Unfortunately old libc++ versions had a bug, where they violated this rule, which means that tests using this library version now fail due to build errors. Since it was easy to work around the bug by compiling this test with -fno-exceptions, I do that here. If supporting old libc++ versions becomes a burden, we'll have to revisit this. llvm-svn: 337173
* Make these tests c++ tests so they can be skipped on systems that don't ↵Jim Ingham2018-07-132-4/+7
| | | | | | support those tests. llvm-svn: 337058
* Fix the libcxx set, multiset, vector and bitset formatters to work on ↵Jim Ingham2018-07-138-120/+202
| | | | | | | | | | | | | | | | references. The synthetic child providers for these classes had a type expression that matched pointers & references to the type, but the Front End only worked on the actual object. I fixed this by adding a way for the Synthetic Child FrontEnd provider to request dereference, and then had these formatters use that mode. <rdar://problem/40849836> Differential Revision: https://reviews.llvm.org/D49279 llvm-svn: 337035
* Fix TestAttachDenied on macOS MojaveFrederic Riss2018-07-132-0/+15
| | | | | | | | | TestAttachDenied tries to attach to a process that is ptracing itself and verifies that we error out. Starting with macOS Mojave, processes need an entitlement to be able to ptrace. This commit adds the entitlement for the test binary when building on Darwin. llvm-svn: 337029
* [testsuite] Implement a category to skip libstdcxx testsDavide Italiano2018-07-109-30/+9
| | | | | | | | | | | | | | | | On systems where it's not supported. As far as I understand Linux is the only systems which now ships with libstdcxx (maybe NetBSD?, but I'm not entirely sure of the state of lldb on the platform). We could make this more fine grained looking for the header as we do for libcxx. This is a little tricky as there's no such thing as /usr/include/c++/v1, but libstdcxx encodes the version number in the path (i.e. /usr/include/c++/5.4). I guess we might match a regex, but it seems fragile to me. Differential Revision: https://reviews.llvm.org/D49110 llvm-svn: 336724
* Rollback [test-suite] Add a decorator for the lack of libstdcxx on the system.Davide Italiano2018-07-099-9/+26
| | | | | | Pavel suggested an alternative approach that I'll try to implement. llvm-svn: 336608
* [test-suite] Add a decorator for the lack of libstdcxx on the system.Davide Italiano2018-07-069-26/+9
| | | | | | | | | This generalizes a bunch of target-specific tests. MacOS has no libstdcxx anymore, and neither does FreeBSD (or Windows). <rdar://problem/41896105> llvm-svn: 336463
* Remove a bunch more references to _LIBCPP_INLINE_VISIBILITYJim Ingham2018-07-068-40/+18
| | | | | | | | and adjust the tests that needed it to set their breakpoints more robustly. <rdar://problem/41867390> llvm-svn: 336403
OpenPOWER on IntegriCloud