summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix vscode tests for python3Pavel Labath2019-02-191-2/+2
| | | | | | | | encode/decode the data before sending it over the socket. Since (AFAICT) the vscode protocol (unlike the gdb-remote one) is fully textual, using the utf8 codec here is appropriate. llvm-svn: 354308
* [lldbtest] Fix some code to be compatible between py2 and py3.Davide Italiano2019-02-181-18/+4
| | | | llvm-svn: 354297
* [Python3] Fix TestObjCMethods.py to work with py2 and 3.Davide Italiano2019-02-181-1/+1
| | | | llvm-svn: 354286
* Un-XFAIL TestLinuxCore for windowsPavel Labath2019-02-181-11/+0
| | | | | | | It turns out all that was needed to get this test passing was to fix the python3 incompatibility. llvm-svn: 354278
* Fix TestLinuxCore for python3Pavel Labath2019-02-181-4/+4
| | | | | | | - dictionaries don't have iteritems() - division returns floats llvm-svn: 354273
* [testsuite] Skip this test correctly also on macOS.Davide Italiano2019-02-161-3/+2
| | | | llvm-svn: 354204
* Fix TestDataFormatterLibcxxListLoop.py testRaphael Isemann2019-02-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The compilation of the TestDataFormatterLibcxxListLoop.py currently fails with this error: ``` functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/main.cpp:19:24: error: no member named '__value_' in 'std::__1::__list_node_base<int, void *>' assert(third_elem->__value_ == 3); ~~~~~~~~~~ ^ ``` It seems the internal structure of list has changed with the 3.8 release. This patch makes the test compile with the current libc++ and with the previous libc++. Reviewers: shafik, zturner, labath Reviewed By: labath Subscribers: christof, jdoerfert, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D58273 llvm-svn: 354202
* Temporarily disable test:Richard Smith2019-02-161-1/+4
| | | | | | | | | test/lang/cpp/class-template-parameter-pack/TestClassTemplateParameterPack.py It fails on Mac OS; apparently a VarDecl 'void *&C' is implicitly declared there, making the class template name C ambiguous. llvm-svn: 354185
* Fix the gdb-client test suite for python3Pavel Labath2019-02-151-12/+5
| | | | | | | | | | This applies the same fix that was done in r354106 to the lldb-server test: bitcasting the string to a bytes object before sending it over a socket. Since the gdb-remote protocol occasionally contains binary data, and it does not assign any particular encoding to them, this is the right thing to do here. llvm-svn: 354114
* Fix lldb-server test suite for python3Pavel Labath2019-02-155-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch finishes the python3-ification of the lldb-server test suite. It reverts the partial attempt in r352709 to encode/decode the string via utf8 before writing to the socket. This wasn't enough because the gdb-remote protocol can sometimes (but not very often) carry binary data, and the utf8 codec chokes on that. Instead I add utility functions to the "seven" module for performing "identity" transformations on the byte data. This basically drills back the hole in the python type system that the string/bytes distinction was supposed to plug. That is not ideal, but was the best solution of the alternatives I could come up with. The options I considered were: - make use of the type system to add type safety to the test suite: This required making a lot of changes to the test suite, since most of the strings would now become byte objects instead, and it was not even fully clear to me where to draw the line. One extreme solution would be to just use byte objects everywhere, as the protocol doesn't support non-ascii characters anyway. However, this appeared to be: a) weird, because most of the protocol actually deals with strings, but we would have to prefix everything with 'b' b) clunky, because the handling of the bytes objects is sufficiently different in PY2 and PY3 (e.g. b'a'[0] is a string in PY2, but an int in PY3). - using the latin1 codec (which gives an identity transformation for the first 256 code points of unicode) instead of the custom bytes_to_string functions. This almost could work, but it was still slightly different between python 2 and 3, because in PY2 in would return a unicode object, which would then cause problems when combined with regular strings if it contained 8-bit chars. With this in mind, I think the best solution for the time being is to just coerce everything into the string type as early as possible, and have things proceed indentically on both python versions. Once we stop supporting python3, we can revisit the idea of using bytes objects more prevasively. Reviewers: davide, zturner, serge-sans-paille Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D58177 llvm-svn: 354106
* Embed swig version into lldb.py in a different wayPavel Labath2019-02-151-0/+28
| | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of doing string chopping on the resulting python file, get swig to output the version for us. The two things which make slightly non-trivial are: - in order to get swig to expand SWIG_VERSION for us, we cannot use %pythoncode directly, but we have to go through an intermediate macro. - SWIG_VERSION is a hex number, but it's components are supposed to be interpreted decimally, so there is a bit of integer magic needed to get the right number to come out. I've tested that this approach works both with the latest (3.0.12) and oldest (1.3.40) supported swig. Reviewers: zturner, jingham, serge-sans-paille Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D58172 llvm-svn: 354104
* Add explicit language specifier to test.Adrian Prantl2019-02-141-1/+1
| | | | llvm-svn: 354048
* [dotest] Fix compiler version number comparisonFrederic Riss2019-02-141-4/+5
| | | | | | | | | | | | | | | dotest's version comparision function is just a lexicographical compare of the version strings. This is obviously wrong. This patch implements the comparison using distutils.version.LooseVersion as suggested by Zachary. Reviewers: zturner, labath, serge-sans-paille Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D58219 llvm-svn: 354047
* Deserialize Clang module search path from DWARFAdrian Prantl2019-02-136-0/+53
| | | | | | | | | | | | This patch properly extracts the full submodule path as well as its search paths from DWARF import decls and passes it on to the ClangModulesDeclVendor. rdar://problem/47970144 Differential Revision: https://reviews.llvm.org/D58090 llvm-svn: 353961
* Revert "Fix one more string/bytes issue in lldb-server tests"Pavel Labath2019-02-131-1/+1
| | | | | | | | | | | | | It looks like I was too hasty to submit the previous patch. It does fix some tests on python3, but it also breaks one tests with python2. This happens because the gdb-remote protocol can sometimes (but not very often) contain binary data, and attempting to parse this as utf8 characters fails. This reverts commit r353944. llvm-svn: 353945
* Fix one more string/bytes issue in lldb-server testsPavel Labath2019-02-131-1/+1
| | | | | | This fixes about a dozen tests with python3. llvm-svn: 353944
* [testsuite] Convert TestSingleQuote to lit.Davide Italiano2019-02-123-85/+0
| | | | | | Nothing crazy, this is pretty mechanical. llvm-svn: 353894
* [gdb-remote] Use lldb's portable Host::GetEnvironment() instead of getenvAaron Smith2019-02-072-6/+1
| | | | | | | | | | | | Reviewers: zturner, llvm-commits, labath, serge-sans-paille Reviewed By: labath Subscribers: Hui, labath, lldb-commits Differential Revision: https://reviews.llvm.org/D56230 llvm-svn: 353440
* [lldb] Make frame recognizers vend synthesized eValueTypeVariableArgument valuesKuba Mracek2019-02-072-0/+3
| | | | llvm-svn: 353363
* [testsuite] Convert a pexpect test to lit.Davide Italiano2019-02-062-64/+0
| | | | | | | | | | | | | | Summary: Reviewers: JDevlieghere, friss, zturner, labath, jingham, serge-sans-paille Subscribers: llvm-commits, lldb-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57840 llvm-svn: 353345
* Add the source directory for https://reviews.llvm.org/D57552.Jim Ingham2019-02-061-0/+7
| | | | llvm-svn: 353251
* Fix PathMappingList::FindFile to handle relative incoming FileSpecs.Jim Ingham2019-02-052-230/+246
| | | | | | | | | | | | An equivalent change was made to RemapPaths, but it needed to be made here as well. Also added a test for this and made the setup a little more complex to avoid false successes. <rdar://problem/47642498> Differential Revision: https://reviews.llvm.org/D57552 llvm-svn: 353243
* [Py3/TestAppleOSSimulator] Another byte<->str interoperability issue.Davide Italiano2019-02-051-1/+1
| | | | llvm-svn: 353226
* [Expressions] Add support of expressions evaluation in some object's contextAleksandr Urakov2019-02-056-0/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support of expression evaluation in a context of some object. Consider the following example: ``` struct S { int a = 11; int b = 12; }; int main() { S s; int a = 1; int b = 2; // We have stopped here return 0; } ``` This patch allows to do something like that: ``` lldb.frame.FindVariable("s").EvaluateExpression("a + b") ``` and the result will be `33` (not `3`) because fields `a` and `b` of `s` will be used (not locals `a` and `b`). This is achieved by replacing of `this` type and object for the expression. This has some limitations: an expression can be evaluated only for values located in the debuggee process memory (they must have an address of `eAddressTypeLoad` type). Reviewers: teemperor, clayborg, jingham, zturner, labath, davide, spyffe, serge-sans-paille Reviewed By: jingham Subscribers: abidh, lldb-commits, leonid.mashinskiy Tags: #lldb Differential Revision: https://reviews.llvm.org/D55318 llvm-svn: 353149
* [Python2 to Python 3] Fix print -> print().Davide Italiano2019-02-051-6/+6
| | | | llvm-svn: 353130
* Update stale comment in lang/c/struct_types/main.cJonas Devlieghere2019-02-041-2/+2
| | | | | | rdar://47322760 llvm-svn: 353087
* [testsuite] Fix TestAppleSimulator so that it works with Python 3.Davide Italiano2019-01-312-3/+3
| | | | llvm-svn: 352710
* [Python] Fix gdb-remote and lldb-server utilities to work with Py3.Davide Italiano2019-01-312-5/+5
| | | | llvm-svn: 352709
* [Python] Python 2 and Python 3 disagree on `/`.Davide Italiano2019-01-311-1/+1
| | | | | | | | One considers it integer division, the other doesn't. Move to `//` (floor division) so that this test passes independently from the version. llvm-svn: 352706
* [Python] String(s) and bytes are two different entities in 3.7.Davide Italiano2019-01-311-1/+1
| | | | | | | So, we need an explicit call to decode() here to let it work with both interpreters. Fixes TestXMMRegisters on 3.7. llvm-svn: 352701
* Fix handling of CreateTemplateParameterList when there is an empty packShafik Yaghmour2019-01-303-0/+37
| | | | | | | | | Summary: When we are creating a ClassTemplateSpecializationDecl in ParseTypeFromDWARF(...) we are not handling the case where variadic pack is empty in the specialization. This patch handles that case and adds a test to prevent future regressions. Differential Revision: https://reviews.llvm.org/D57363 llvm-svn: 352677
* Adjust documentation for git migration.James Y Knight2019-01-292-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes most references to the paths: llvm.org/svn/ llvm.org/git/ llvm.org/viewvc/ github.com/llvm-mirror/ github.com/llvm-project/ reviews.llvm.org/diffusion/ to instead point to https://github.com/llvm/llvm-project. This is *not* a trivial substitution, because additionally, all the checkout instructions had to be migrated to instruct users on how to use the monorepo layout, setting LLVM_ENABLE_PROJECTS instead of checking out various projects into various subdirectories. I've attempted to not change any scripts here, only documentation. The scripts will have to be addressed separately. Additionally, I've deleted one document which appeared to be outdated and unneeded: lldb/docs/building-with-debug-llvm.txt Differential Revision: https://reviews.llvm.org/D57330 llvm-svn: 352514
* [testsuite] Remove unused seven module imports.Jonas Devlieghere2019-01-283-21/+0
| | | | llvm-svn: 352398
* Remove NO_DEBUGINFO_TESTCASE from testcase.Adrian Prantl2019-01-241-5/+0
| | | | | | | | This makes it easier to exclude the test n bots that test earlier DWARF formats, also it feels like this is the better decision for this testcase anyway. llvm-svn: 352111
* Only check the dwarf version when using the dwarf categoryAdrian Prantl2019-01-242-4/+6
| | | | llvm-svn: 352094
* Unbreak windows botsAdrian Prantl2019-01-241-9/+10
| | | | llvm-svn: 352086
* Rename test directoryAdrian Prantl2019-01-243-0/+0
| | | | llvm-svn: 352073
* Add decorator support for the DWARF version produced by the compilerAdrian Prantl2019-01-247-6/+35
| | | | | | | and mark up some tests failing in http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/ llvm-svn: 352072
* Skip test on clang <8 instead of 7Adrian Prantl2019-01-241-1/+1
| | | | llvm-svn: 352009
* Revert "[dotest] Add logging to investigate CI issue."Jonas Devlieghere2019-01-231-6/+1
| | | | | | | We figured out the issue so the logging is no longer necessary. It turns out we were using a session format that was not unique for inline tests. llvm-svn: 351902
* [Test] Fix up tests affected by the new LLVM header.Jonas Devlieghere2019-01-223-12/+12
| | | | | | | | | The new LLVM header is one line shorter than the old one, which lead to some test failures. Ideally tests should rely on line numbers for breakpoints or output, but that's a different discussion. Hopefully this turns the bots green again. llvm-svn: 351779
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-19282-1128/+846
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [dotest] Add logging to investigate CI issue.Jonas Devlieghere2019-01-181-1/+6
| | | | | | | | | | | | We're seeing an odd issue on GreenDragon's lldb-cmake-matrix. Dotest is unable to move a log file (OSError: [Errno 2] No such file or directory). The os.rename call is guarded with a check that the source file and destination directory exist. This wraps the call in a try-except that prints the source and destination path to see which component seemingly doesn't exist. llvm-svn: 351611
* Don't run TestBreakpointThumbCodesection.py on darwin systems;Jason Molenda2019-01-172-1/+4
| | | | | | | | | we don't use a thumb code section. Don't run Test128BitsInteger.py on armv7k; it's not a supported type on that target. llvm-svn: 351490
* XFAIL test on WindowsAdrian Prantl2019-01-161-1/+2
| | | | | | http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/677/steps/test/logs/stdio llvm-svn: 351385
* Change TypeSystem::GetBitSize() to return an optional result.Adrian Prantl2019-01-164-0/+43
| | | | | | | | | | | | This patch changes the behavior when printing C++ function references: where we previously would get a <could not determine size>, there is now a <no summary available>. It's not clear to me whether this is a bug or an omission, but it's one step further than LLDB previously got. Differential Revision: https://reviews.llvm.org/D56798 llvm-svn: 351376
* [lldbsuite] Skip two more flaky tests on WindowsStella Stamenova2019-01-142-0/+2
| | | | | | TestNamespaceLookup occasionally passes unexpectedly and TestExitDuringStep occasionally fails unexpectedly llvm-svn: 351080
* [Core] Use the implementation method GetAddressOf in ValueObjectConstResultChildAleksandr Urakov2019-01-141-0/+3
| | | | | | | | | | | | | | | | | | | | Summary: This patch allows to retrieve an address object for `ValueObject`'s children retrieved through e.g. `GetChildAtIndex` or `GetChildMemberWithName`. It just uses the corresponding method of the implementation object `m_impl` to achieve that. Reviewers: zturner, JDevlieghere, clayborg, labath, serge-sans-paille Reviewed By: clayborg Subscribers: leonid.mashinskiy, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D56147 llvm-svn: 351065
* [lldbsuite] Skip TestExitDuringStep on WindowsStella Stamenova2019-01-111-0/+1
| | | | | | This test is flaky on Windows and will occasionally hang or fail. llvm-svn: 350978
* lldbtest.py: try to fix a runtime exceptionAdrian Prantl2019-01-101-4/+7
| | | | | | found on http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/32/consoleFull#15046896708254eaf0-7326-4999-85b0-388101f2d404 llvm-svn: 350876
OpenPOWER on IntegriCloud