summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
Commit message (Collapse)AuthorAgeFilesLines
* Allow IRInterpreter to deal with non-power-of-2 sized types to support some ↵Frederic Riss2018-08-282-0/+47
| | | | | | | | | | | | | | | | | | | | bitfield accesses. Summary: For some bitfield patterns (like the one added by this commit), Clang will generate non-regular data types like i24 or i48. This patch follows a pretty naive approach of just bumping the type size to the next power of 2. DataExtractor know how to deal with weird sizes. The operations on Scalar do not know how to deal with those types though, so we have to legalize the size when creating a Scalar. Reviewers: jingham, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D51245 llvm-svn: 340880
* 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
* [vscode] Skip some of the vscode tests on Linux and fix oneStella Stamenova2018-08-243-0/+17
| | | | | | | | | | | | Summary: These are already skipped on Darwin because they cause build bot failures. Both on the build bots as well as in our testing we have seen a number of these tests fail and hang. This change skips the failing/hanging tests on Linux and also fixes one of the test - the test needs the thread library to build. Reviewers: asmith, clayborg, aprantl Subscribers: teemperor, lldb-commits Differential Revision: https://reviews.llvm.org/D51227 llvm-svn: 340658
* Change xfail to skipIf. The exact condition is really difficult to getAdrian Prantl2018-08-231-1/+1
| | | | | | right and doesn't add much signal. llvm-svn: 340574
* XFAIL test for older versions of clangAdrian Prantl2018-08-231-1/+1
| | | | llvm-svn: 340573
* Fix broken builtin functions in the expression commandRaphael Isemann2018-08-231-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Calling any non-libc builtin function in the expression command currently just causes Clang to state that the function is not known. The reason for this is that we actually never initialize the list of builtin functions in the Builtin::Context. This patch just calls the initializer for the builtins in the preprocessor. Also adds some tests for the new builtins. It also gets rid of the extra list of builtins in the ClangExpressionParser, as we can just reuse the existing list in the Preprocessor for the ASTContext. Having just one list of builtins around is also closer to the standard Clang behavior. Reviewers: #lldb, vsk Reviewed By: vsk Subscribers: sgraenitz, clayborg, vsk, lldb-commits Differential Revision: https://reviews.llvm.org/D50481 llvm-svn: 340571
* XFAIL test for older versions of dsymutilAdrian Prantl2018-08-231-0/+1
| | | | llvm-svn: 340550
* 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
* lldbtest.py: Unconditionally set the clang module cache path.Adrian Prantl2018-08-212-13/+11
| | | | | | This should fix the errors observable on the new lldb-cmake bot. llvm-svn: 340293
* Makefile.rules: Use an absolute path to the module cache directory.Adrian Prantl2018-08-211-1/+2
| | | | | | This change is NFC, but it makes it more obvious in log files what happened. llvm-svn: 340286
* Skip tests on Darwin for now. The build bots are not passing due to heavy ↵Greg Clayton2018-08-188-3/+24
| | | | | | load and poor machines. llvm-svn: 340112
* Skip the lldb-vscode attach with waitFor test for now, some build bots are ↵Greg Clayton2018-08-171-0/+1
| | | | | | having trouble. llvm-svn: 340077
* Change the attach test case to use self.assertEqual so we can get more info ↵Greg Clayton2018-08-171-2/+10
| | | | | | | | on what is going wrong on test bots. Also add a cleanup function to remove the copied binary. llvm-svn: 340050
* [dotest] Make --test-subdir work with --no-multiprocessVedant Kumar2018-08-163-18/+49
| | | | | | | | | | | | | | | | | | | The single-process test runner is invoked in a number of different scenarios, including when multiple test dirs are specified or (afaict) when lit is used to drive the test suite. Unfortunately the --test-subdir option did not work with the single process test runner, breaking an important use case (using lit to run swift-lldb Linux tests): Failure URL: https://ci.swift.org/job/swift-PR-Linux/6841 We won't be able to run lldb tests within swift PR testing without filtering down the set of tests. This change makes --test-subdir work with the single-process runner. llvm-svn: 339929
* Disable two flaky pexpect-backed tests on DarwinVedant Kumar2018-08-162-0/+10
| | | | | | | | 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 a new tool named "lldb-vscode" that implements the Visual Studio Code ↵Greg Clayton2018-08-1625-0/+2909
| | | | | | | | | | | | Debug Adaptor Protocol This patch adds a new lldb-vscode tool that speaks the Microsoft Visual Studio Code debug adaptor protocol. It has full unit tests that test all packets. This tool can be easily packaged up into a native extension and used with Visual Studio Code, and it can also be used by Nuclide Differential Revision: https://reviews.llvm.org/D50365 llvm-svn: 339911
* Fix a little thinko in generating ___lldb_unnamed_symbol symbols Jim Ingham2018-08-153-0/+112
| | | | | | | | | | | when we have only an in-memory copy of the binary. Also added a test for the generation of these symbols in the in-memory and regular cases. <rdar://problem/43160401> llvm-svn: 339833
* 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
* Added missing null checks to fix r339351Raphael Isemann2018-08-091-1/+5
| | | | llvm-svn: 339353
* Also display the output and error output of a failed commandRaphael Isemann2018-08-091-1/+6
| | | | | | | | | | | | | | | | | Summary: Instead of just printing the current "False is not True, ..." message when we fail to run a certain command, this patch also adds the actual command output or error output that we received to the assertion message. Reviewers: davide Reviewed By: davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D50492 llvm-svn: 339351
* 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-028-2/+24
| | | | | | | | | | | | | | 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
* [LLDB] Added syntax highlighting supportRaphael Isemann2018-08-021-3/+26
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds syntax highlighting support to LLDB. When enabled (and lldb is allowed to use colors), printed source code is annotated with the ANSI color escape sequences. So far we have only one highlighter which is based on Clang and is responsible for all languages that are supported by Clang. It essentially just runs the raw lexer over the input and then surrounds the specific tokens with the configured escape sequences. Reviewers: zturner, davide Reviewed By: davide Subscribers: labath, teemperor, llvm-commits, mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D49334 llvm-svn: 338662
* 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-272-4/+5
| | | | | | | | | | 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-2763-153/+149
| | | | | | | | | | | | | 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
* [lldb-mi] Re-implement data-info-line command.Alexander Polyakov2018-07-231-56/+0
| | | | | | | | | | | | | | Summary: Now data-info-line command uses SB API instead of HandleCommand. Reviewers: aprantl, clayborg, jingham Reviewed By: aprantl Subscribers: ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D49062 llvm-svn: 337689
* 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
* [lldbsuite] The test inside TestOverloadedFunctions.py has the wrong class nameStella Stamenova2018-07-121-1/+1
| | | | | | | | | | | | | | Summary: It looks like the test file was copied from TestCPPStaticMethods.py because they have the same name. This means that the two tests will try to write to the same output files and will either overwrite each other's output or occasionally cause failures because they can't both access the same file. Reviewers: asmith, zturner Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49261 llvm-svn: 336960
* [IRInterpreter] Fix misevaluation of interpretation expressions with `urem`.Davide Italiano2018-07-123-0/+26
| | | | | | | | | | | | | | | | Scalar::MakeUnsigned was implemented incorrectly so it didn't really change the sign of the type (leaving signed types signed). This showed up as a misevaluation when IR-interpreting urem but it's likely to arise in other contexts. This commit fixes the definition, and adds a test to make sure this won't regress in future (hopefully). Fixes rdar://problem/42038760 and LLVM PR38076 Differential Revision: https://reviews.llvm.org/D49155 llvm-svn: 336872
* Allow specifying an exit code for the 'quit' commandRaphael Isemann2018-07-111-0/+32
| | | | | | | | | | | | | | | | | | | Summary: This patch adds the possibility to specify an exit code when calling quit. We accept any int, even though it depends on the user what happens if the int is out of the range of what the operating system supports as exit codes. Fixes rdar://problem/38452312 Reviewers: davide, jingham, clayborg Reviewed By: jingham Subscribers: clayborg, jingham, lldb-commits Differential Revision: https://reviews.llvm.org/D48659 llvm-svn: 336824
* [testsuite] Implement a category to skip libstdcxx testsDavide Italiano2018-07-1011-30/+28
| | | | | | | | | | | | | | | | 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-0910-21/+26
| | | | | | Pavel suggested an alternative approach that I'll try to implement. llvm-svn: 336608
OpenPOWER on IntegriCloud