summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix typoAdrian Prantl2018-12-201-2/+2
| | | | llvm-svn: 349861
* [lldb] Add a "display-recognized-arguments" target setting to show ↵Kuba Mracek2018-12-201-3/+18
| | | | | | | | recognized arguments by default Differential Revision: https://reviews.llvm.org/D55954 llvm-svn: 349856
* Disable a few tests on the green dragon sanitzier bot.Adrian Prantl2018-12-203-0/+10
| | | | | | | | These are tests that found actual, but hard to fix, bugs that are tracked elsewhere. Leaving them red only distracts from new failures this bot finds. llvm-svn: 349851
* [lldbsuite] Un-xfail several tests in TestInferiorCrashing on WindowsStella Stamenova2018-12-201-21/+4
| | | | | | Several of the tests are now passing. This change is enabling them. llvm-svn: 349813
* [lldbsuite] Un-xfail TestMiniDump and TestThreadJumpStella Stamenova2018-12-202-2/+0
| | | | | | Both of these are now passing. I've resolved the bugs as well for verification. llvm-svn: 349783
* [lldbsuite] Un-xfail TestEvents on WindowsStella Stamenova2018-12-201-3/+0
| | | | | | There are a couple of tests in TestEvents that are now passing. llvm-svn: 349781
* [lldbsuite] Skip TestConflictingSymbol (test_shadowed) on WindowsStella Stamenova2018-12-201-0/+1
| | | | | | The test is "passing" on windows, but it is a false positive. Skip it on Windows until it is fixed on all platforms. llvm-svn: 349775
* Overload GetMemoryRegions for the ProcessMinidumpTatyana Krasnukha2018-12-201-0/+62
| | | | | | Differential Revision: https://reviews.llvm.org/D55841 llvm-svn: 349767
* [lldbsuite] Un-xfail TestRedefinitionsInInlines on WindowsStella Stamenova2018-12-201-6/+4
| | | | llvm-svn: 349722
* [lldbsuite] Un-xfail TestDataFormatterSynthVal on WindowsStella Stamenova2018-12-201-3/+0
| | | | llvm-svn: 349721
* [lldbsuite] Un-xfail tests on Windows that are now passing (pt.5)Stella Stamenova2018-12-206-18/+5
| | | | | | This is a set of tests that were all marked as failing becuse of pr24764. 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: 349719
* [lldb] Retrieve currently handled Obj-C exception via ↵Kuba Mracek2018-12-203-17/+128
| | | | | | | | | | | | __cxa_current_exception_type and add GetCurrentExceptionBacktrace SB ABI This builds on https://reviews.llvm.org/D43884 and https://reviews.llvm.org/D43886 and extends LLDB support of Obj-C exceptions to also look for a "current exception" for a thread in the C++ exception handling runtime metadata (via call to __cxa_current_exception_type). We also construct an actual historical SBThread/ThreadSP that contains frames from the backtrace in the Obj-C exception object. The high level goal this achieves is that when we're already crashed (because an unhandled exception occurred), we can still access the exception object and retrieve the backtrace from the throw point. In Obj-C, this is particularly useful because a catch+rethrow is very common and in those cases you currently don't have any access to the throw point backtrace. Differential Revision: https://reviews.llvm.org/D44072 llvm-svn: 349718
* [lldbsuite] Un-xfail tests on Windows that are now passing (pt.4)Stella Stamenova2018-12-2014-41/+2
| | | | | | This is a set of tests that were all marked as failing becuse of several different bugs. A couple of the bugs are now resolved as fixed since all the tests that were failing associated with the bug are now 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: 349713
* [lldbsuite] Un-xfail tests on Windows that are now passing (pt.3)Stella Stamenova2018-12-205-12/+4
| | | | | | This is a set of tests that were all marked as failing becuse of several different bugs. A couple of the bugs are now resolved as fixed since all the tests that were failing associated with the bug are now 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: 349711
* [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
OpenPOWER on IntegriCloud