summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Avoid dirtying the source tree in breakpoint command testsPavel Labath2018-02-204-92/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The paralelization patch exposed a bunch of cases where we were still touching the source tree (as these tests were now stepping on each others toes and being flaky). This patch removes such issues from breakpoint command tests. Since the only reason they were creating files was to indirectly test whether the breakpoint commands got executed (and plumbing the full build tree path to all places that needed it would be messy) I decided to modify the tests to check for a different side effect instead: modification of a global variable. This also makes the code simpler as checking the value of the global variable is easier, and there is nothing to clean up. As the tests aren't really doing anything debug-info related, I took the opportunity to also mark them as NO_DEBUG_INFO_TESTCASEs. Reviewers: jingham, aprantl Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43464 llvm-svn: 325570
* Handle typeof() expressionsJonas Devlieghere2018-02-202-17/+78
| | | | | | | | | | | | | | | | | | | | Before this patch, LLDB was not able to evaluate expressions that resulted in a value with a typeof- or decltype-type. This patch fixes that. Before: (lldb) p int i; __typeof__(i) j = 1; j (typeof (i)) $0 = After: (lldb) p int i; __typeof__(i) j = 1; j (typeof (i)) $0 = 1 Differential revision: https://reviews.llvm.org/D43471 rdar://37461520 llvm-svn: 325568
* Two more dosep-paralellization fallout fixesPavel Labath2018-02-191-32/+14
| | | | | | | | | | | | | | | | The first issue is about the flaky test rerun logic. This was grouping tests by subdir and passing them into walk_and_invoke in the incorrect form. This part can be just deleted as its not needed anymore. The second problem (which I noticed while investigating the first one) was that the "-p" switch was not working in multiprocessing mode. This happened because we were returning None from process_file instead of a tuple full of empty values for tests that did not match the -p regex. Both of these would be caught earlier if python was a more strongly typed language. :/ llvm-svn: 325519
* Fix TestStopReplyContainsThreadPcs on 32-bit x86 (pr36013)Pavel Labath2018-02-195-103/+166
| | | | | | | | | | | | | | | | | Summary: The issue was that we were parsing the registers into 64-bit integers and the calling swapByteOrder without regard for the actual size of the register. This switches the test to use the RegisterValue class which tracks the register size, and knows how to initialize itself from a piece of memory (so we don't need to swap byte order ourselves). Reviewers: eugene, davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43376 llvm-svn: 325511
* Add SBDebugger::GetBuildConfiguration and use it to skip an XML testPavel Labath2018-02-195-1/+34
| | | | | | | | | | | | | | | | | | | | | Summary: This adds a SBDebugger::GetBuildConfiguration static function, which returns a SBStructuredData describing the the build parameters of liblldb. Right now, it just contains one entry: whether we were built with XML support. I use the new functionality to skip a test which requires XML support, but concievably the new function could be useful to other liblldb clients as well (making sure the library supports the feature they are about to use). Reviewers: zturner, jingham, clayborg, davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43333 llvm-svn: 325504
* Make gdb-client tests generate binaries in the build treePavel Labath2018-02-191-7/+1
| | | | | | | | | | | These were missed in the great refactor because they were added concurrently with it. Since we started running tests in a more parallel fashion they started to be flaky. This should fix it. Now that we are no longer polluting the source tree, I also delete the bit of custom cleanup code specific to these tests. llvm-svn: 325495
* Add DEBUGSERVER_PATH to the cache so it'll be available for tests.Don Hinton2018-02-171-2/+2
| | | | | | | | This fixed a problem caused by r325442. Differential Revision: https://reviews.llvm.org/D43432 llvm-svn: 325452
* [cmake] Fix LLDB_CODESIGN_IDENTITY logic.Don Hinton2018-02-172-18/+17
| | | | | | | | | | | | | | | | | | | | | | Summary: Consolidate LLDB_CODESIGN_IDENTITY logic in one place and use SKIP_DEBUGSERVER, which can be set independently, to control codesigning targets. Currently, running cmake the first time in a clean directory, without passing -DLLDB_CODESIGN_IDENTITY='', fails. However, subsequent runs succeed. That's because LLDB_CODESIGN_IDENTITY gets added to the CACHE after the initial test. To fix that, the default value must be set before it's tested. Here's the error produced on the first run: CMake Error at tools/lldb/tools/debugserver/source/CMakeLists.txt:215 (add_custom_command): No TARGET 'debugserver' has been created in this directory. Differential Revision: https://reviews.llvm.org/D43432 llvm-svn: 325442
* Shorten socket names in TestPlatformProcessConnectPavel Labath2018-02-161-3/+3
| | | | | | | | | | | The test was generating long unix socket names, and the addition of a new folder in the previous patch pushed it over the limit (although linux has a fairly generous limit for path names, this does not apply to unix sockets). Modify the test to use a shorter name instead. llvm-svn: 325340
* Re-enable lang/objc/modules/TestObjCModulesJonas Devlieghere2018-02-161-4/+0
| | | | | | | | The reason this test was disabled is no longer relevant. However, it didn't turn into an unexpected success because of a syntax error in the test itself. This commit fixes that and re-enables the test. llvm-svn: 325339
* Fix paralelization of remote testsPavel Labath2018-02-161-1/+1
| | | | | | | | | | Since we now can run multiple tests from the same directory at once, we need to include the test name in the remote test directory instead. I'm not sure if the test_number in the remote path is necessary anymore (or even if it was ever necessary), but I choose to leave it in for now. llvm-svn: 325334
* [lldb][PPC64] Fixed vector and struct return valuePavel Labath2018-02-162-145/+575
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The PowerPC64 ABI plugin was modified to: - properly handle vector type return values - implement support for struct/class return values A refactoring in the code that handles return values was also performed, to make it possible to handle structs without repeating (when possible) code that handles its fields. There was also an issue with CreateInstance(), that only created an instance in the first time it was called and then cached it in a static var. When restarting a process under LLDB's control, the ABI's process weak pointer would become null, and using it would result in a segmentation fault. This issue became more evident after the latest changes to PPC64 plugin, that now uses the process pointer to get the target byte order, making LLDB to seg fault when restarting a program. This was fixed by making CreateInstance() to always create a new ABI instance. All of LLDB's ReturnValue tests are passing for PPC64le now. It should work for PPC64be too, although this was not tested. Reviewers: labath, clayborg Reviewed By: labath Subscribers: lbianc, anajuliapc, llvm-commits, alexandreyy, nemanjai, kbarton Differential Revision: https://reviews.llvm.org/D42468 Patch by Leandro Lupori <leandro.lupori@gmail.com>. llvm-svn: 325324
* [dosep] Run tests in a more parallel fashionPavel Labath2018-02-162-61/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Due to in-tree builds, we were parallelizing the tests at the directory level. Now that the tests are built out-of-tree, we can remove this limitation and paralelize at file level instead. This decreases test suite time by about 10% for me, which is not world-shattering, but it makes the code slightly simpler and will also allow us to merge tests which were artificially spread over multiple folders (TestConcurrentEvents...) to work-around this limitation. To make this work, I've also needed to include the test file name in the build directory name, as just the test method name is not unique enough (plenty of tests have a test method called "test" or similar). While doing this, I've found a couple of tests that are taking waaay longer then they ought to (TestBreakpointCaseSensitivity -- 90 seconds), which I plan to look into in the future. Reviewers: aprantl Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43335 llvm-svn: 325322
* @skipIfRemote TestTargetXMLArchPavel Labath2018-02-151-0/+1
| | | | | | The test does not actually connect to any remote targets. llvm-svn: 325250
* Supply missing break in case statement.Adrian McCarthy2018-02-141-3/+1
| | | | | | | | | | | | Summary: All the tests pass without hitting the situation mentioned in the FIXME, so, per Aaron Smith's suggestion, this case will now return unconditionally. Subscribers: sanjoy, mgorny, JDevlieghere Differential Revision: https://reviews.llvm.org/D43215 llvm-svn: 325188
* Remove vestigial remnants of the test crash info hookPavel Labath2018-02-142-8/+0
| | | | llvm-svn: 325137
* [cmake] Darwin: Copy in the system debugserver if neededVedant Kumar2018-02-134-13/+26
| | | | | | | This makes the built debugger functional on Darwin when compiling without code signing (as documented in docs/code-signing.txt). llvm-svn: 325068
* Remove the pubnames support from the Xcode project.Jim Ingham2018-02-121-216/+24
| | | | llvm-svn: 324930
* Remove dead code for handling DWARF pubnamesAdrian McCarthy2018-02-127-540/+0
| | | | | | | | | | | | Summary: LLDB doesn't use this code, the code has no tests, and the code does suspicious things like hashing pointers to strings instead of the strings themselves. Subscribers: sanjoy, mgorny, JDevlieghere Differential Revision: https://reviews.llvm.org/D43202 llvm-svn: 324925
* [testsuite] Reintroduce test to check leaking.Davide Italiano2018-02-123-0/+141
| | | | | | | It wasn't python leaking, it was lldb. Thanks to Pavel for the explanation. Pointy-hat to me. llvm-svn: 324919
* Skip TestTargetXMLArch on non-darwin OSsPavel Labath2018-02-121-0/+1
| | | | | | | | | | | | | This test uses XML packets, but libxml is an optional dependency of lldb, and this test fails if it is not present. I'm leaving this enabled on mac, as thats the only platform that's likely to have libxml always available, but ideally we should have a way to skip this based on build configuration. I'll see if I can whip something like that up soon, but for the time being, this unblocks the buildbots. llvm-svn: 324870
* Looks like this fails when built i386 on linux bots, possible targetJason Molenda2018-02-101-0/+1
| | | | | | | | | arch incompat with spec in file so it's rejected and the test fails. will look into this later, will be a test case issue not a test issue; test case may only be valid when lldb is built for/running on an x86_64 system. llvm-svn: 324795
* Add test case for x86_64 architecture recognition in theJason Molenda2018-02-102-1/+122
| | | | | | target.xml packet if it is included. llvm-svn: 324792
* Make LLDB's clang module cache path customizableAdrian Prantl2018-02-096-13/+35
| | | | | | | | | | | This patch makes LLDB's clang module cache path customizable via settings set target.clang-modules-cache-path <path> and uses it in the LLDB testsuite to reuse the same location inside the build directory for LLDB and clang. Differential Revision: https://reviews.llvm.org/D43099 llvm-svn: 324775
* [lldb-mi] This test now passes consistently, unXFAIL it.Davide Italiano2018-02-091-1/+0
| | | | llvm-svn: 324768
* [Testsuite] Remove leak tests, it's not useful anymore.Davide Italiano2018-02-093-141/+0
| | | | | | | | | This only worked on MacOS, which now ships a newer version of python without this bug. As such, we don't leak the fd, and this test is not needed anymore (as it also hardcoded the python version in the check). llvm-svn: 324743
* Fix some warnings in SymbolFilePDB.cppPavel Labath2018-02-091-7/+6
| | | | llvm-svn: 324730
* llgs-test: Parse and store register info recieved from lldb-serverPavel Labath2018-02-095-41/+130
| | | | | | | | | | | | | | | | | | | | Summary: Right now the test client is not parsing register values correctly, which is manifesting itself in one test failing on 32-bit architectures (pr36013). This parses the information from the qRegisterInfo packets and stores it in the client, which will enable fixing the parsing in a follow up commit. I am also adding a new templated SendMessage overload, which enables one to send a message get a parsed response in a single call. Reviewers: eugene, davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43076 llvm-svn: 324722
* [SymbolFilePDB] Add support for function symbolsAaron Smith2018-02-097-21/+872
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is combination of following changes, - Resolve function symbols in PDB symbol file. `lldb-test symbols` will display information about function symbols. - Implement SymbolFilePDB::FindFunctions methods. On lldb console, searching function symbol by name and by regular expression are both available. - Create lldb type for PDBSymbolFunc. - Add tests to check whether functions with the same name but from different sources can be resolved correctly. Reviewers: zturner, lldb-commits Reviewed By: zturner Subscribers: amccarth, labath, llvm-commits Differential Revision: https://reviews.llvm.org/D42443 llvm-svn: 324707
* Recognize MSVC style mangling in CPlusPlusLanguage::IsCPPMangledNameAaron Smith2018-02-081-7/+11
| | | | | | | | | | | | Reviewers: zturner, lldb-commits, labath Reviewed By: zturner Subscribers: jingham, labath, davide, llvm-commits Differential Revision: https://reviews.llvm.org/D43059 llvm-svn: 324672
* Only throw -fPIC when building a shared libraryAaron Smith2018-02-0819-36/+15
| | | | | | | | | | | | | | | | | | Summary: Update makefiles to specify -fPIC in Makefile.rules and only throw -fPIC when building a shared library. This change is necessary to allow building the lldb tests on Windows where -fPIC is not a valid option. Update a few places to Python 3.x syntax Reviewers: zturner, lldb-commits Reviewed By: zturner Subscribers: stella.stamenova, labath, llvm-commits Differential Revision: https://reviews.llvm.org/D42994 llvm-svn: 324671
* Rewrite testcase to not depend on Foundation implementation details.Adrian Prantl2018-02-087-31/+22
| | | | | | | | TODO: Add a separate testcase testing *only* Foundation implementation details! <rdar://problem/37252738> llvm-svn: 324655
* Rewrite the flaky test_restart_bug test in a more deterministic wayPavel Labath2018-02-083-88/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The test was trying to reproduce a bug in handling of two concurrent events, which was impossible to do reliably in a black-box style test. In practice, this meant the test was only ever failing on remote targets, as these were slow enough to trigger this. Fortunately, we now have the ability to mock the server side of the connection, which means we can simulate the failure deterministically, so I rewrite the test to use the new gdb-client framework. I've needed to add a couple of new packets to the mock server to be able to do this. Instead of trying to guess how a "typical" gdb-client test will want to handle this, I throw an exception in the implementation to force the user to override them (the packets are only sent if the test explicitly performs some action which will trigger them, so a basic test which e.g. does not need the "continue" functionality will not need to implement them). Reviewers: owenpshaw Subscribers: srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D42959 llvm-svn: 324590
* [docs] Update docs for cmake options LLDB_TEST_C_COMPILER and ↵Aaron Smith2018-02-082-6/+6
| | | | | | | | | | | | | | | | LLDB_TEST_CXX_COMPILER Summary: LLDB_TEST_COMPILER is not a valid option for CMake for LLDB. There are instead two properties LLDB_TEST_C_COMPILER and LLDB_TEST_CXX_COMPILER. Update the documents accordingly to reflect the correct information. Reviewers: zturner, lldb-commits Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43061 llvm-svn: 324564
* Deactivate TestTargetSymbolsBuildidCase if host is windowsEugene Zemtsov2018-02-082-1/+2
| | | | | | Makefile has unix magic and thus not working on windows. llvm-svn: 324558
* Add CMAKE_CFG_INTDIR as part of the include path for the default test compiler. Aaron Smith2018-02-081-2/+2
| | | | | | | | | | | | | | | | | Summary: This is a small change towards running the LLDB unit tests on Windows (still WIP). Builds that use make do not point to specific configurations. However, builds with multiple configurations such as Visual Studio on Windows need the configuration (release/debug/etc) as part of the path so the binaries produced by clang are placed in the correct directory for the configuration. Reviewers: zturner, lldb-commits, labath Reviewed By: labath Subscribers: labath, mgorny, hintonda, llvm-commits Differential Revision: https://reviews.llvm.org/D42990 llvm-svn: 324555
* Remove an errant ^S Jim Ingham2018-02-071-1/+1
| | | | | | (still can't get over those Emacs habits...) llvm-svn: 324509
* [test] Don't drop existing categories for methods.Jonas Devlieghere2018-02-071-7/+10
| | | | | | | | | The change in r324488 dropped the existing category attribute in for instance methods. This patch corrects that. Differential revision: https://reviews.llvm.org/D43024 llvm-svn: 324492
* [test] Enable setting category for inline tests.Jonas Devlieghere2018-02-071-2/+7
| | | | | | | | | Inlined tests have a test function that is actually an instance method, which requires a slightly different approach when it comes to setting the category attribute. The attribute must be set on the actual function, rather than on a particular instance. llvm-svn: 324488
* Remove function DW_DSC_value_to_namePavel Labath2018-02-072-12/+0
| | | | | | It is unused, and the underlying llvm function has been removed as well. llvm-svn: 324472
* lldb running on an ios device is using the _dyld_get_all_image_infos()Jason Molenda2018-02-071-0/+21
| | | | | | | | | SPI call to to find its own shared cache's UUID. On newer sytems we need to use the a new SPI which will return the UUID directly. <rdar://problem/36625871> llvm-svn: 324437
* Remove obsolete fileAdrian Prantl2018-02-062-208/+0
| | | | llvm-svn: 324400
* Pass --build-dir to dotest in the Xcode projectAdrian Prantl2018-02-061-1/+1
| | | | llvm-svn: 324396
* More correct handling of error cases C++ name parserEugene Zemtsov2018-02-062-2/+3
| | | | | | | | | | Now incorrect type argument that looks like T<A><B> doesn't cause an assert, but just a parsing error. Bug: 36224 Differential Revision: https://reviews.llvm.org/D42939 llvm-svn: 324380
* Build each testcase variant in its own subdirectory and remove the srcdir ↵Adrian Prantl2018-02-0613-148/+131
| | | | | | | | | | | | | | lock file This patch creates a <test>.dwarf, <test>.dwo, etc., build directory for each testcase variant. Most importantly, this eliminates the need for the per-test lock file in the source directory. Tests that are marked as NO_DEBUG_INFO_TESTCASE and build with buildDefault() are built in a <test>.default build directory. Differential Revision: https://reviews.llvm.org/D42763 llvm-svn: 324368
* [testsuite] Skip a flakey test.Davide Italiano2018-02-051-0/+1
| | | | llvm-svn: 324293
* Disable test_restart_bug failing on AndroidEugene Zemtsov2018-02-051-0/+1
| | | | llvm-svn: 324288
* Fix the cputype comparison in ↵Jason Molenda2018-02-051-1/+5
| | | | | | | | | GDBRemoteCommunicationServerCommon::Handle_qHostInfo to use Mach-O cpu types instead of the ArchSpec enum value, and handle the case of bridgeos. llvm-svn: 324287
* CMake: fix build directory name in clean ruleAdrian Prantl2018-02-051-1/+1
| | | | llvm-svn: 324281
* [lang/Objc] UNXFAIL a test. Nullability has been implemented in clang.Davide Italiano2018-02-051-1/+0
| | | | | | | | (a while ago). <rdar://problem/20416388> llvm-svn: 324280
OpenPOWER on IntegriCloud