summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
...
* [Support] Replace HashString with djbHash.Jonas Devlieghere2018-02-261-2/+2
| | | | | | | | | | | | | | | This removes the HashString function from StringExtraces and replaces its uses with calls to djbHash from DJB.h This is *almost* NFC. While the algorithm is identical, the djbHash implementation in StringExtras used 0 as its seed while the implementation in DJB uses 5381. The latter has been shown to result in less collisions and improved avalanching. https://reviews.llvm.org/D43615 (cherry picked from commit 77f7f965bc9499a9ae768a296ca5a1f7347d1d2c) llvm-svn: 326081
* Delete dead code in MachVMMemory.cpp, NFCVedant Kumar2018-02-241-36/+0
| | | | | | This addresses a compiler warning. llvm-svn: 326002
* [unittests] Disable lldb-server tests if an external debug server is in useVedant Kumar2018-02-242-3/+9
| | | | | | | | | | | | The lldb-server unit tests don't test the right thing when the debug server in use is copied from somewhere else. This can lead to spurious test failures. Disable these unit tests when an external debug server is in use. Fixes llvm.org/PR36494. llvm-svn: 326001
* Fix a compiler warning in ModuleCacheTest.cpp, NFCVedant Kumar2018-02-231-2/+2
| | | | llvm-svn: 325974
* [Utility] Simplify and generalize the CleanUp helper, NFCVedant Kumar2018-02-237-300/+125
| | | | | | | | | | | | | | | | | | Removing the template arguments and most of the mutating methods from CleanUp makes it easier to understand and reuse. In its present state, CleanUp would be too cumbersome to adapt to cases where multiple objects need to be released. Take for example this change in swift-lldb: https://github.com/apple/swift-lldb/pull/334/files#diff-6f474df750f75c8ba675f2a8408a5629R219 This change is simple to express with the new CleanUp, but not so simple with the old version. Differential Revision: https://reviews.llvm.org/D43662 llvm-svn: 325964
* Fix breakpoint thread name conditionals after breakpoint options refactor.Jim Ingham2018-02-233-39/+42
| | | | | | PR36435 llvm-svn: 325958
* Replace HashStringUsingDJB with llvm::djbHashPavel Labath2018-02-238-222/+81
| | | | | | | | | | | | | | | | | | | | | | Summary: The llvm function is equivalent to this one. Where possible I tried to replace const char* with llvm::StringRef to avoid extra strlen computations. In most places, I was able to track the c string back to the ConstString it was created from. I also create a test that verifies we are able to lookup names with unicode characters, as a bug in the llvm compiler (it accidentally used a different hash function) meant this was not working until recently. This also removes the unused ExportTable class. Reviewers: aprantl, davide Subscribers: JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D43596 llvm-svn: 325927
* Fix TestMultithreaded when there's no debugserver specifiedFrederic Riss2018-02-231-1/+1
| | | | | | | r325858 was bogus and would error out with a KeyError when --server was not passed to dotest.py. llvm-svn: 325862
* Fix TestUbsanBasicFrederic Riss2018-02-231-1/+1
| | | | | | | | | | | | | | | Summary: Potentially due to the recent testuite refactorings, this test now reports a full absolute path but expect just the filename. For some reason this test is skipped on GreenDragon so we've never seen the issue. Reviewers: vsk Subscribers: kubamracek, lldb-commits Differential Revision: https://reviews.llvm.org/D43577 llvm-svn: 325859
* Fix TestMultithreaded when specifying an alternative debugserver.Frederic Riss2018-02-231-0/+2
| | | | | | | | | | | | | Summary: This test launches a helper that uses the debugserver. The environment variable sepcifying the debug server wasn't passed to this helper, thus it was using the default one. Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43546 llvm-svn: 325858
* remove FreeBSD xfail from lit TestCallStdStringFunctionEd Maste2018-02-231-3/+0
| | | | | | | | | | | | | This test is consistently reporting unexpected pass for me, and the expectedFailure decorator was removed from the legacy test in r310626. Apply the same change to the lit version of this test. Will investigate further if this fails once the new buildbot is running tests. llvm.org/pr17807 llvm-svn: 325856
* [testsuite] Throw away test/debug_info/apple_types.Davide Italiano2018-02-233-104/+0
| | | | | | | | | | | | This test was only testing that clang produced the correct informations for __apple accelerated tables. So, it's a clang test. Also, it doesn't require any debugger intervention, the object file can be analyzed statically with a dumper. Also, the input program was highly verbose (unnecessarily). r325850 commits a clang test instead, so it's time to retire this. llvm-svn: 325851
* Delete some unused #includes of CleanUp.h, NFCVedant Kumar2018-02-236-7/+0
| | | | llvm-svn: 325847
* [ObjC] Fix the NSConcreteData formatter and test itVedant Kumar2018-02-223-10/+28
| | | | | | | The length field of an NSConcreteData lives one word past the start of the object, not two. llvm-svn: 325841
* Fix TestMoveNearest on WindowsAdrian McCarthy2018-02-221-3/+2
| | | | | | | | | | The header file for the DLL tried to declare inline functions and a local function as dllexport which broke the compile and link. Removing the bad declarations solves the problem, and the test passes on Windows now. Differential Revision: https://reviews.llvm.org/D43600 llvm-svn: 325836
* Fix TestSBData.py on WindowsAdrian McCarthy2018-02-221-1/+1
| | | | | | | | | Ensure that the test data is an array of bytes rather than a string that gets encoded differently between Python 2 and Python 3. Differential Revision: https://reviews.llvm.org/D43532 llvm-svn: 325835
* [LLDB][PPC64] Fixed next blocked forever at same linePavel Labath2018-02-211-5/+1
| | | | | | | | | | | | | | | | | | Summary: The PC corresponding to the breakpoint was being calculated wrongly, which was causing LLDB to never go past the first breakpoint, when there was a second one adjacent to it. Reviewers: clayborg, labath Reviewed By: clayborg, labath Subscribers: anajuliapc, alexandreyy, lbianc Differential Revision: https://reviews.llvm.org/D43344 Patch by Leandro Lupori <leandro.lupori@gmail.com>. llvm-svn: 325728
* [testsuite] Run lit tests as part of `check-lldb`.Davide Italiano2018-02-212-0/+4
| | | | | | | | | | Also, fix a missing dependency, as lit requires llvm-config to run. This is becoming more and more important as we write more FileCheck style tests. Differential Revision: https://reviews.llvm.org/D43591 llvm-svn: 325719
* [testsuite/decorators] Get rid of some `expectFlakey` variants.Davide Italiano2018-02-211-27/+0
| | | | | | These seem to be pretty much dead. llvm-svn: 325708
* Fix TestBreakpointInGlobalConstructor for WindowsAdrian McCarthy2018-02-212-3/+5
| | | | | | | | | | | | | | | | | | Summary: This test was failing on Windows because it expected the breakpoint in the dynamic library to be resolved before the process is launched. Since the DLL isn't loaded until the process is launched this didn't work. The fix creates a special value (-2) for num_expected_locations that ignores the actual number of breakpoint locations found. Reviewers: jasonmolenda Subscribers: sanjoy, lldb-commits Differential Revision: https://reviews.llvm.org/D43419 llvm-svn: 325704
* Fix remote tests broken by r325690Pavel Labath2018-02-211-1/+1
| | | | | | | | The patch added an extra argument to the append_to_process_working_directory function. I have somehow missed updating this test, and it did not show up because the code was only run in remote mode. llvm-svn: 325702
* llgs-tests: Fix r325511 for debugserverPavel Labath2018-02-212-3/+13
| | | | | | | Debugserver sends the thread-pcs field with leading zeroes omitted. Teach parseRegisterValue to pad these as necessary. llvm-svn: 325701
* Fix a couple of more tests to not create files in the source treePavel Labath2018-02-217-28/+23
| | | | | | | | | | | | | | | | | | | | | | | | Summary: These were not being flaky, but they're still making the tree dirty. These tests were using lldbutil.append_to_process_working_directory to derive the file path so I fix them by modifying the function to return the build directory for local tests. Technically, now the path returned by this function does not point to the process working directory for local tests, but I think it makes sense to keep the function name, as I think we should move towards launching the process in the build directory (and I intend to change this for the handful of inferiors that actually care about their PWD, for example because they need to create files there). Reviewers: davide, aprantl Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43506 llvm-svn: 325690
* Fix TestAppleTypesIsProduced after r324226Frederic Riss2018-02-211-1/+1
| | | | | | | | This test was accessing self.debug_info, which doesn't exist anymore. For some reason the macOS bots are skipping this test because they think the compiler is not clang. We'll look into this separately. llvm-svn: 325666
* [lit] Update how clang and other binaries are found in per-configuration ↵Aaron Smith2018-02-213-11/+34
| | | | | | | | | | | | | | | | | | | | | | | directories Summary: This is modeled after the clang and llvm lit tests. Several properties have CMAKE_CFG_INTDIR as part of the path - this works correctly when the cmake generator only supports one configuration which is known at configuration time, but it does not work correctly when the cmake generator supports multiple configurations (for example, VS). For VS, CMAKE_CFG_INTDIR ends up set as $Configuration and then it is never updated correctly. Instead, the lit configuration can use a property that can be overwritten at run time. AddLLVM does that for several properties (such as LLVM_TOOLS_DIR). This change is also removing properties from the lit/CMakeLists.txt that are actually set during the call to configure_lit_site_cfg Reviewers: zturner, lldb-commits Reviewed By: zturner Subscribers: llvm-commits, labath, stella.stamenova, mgorny, hintonda Differential Revision: https://reviews.llvm.org/D43096 llvm-svn: 325652
* 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
OpenPOWER on IntegriCloud