summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
* [lldbsuite] Un-xfail tests on Windows that are now passing (pt.2)Stella Stamenova2018-12-1912-20/+1
| | | | | | This is a set of tests that were all marked as failing becuse of pr21765. The bug is not fixed (as in more of the tests that were marked this way are failing), but this set is passing. It is possible that some of them are false positives, but there's a large number of unexpectedly passing tests on Windows, so I am doing a bulk un-xfail to get the buildbot to green. llvm-svn: 349668
* [lldbsuite] Un-xfail tests on Windows that are now passingStella Stamenova2018-12-1910-37/+1
| | | | | | This is a set of tests that were all marked as failing becuse of pr24489. The bug is not fixed (as in more of the tests that were marked this way are failing), but this set is passing. It is possible that some of them are false positives, but there's a large number of unexpectedly passing tests on Windows, so I am doing a bulk un-xfail to get the buildbot to green. llvm-svn: 349665
* Show the memory region name if there is one in the output of the "memory ↵Greg Clayton2018-12-192-0/+30
| | | | | | | | | | region" command Prior to this change we would show the name of the section that a memory region belonged to but not its actual region name. Now we show this,. Added a test that reuses the regions-linux-map.dmp minidump file to test this and verify the correct region names for various memory regions. Differential Revision: https://reviews.llvm.org/D55854 llvm-svn: 349658
* refactor testsuite spawnLldbMi args->exe+argsJan Kratochvil2018-12-193-11/+14
| | | | | | | | | | | | | | | | | Currently spawnLldbMi accepts both lldb-mi options and executable to debug as a single parameter. Split them. As in D55859 we will need to execute one lldb-mi command before loading the exe. Therefore we can no longer use the exe as lldb-mi command-line parameter as then there is no way to execute a command before loading exe specified as lldb-mi command-line parameter. LocateExecutableSymbolFileDsym should be static, that is also a little refactorization. Differential Revision: https://reviews.llvm.org/D55858 llvm-svn: 349607
* [lit] Use the new build.py script in the lldb-mi testsStella Stamenova2018-12-181-2/+0
| | | | | | This allows the tests to pass on Windows as well llvm-svn: 349562
* TestHelloWorld: Use a file on the target platform for synchronisation.Adrian Prantl2018-12-182-19/+29
| | | | | | Thanks to Pavel Labath for the idea! llvm-svn: 349550
* de-flake TestThreadStates.test_process_interruptPavel Labath2018-12-181-1/+5
| | | | | | | | | | | | | | | | the "self.assertEqual(thread.GetStopReason(), lldb.eStopReasonSignal)" was occasionally failing because the stop reason would come out as "trace" this happened if we issued the interrupt just as the processed stopped due to single-stepping over the breakpoint (i.e., the it was not necessary to send any signal). Fix this by removing the breakpoint before resuming the process. This ensures the process can run unobstructed. After this, the test passed 200 consecutive runs successfully for me, even while the system was under heavy load. llvm-svn: 349491
* Skip TestMultithreaded.test_sb_api_listener_resume on linuxPavel Labath2018-12-181-1/+1
| | | | | | | The test still fails occasionally (1/100 runs). Upgrade the xfail to skip. llvm-svn: 349487
* Un-XFail TestYMMRegister on linuxPavel Labath2018-12-181-1/+0
| | | | | | | | | | This test was disabled in r326756 as a part of "upstreaming debugserver support for AVX-512 (zmm register set)". This looks like an error because both register set and remote stubs are different. In any case, the test passes now. llvm-svn: 349485
* Un-XFail TestThreadStates.test_process_interruptPavel Labath2018-12-181-12/+7
| | | | | | | | | | This test is passing now on linux. The same test is claimed to be flaky on darwin, so it's possible that's true on linux too. If that's the case we'll have to skip it here too (or fix it). I mark the test as not-debug-info-dependent as a drive-by. llvm-svn: 349482
* Un-XFAIL TestExitDuringBreak.py for linuxPavel Labath2018-12-181-3/+0
| | | | | | | This test is passing now on linux, and probably has been passing since r282993. llvm-svn: 349479
* Un-XFAIL TestNamespaceLookup for linuxPavel Labath2018-12-181-12/+3
| | | | | | | | These tests are now passing on linux, at least with top-of-tree clang, clang-6 and gcc-7.3. It's possible it may still be failing with some older compilers, but I don't have those around to test. llvm-svn: 349478
* A few small updates to the testsuite for running against an iOS device.Jason Molenda2018-12-178-9/+8
| | | | | | | Remove the expected-fails for 34538611; using an alternate platform implementation handles these correctly. llvm-svn: 349417
* Reflow readmeAdrian Prantl2018-12-171-46/+55
| | | | llvm-svn: 349398
* Remove sleep() synchronisation from teststcase andAdrian Prantl2018-12-171-9/+3
| | | | | | | | | | make the executable name more unique. This test is failing sporadically on some bots. By removing the sleep synchronisation, I'm hoping to get it to fail more reproducibly so I can investigate what is going on. llvm-svn: 349397
* Update a comment according to r255360 "Remove -r and -R options from dotest.py"Tatyana Krasnukha2018-12-141-2/+1
| | | | llvm-svn: 349208
* Remove the Disassembly benchmarks.Adrian Prantl2018-12-143-355/+0
| | | | | | | | | | | | While I was out hunting for remaining pexpect-based tests, I came across these tests that can't possibly work an any modern system, as they rely on having gdb available in /Developer. This patch simply removes the test without replacement. Differential Revision: https://reviews.llvm.org/D55559 llvm-svn: 349194
* Fix test failures that depended on module orderGreg Clayton2018-12-142-24/+24
| | | | llvm-svn: 349122
* Remove unused fileJonas Devlieghere2018-12-111-19/+0
| | | | | | | I removed the dotest-style reproducer test but forgot to delete the source file. Thanks Jim for the heads up! llvm-svn: 348901
* Rewrite pexpect-based test in LIT/FileCheck.Adrian Prantl2018-12-103-119/+0
| | | | | | | pexecpt-based tests are flakey because they involve timeouts and this test is eprfectly serializable. llvm-svn: 348808
* Re-commit "Introduce ObjectFileBreakpad"Pavel Labath2018-12-103-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This re-commits r348592, which was reverted due to a failing test on macos. The issue was that I was passing a null pointer for the "CreateMemoryInstance" callback when registering ObjectFileBreakpad, which caused crashes when attemping to load modules from memory. The correct thing to do is to pass a callback which always returns a null pointer (as breakpad files are never loaded in inferior memory). It turns out that there is only one test which exercises this code path, and it's mac-only, so I've create a new test which should run everywhere (except windows, as one cannot delete an executable which is being run). Unfortunately, this test still fails on linux for other reasons, but at least it gives us something to aim for. The original commit message was: This patch adds the scaffolding necessary for lldb to recognise symbol files generated by breakpad. These (textual) files contain just enough information to be able to produce a backtrace from a crash dump. This information includes: - UUID, architecture and name of the module - line tables - list of symbols - unwind information A minimal breakpad file could look like this: MODULE Linux x86_64 0000000024B5D199F0F766FFFFFF5DC30 a.out INFO CODE_ID 00000000B52499D1F0F766FFFFFF5DC3 FILE 0 /tmp/a.c FUNC 1010 10 0 _start 1010 4 4 0 1014 5 5 0 1019 5 6 0 101e 2 7 0 PUBLIC 1010 0 _start STACK CFI INIT 1010 10 .cfa: $rsp 8 + .ra: .cfa -8 + ^ STACK CFI 1011 $rbp: .cfa -16 + ^ .cfa: $rsp 16 + STACK CFI 1014 .cfa: $rbp 16 + Even though this data would normally be considered "symbol" information, in the current lldb infrastructure it is assumed every SymbolFile object is backed by an ObjectFile instance. So, in order to better interoperate with the rest of the code (particularly symbol vendors). In this patch I just parse the breakpad header, which is enough to populate the UUID and architecture fields of the ObjectFile interface. The rough plan for followup patches is to expose the individual parts of the breakpad file as ObjectFile "sections", which can then be used by other parts of the codebase (SymbolFileBreakpad ?) to vend the necessary information. Reviewers: clayborg, zturner, lemo, amccarth Subscribers: mgorny, fedor.sergeev, markmentovai, lldb-commits Differential Revision: https://reviews.llvm.org/D55214 llvm-svn: 348773
* [lldbsuite] Disable TestStopPCs when there's no XML supportStella Stamenova2018-12-061-0/+2
| | | | | | The test relies on xml support to setup the correct registers. If there's no XML support, the test is going to fail. llvm-svn: 348435
* [Expr] Fix `TestExprOptions` after r348240 on MacOS XAleksandr Urakov2018-12-041-0/+15
| | | | | | | | | | Summary: r348240 assumes that an expression contains the Objective C option if Objective C Runtime is found. But on MacOS X it seems that the test application process always contains Objective C Runtime, so the test fails when it assumes that the language is C++ only. Skip this part on Darwin. llvm-svn: 348250
* [Expr] Check the language before ignoring Objective C keywordsAleksandr Urakov2018-12-042-1/+16
| | | | | | | | | | | | | | | | | | Summary: This patch adds the check of the language before ignoring names like `id` or `Class`, which are reserved in Objective C, but are allowed in C++. It is needed to make it possible to evaluate expressions in a C++ program containing names like `id` or `Class`. Reviewers: jingham, zturner, labath, clayborg Reviewed By: jingham, clayborg Tags: #lldb Differential Revision: https://reviews.llvm.org/D54843 llvm-svn: 348240
* [Reproducers] Change how reproducers are initialized.Jonas Devlieghere2018-12-032-54/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the way the reproducer is initialized. Rather than making changes at run time we now do everything at initialization time. To make this happen we had to introduce initializer options and their SB variant. This allows us to tell the initializer that we're running in reproducer capture/replay mode. Because of this change we also had to alter our testing strategy. We cannot reinitialize LLDB when using the dotest infrastructure. Instead we use lit and invoke two instances of the driver. Another consequence is that we can no longer enable capture or replay through commands. This was bound to go away form the beginning, but I had something in mind where you could enable/disable specific providers. However this seems like it adds very little value right now so the corresponding commands were removed. Finally this change also means you now have to control this through the driver, for which I replaced --reproducer with --capture and --replay to differentiate between the two modes. Differential revision: https://reviews.llvm.org/D55038 llvm-svn: 348152
* [PDB] Support PDB-backed expressions evaluation (+ fix stuck test)Aleksandr Urakov2018-12-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch contains several small fixes, which makes it possible to evaluate expressions on Windows using information from PDB. The changes are: - several sanitize checks; - make IRExecutionUnit::MemoryManager::getSymbolAddress to not return a magic value on a failure, because callers wait 0 in this case; - entry point required to be a file address, not RVA, in the ObjectFilePECOFF; - do not crash on a debuggee second chance exception - it may be an expression evaluation crash. Also fix detection of "crushed" threads in tests; - create parameter declarations for functions in AST to make it possible to call debugee functions from expressions; - relax name searching rules for variables, functions, namespaces and types. Now it works just like in the DWARF plugin; - fix endless recursion in SymbolFilePDB::ParseCompileUnitFunctionForPDBFunc. Reviewers: zturner, asmith, stella.stamenova Reviewed By: stella.stamenova, asmith Tags: #lldb Differential Revision: https://reviews.llvm.org/D53759 llvm-svn: 348136
* Add a test to verify that lldb can load a kext binary.Jason Molenda2018-11-302-0/+260
| | | | | | <rdar://problem/46356062> llvm-svn: 348040
* Skip TestRequireHWBreakpoints on WindowsJonas Devlieghere2018-11-301-0/+4
| | | | | | | | | The test assumes that HW breakpoints are not implemented by the debug server. Windows doesn't use these and might actually support HW breakpoints so these tests are expected fail because they don't raise the expected error. llvm-svn: 348010
* [Target] Do not skip a stop on a breakpoint if a plan was completedAleksandr Urakov2018-11-303-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes the next situation. On Windows clang-cl makes no stub before the main function, so the main function is located exactly on module entry point. May be it is the same on other platforms. So consider the following sequence: - set a breakpoint on main and stop there; - try to evaluate expression, which requires a code execution on the debuggee side. Such an execution always returns to the module entry, and the plan waits for it there; - the plan understands that it is complete now and removes its breakpoint. But the breakpoint site is still there, because we also have a breakpoint on entry; - StopInfo analyzes a situation. It sees that we have stopped on the breakpoint site, and it sees that the breakpoint site has owners, and no one logical breakpoint is internal (because the plan is already completed and it have removed its breakpoint); - StopInfo thinks that it's a user breakpoint and skips it to avoid recursive computations; - the program continues. So in this situation the program continues without a stop right after the expression evaluation. To avoid this an additional check that the plan was completed was added. Reviewers: jingham, zturner, boris.ulasevich Reviewed by: jingham Tags: #lldb Differential Revision: https://reviews.llvm.org/D53761 llvm-svn: 347974
* [lldbsuite] Build with -gdwarf on WindowsStella Stamenova2018-11-291-0/+6
| | | | | | Earlier this month there was a change in clang that defaulted to using codeview rather than dwarf on Windows. Since all the tests rely on dwarf, we need to explicitly request dwarf when building on Windows. llvm-svn: 347924
* [lldb] Add GetCurrentException APIs to SBThread, add frame recognizer for ↵Kuba Mracek2018-11-281-0/+10
| | | | | | | | | | | | | | objc_exception_throw for Obj-C runtimes This adds new APIs and a command to deal with exceptions (mostly Obj-C exceptions): SBThread and Thread get GetCurrentException API, which returns an SBValue/ValueObjectSP with the current exception for a thread. "Current" means an exception that is currently being thrown, caught or otherwise processed. In this patch, we only know about the exception when in objc_exception_throw, but subsequent patches will expand this (and add GetCurrentExceptionBacktrace, which will return an SBThread/ThreadSP containing a historical thread backtrace retrieved from the exception object. Currently unimplemented, subsequent patches will implement this). Extracting the exception from objc_exception_throw is implemented by adding a frame recognizer. This also add a new sub-command "thread exception", which prints the current exception. Differential Revision: https://reviews.llvm.org/D43886 llvm-svn: 347813
* [lldbsuite] Each lldb suite test must have a unique class nameStella Stamenova2018-11-272-2/+2
| | | | | | A couple of new tests have been added that use existing class names. This causes failures on Windows if the tests run at the same time and on any platform it results in the logs being overwritten. llvm-svn: 347717
* Skip TestTargetCreateDepsJonas Devlieghere2018-11-201-1/+1
| | | | | | Skip this test because Windows deals differently with shared libraries. llvm-svn: 347283
* [lldbsuite] Invoke sed on Windows to determine the cache dir for clangStella Stamenova2018-11-191-30/+31
| | | | | | | | | | | | Summary: In order to invoke sed on Windows, we need to quote the command correctly. Since we already have commands which do that, move the definitions at the beginning of the file and then re-use them for each command. Reviewers: aprantl, zturner Subscribers: teemperor, lldb-commits Differential Revision: https://reviews.llvm.org/D54709 llvm-svn: 347243
* Revert "Implement basic DidAttach and DidLaunch for DynamicLoaderWindowsDYLD"Zachary Turner2018-11-186-103/+2
| | | | | | | This breaks many tests on Windows, which now all fail with an error such as "Unable to read memory at address <xxxxxxxx>". llvm-svn: 347174
* Just don't even attempt to invoke sed on Windows.Adrian Prantl2018-11-171-0/+5
| | | | llvm-svn: 347125
* Revert "Makefile.rules: Fix the windows-sed-quoting issue harder."Adrian Prantl2018-11-171-11/+11
| | | | llvm-svn: 347124
* Makefile.rules: Fix the windows-sed-quoting issue harder.Adrian Prantl2018-11-171-9/+11
| | | | llvm-svn: 347120
* Make TestAppleSimulatorOSType.py more flexibleFrederic Riss2018-11-171-1/+7
| | | | | | Different versions of Xcode have different outputs for the simctl command llvm-svn: 347117
* Rewrite stop-hook tests as a couple of FileCheck testsFrederic Riss2018-11-167-447/+0
| | | | | | | | Those tests were using pexpect and being flaky on some of ours bots. This patch reimplmeents the tests usinf FileCheck, and it also extends the test coverage to a few more stop-hook options. llvm-svn: 347109
* Makefile.rules: Degrade gracefully on Windows machines without sed.Adrian Prantl2018-11-161-6/+3
| | | | llvm-svn: 347104
* Use a shared module cache directory for LLDB.Adrian Prantl2018-11-161-2/+3
| | | | | | | | | | | | | This saves about 3 redundant gigabytes from the Objective-C test build directories. Tests that must do unsavory things with the LLDB clang module cache, already specify a per-test module cache in their .py test instructions. <rdar://problem/36002081> Differential Revision: https://reviews.llvm.org/D54602 llvm-svn: 347057
* Makefile.rules: Use a shared clang module cache directory.Adrian Prantl2018-11-161-1/+9
| | | | | | | | | | | | | | | Just to be safe, up until now each test used its own Clang module cache directory. Since the compiler within one testsuite doesn't change it is just as safe to share a clang module directory inside the LLDB test build directory. This saves us from compiling tens of gigabytes of redundant Darwin and Foundation .pcm files and also speeds up running the test suite quite significantly. rdar://problem/36002081 Differential Revision: https://reviews.llvm.org/D54601 llvm-svn: 347056
* Implement basic DidAttach and DidLaunch for DynamicLoaderWindowsDYLDNathan Lanza2018-11-156-2/+103
| | | | | | | | | | | | | | | Summary: This commit implements basic DidAttach and DidLaunch for the windows DynamicLoader plugin which allow us to load shared libraries from the inferior. Reviewers: sas, zturner Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D54544 llvm-svn: 346994
* Force SHELL to be cmd.exe on Windows for the test suiteNathan Lanza2018-11-151-0/+11
| | | | | | | | | | | | | | | | Summary: Windows make will search for other shells and choose those over cmd if available (e.g. C:\cygdrive\bin\sh.exe). This shell has numerous issues with path handling (/ vs \\ vs \ and C:). So default to using cmd.exe which is known to work. Reviewers: zturner, sas, xiaobai Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D54510 llvm-svn: 346993
* Port the Darwin universal binary testcase to x86_64.Adrian Prantl2018-11-152-61/+57
| | | | | | | | | Xcode 10 doesn't ship with an i386 SDK any more. This patch ports the testcase from an i386/x86_64 -> x86_64/x86_64h universal binary. rdar://problem/46099343 llvm-svn: 346981
* Add setting to require hardware breakpoints.Jonas Devlieghere2018-11-154-1/+121
| | | | | | | | | | | | | | | | When debugging read-only memory we cannot use software breakpoint. We already have support for hardware breakpoints and users can specify them with `-H`. However, there's no option to force LLDB to use hardware breakpoints internally, for example while stepping. This patch adds a setting target.require-hardware-breakpoint that forces LLDB to always use hardware breakpoints. Because hardware breakpoints are a limited resource and can fail to resolve, this patch also extends error handling in thread plans, where breakpoints are used for stepping. Differential revision: https://reviews.llvm.org/D54221 llvm-svn: 346920
* Remove the expectedFlakeyDsym decorator. It's not useful anymore.Adrian Prantl2018-11-142-7/+0
| | | | llvm-svn: 346906
* Add GDB remote packet reproducer.Jonas Devlieghere2018-11-133-0/+73
| | | | llvm-svn: 346780
* [lldb] Add synthetic frontend for _NSCallStackArrayKuba Mracek2018-11-121-2/+12
| | | | | | | | An Obj-C array type _NSCallStackArray is used in NSException backtraces. This patch adds a synthetic frontend for _NSCallStackArray, which now correctly returns frame PCs. Differential Revision: https://reviews.llvm.org/D44081 llvm-svn: 346708
OpenPOWER on IntegriCloud