summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
* This doesn't compiler on Darwin. Skipping it.Greg Clayton2016-07-121-0/+1
| | | | llvm-svn: 275225
* [test] Fix category-based skippingPavel Labath2016-07-121-2/+0
| | | | | | | | | | | | | | | Summary: LLDBTestResult.hardMarkAsSkipped marked the whole class as skipped when the first class in the test failed the category check. This meant that subsequent tests in the same class did not run even if they were passing the category filter. Fix that. Reviewers: tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D22213 llvm-svn: 275173
* Fix an issue where one could not define a Python command with the same name ↵Enrico Granata2016-07-113-0/+49
| | | | | | as an existing alias (or rather, one could but the results of invoking the command were far from satisfactory) llvm-svn: 275080
* When calling "settings set target.source-map <old-path> <new-path>", make ↵Greg Clayton2016-07-081-0/+4
| | | | | | | | | | sure that <new-path> exists before accepting it as a remapping. We had some clients that had added old source paths remappings to their .lldbinit files and they were causing trouble at a later date. This fix should help mitigate these issues. <rdar://problem/26358860> llvm-svn: 274948
* Bump up timeout in TestCallWithTimeoutPavel Labath2016-07-071-2/+2
| | | | | | remote targets need a bit more time to get their act together llvm-svn: 274762
* Fix for PrintStackTracesRavitheja Addepally2016-07-073-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The issue arises due to the wrong unwinder used for the first stack frame, where the default unwinder returns erroneous frame whereas the fallback would have given the correct frame had it been used. The following fix consists of two parts -> 1) The first part changes the unwinding strategy, earlier the default unwinder was used to get 2 more stack frames and if it failed a fallback unwinder was used. Now we try to obtain as many frames (max 10) as we can get from default unwinder and also fallback unwinder and use the one that gives more number of frames. 2) Normally unwindplans are assosciated with functions and the row to be used is obtained from the offset (obtained from the low_pc of the function symbol). Sometimes it may occur that the unwindplan is assosciated to the complete Elf section in which case the offset calculation would be wrong as the debugger uses the same offset originally obtained from the function symbol. Hence this offset is recalculated. Reviewers: tberghammer, lldb-commits, labath, jasonmolenda Subscribers: jingham Differential Revision: http://reviews.llvm.org/D21221 llvm-svn: 274750
* Implement GetMemoryRegions() for Linux and Mac OSX core files.Howard Hellyer2016-07-071-7/+68
| | | | | | | | | | | | | | | Summary: This patch fills in the implementation of GetMemoryRegions() on the Linux and Mac OS core file implementations of lldb_private::Process (ProcessElfCore::GetMemoryRegions and ProcessMachCore::GetMemoryRegions.) The GetMemoryRegions API was added under: http://reviews.llvm.org/D20565 The patch re-uses the m_core_range_infos list that was recently added to implement GetMemoryRegionInfo in both ProcessElfCore and ProcessMachCore to ensure the returned regions match the regions returned by Process::GetMemoryRegionInfo(addr_t load_addr, MemoryRegionInfo &region_info). Reviewers: clayborg Subscribers: labath, lldb-commits Differential Revision: http://reviews.llvm.org/D21751 llvm-svn: 274741
* Add data formatter for libstdc++ shared_ptr and weak_ptrTamas Berghammer2016-07-063-0/+80
| | | | | | Differential revision: http://reviews.llvm.org/D21984 llvm-svn: 274617
* Fixed a bug where we report a single type multiple times in namespaces.Sean Callanan2016-07-058-0/+156
| | | | | | | | Also added a testcase. <rdar://problem/22786569> llvm-svn: 274580
* Split TestTemplateIntegerArgs test into twoPavel Labath2016-07-041-14/+17
| | | | | | | | | | | | | | | | Summary: One of the tests there does not work with gcc, so I'm spinning that off into a separate test, so that we can XFAIL it with more granularity. I am also renaming the test to reflect the fact that it no longer tests only integer arguments. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D21923 llvm-svn: 274505
* Enable test log collection from remote debug servers (take 2)Pavel Labath2016-07-042-42/+47
| | | | | | | | | | | | | | | | | | Summary: This is a slightly reworked version of D16322, which I had reverted because it did not do what it advertised. Differences from the previous version are: - moved the code for cleaning up the remote working dir to a later point as it was removing the log file before we could get to it. - specialised log downloading code for gdb-remote tests is not needed, as this will cover that use case as well. Reviewers: tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D21898 llvm-svn: 274491
* Join TestTlsGlobal tests again and use the proper decoratorPavel Labath2016-07-041-12/+2
| | | | llvm-svn: 274490
* Fixed thread local storage test case to run normally with no expected fail ↵Greg Clayton2016-07-011-2/+12
| | | | | | for Darwin, always skip on windows, and expected fail for all other OSs while mentioning the new bug I filed to track fixing TLS variables: https://llvm.org/bugs/show_bug.cgi?id=28392 llvm-svn: 274393
* Thread local storage was already broken on Linux and the tests were passing ↵Greg Clayton2016-07-011-0/+1
| | | | | | | | | | | because there was a dectorator: @unittest2.expectedFailure("rdar://7796742") Which was covering up the fact this was failing on linux and hexagon. I added back a decorator so we don't break any build bots. llvm-svn: 274388
* Added support for thread local variables on all Apple OS variants.Greg Clayton2016-07-013-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had support that assumed that thread local data for a variable could be determined solely from the module in which the variable exists. While this work for linux, it doesn't work for Apple OSs. The DWARF for thread local variables consists of location opcodes that do something like: DW_OP_const8u (x) DW_OP_form_tls_address or DW_OP_const8u (x) DW_OP_GNU_push_tls_address The "x" is allowed to be anything that is needed to determine the location of the variable. For Linux "x" is the offset within the TLS data for a given executable (ModuleSP in LLDB). For Apple OS variants, it is the file address of the data structure that contains a pthread key that can be used with pthread_getspecific() and the offset needed. This fix passes the "x" along to the thread: virtual lldb::addr_t lldb_private::Thread::GetThreadLocalData(const lldb::ModuleSP module, lldb::addr_t tls_file_addr); Then this is passed along to the DynamicLoader::GetThreadLocalData(): virtual lldb::addr_t lldb_private::DynamicLoader::GetThreadLocalData(const lldb::ModuleSP module, const lldb::ThreadSP thread, lldb::addr_t tls_file_addr); This allows each DynamicLoader plug-in do the right thing for the current OS. The DynamicLoaderMacOSXDYLD was modified to be able to grab the pthread key from the data structure that is in memory and call "void *pthread_getspecific(pthread_key_t key)" to get the value of the thread local storage and it caches it per thread since it never changes. I had to update the test case to access the thread local data before trying to print it as on Apple OS variants, thread locals are not available unless they have been accessed at least one by the current thread. I also added a new lldb::ValueType named "eValueTypeVariableThreadLocal" so that we can ask SBValue objects for their ValueType and be able to tell when we have a thread local variable. <rdar://problem/23308080> llvm-svn: 274366
* Skip TestDisassembleRawData when remoteFrancis Ricci2016-07-011-0/+1
| | | | | | | | | | | | | | | Summary: As this test will create a new target, it will cause all following tests to fail when running in platform mode, if the new target does not match the existing architecture (for example, x86 vs x86_64). Reviewers: zturner, spyffe, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D21906 llvm-svn: 274364
* Removed the redundant "%d errors parsing expression" error. Nobody keeps score.Sean Callanan2016-06-301-2/+2
| | | | | | <rdar://problem/24306284> llvm-svn: 274254
* Correct watchpoint size test failure on certain devicesOmair Javaid2016-06-301-3/+3
| | | | | | | I overlooked the possibility of certain targets translating increment statement into a read and write. In this case we replace increment statement with an assignment. llvm-svn: 274215
* XFAIL tests which fail with gcc on linuxPavel Labath2016-06-293-1/+3
| | | | llvm-svn: 274116
* fix invalid assumption about the executable module in Target::Install()Todd Fiala2016-06-271-0/+1
| | | | | | | | | | | | | | | Target::Install() was assuming the module at index 0 was the executable. This is often true, but not guaranteed to be the case. The TestInferiorChanged.py test highlighted this when run against iOS. After the binary is replaced in the middle of the test, it becomes the last module in the list. The rest of the Target::Install() logic then clobbers the executable file by using whatever happens to be the first module in the target module list. This change also marks the TestInferiorChanged.py test as a no-debug-info test. llvm-svn: 273960
* Made templates that have Enumeration values as arguments work correctly.Greg Clayton2016-06-242-1/+69
| | | | | | | | | | We were checking for integer types only before this. So I added the ability for CompilerType objects to check for integer and enum types. Then I searched for places that were using the CompilerType::IsIntegerType(...) function. Many of these places also wanted to be checking for enumeration types as well, so I have fixed those places. These are in the ABI plug-ins where we are figuring out which arguments would go in where in regisers/stack when making a function call, or determining where the return value would live. The real fix for this is to use clang to compiler a CGFunctionInfo and then modify the code to be able to take the IR and a calling convention and have the backend answer the questions correctly for us so we don't need to create a really bad copy of the ABI in each plug-in, but that is beyond the scope of this bug fix. Also added a test case to ensure this doesn't regress in the future. llvm-svn: 273750
* Don't run TestImageListMultiArchitecture during remote test suiteFrancis Ricci2016-06-241-0/+1
| | | | | | | | | | Reviewers: zturner, clayborg, tfiala Subscribers: sas, lldb-commits Differential Revision: http://reviews.llvm.org/D21648 llvm-svn: 273720
* Added a test case for bitfield ivars. It currently fails.Sean Callanan2016-06-242-0/+56
| | | | | | <rdar://problem/17990991> llvm-svn: 273718
* Fix an issue where LLDB would show the key and value of a single entry ↵Enrico Granata2016-06-243-0/+82
| | | | | | | | NSDictionary in the wrong order Fixes rdar://26478641 llvm-svn: 273695
* Handle variadic Objective-C methods from DWARF correctly.Sean Callanan2016-06-242-0/+35
| | | | | | <rdar://problem/22039804> llvm-svn: 273632
* Don't run the top-level expression test case with -gmodules.Sean Callanan2016-06-231-1/+1
| | | | | | <rdar://problem/26563587> llvm-svn: 273622
* Test that lldb calls the right 'printf' even when a 'printf' method exists.Sean Callanan2016-06-202-0/+25
| | | | | | This test is currently failing. We have a bug for it, as noted. llvm-svn: 273211
* Allow installing watchpoints at less than 8-byte alligned addresses for ↵Omair Javaid2016-06-163-0/+188
| | | | | | | | | | | | AArch64 targets This patch allows LLDB for AArch64 to watch all bytes, words or double words individually on non 8-byte alligned addresses. This patch also adds tests to verify this functionality. Differential revision: http://reviews.llvm.org/D21280 llvm-svn: 272916
* xfail TestWithModuleDebugging.py on macOSTodd Fiala2016-06-161-0/+1
| | | | | | | Tracked by: https://llvm.org/bugs/show_bug.cgi?id=28156 llvm-svn: 272902
* Fixed C++ template integer parameter types to work correctly when the ↵Greg Clayton2016-06-103-0/+94
| | | | | | | | | | | | integer type is signed. Prior to this we would display the typename for "TestObj<-1>" as "TestObj<4294967295>" when we showed the type. Expression parsing could also fail because we would fail to find the mangled name when evaluating expressions. The issue was we were losing the signed'ness of the template integer parameter in DWARFASTParserClang.cpp. <rdar://problem/25577041> llvm-svn: 272434
* Enable some tests on linuxPavel Labath2016-06-097-9/+5
| | | | | | | | | This enables a couple of tests which have been shown to run reliably on the linux x86 buildbot. If you see a failure after this commit, feel free to add the xfail back, but please make it as specific as possible (i.e., try to make it not cover i386/x86_64 with clang-3.5, clang-3.9 or gcc-4.9). llvm-svn: 272326
* Add a test for the failure described by pr28055. Mark it as xfail.Jim Ingham2016-06-082-0/+68
| | | | llvm-svn: 272189
* Revert "Make lldbinline.py regenerate the Makefile each time it builds."Pavel Labath2016-06-0710-91/+17
| | | | | | This reverts commit r272024 as it is not windows-compatible. llvm-svn: 272062
* Make lldbinline.py regenerate the Makefile each time it builds.Sean Callanan2016-06-0710-17/+91
| | | | | | | | | | | | | If a lldbinline test's source file changed language, then the Makefile wasn't updated. This was a problem if the Makefile was checked into the repository. Now lldbinline.py always regenerates the Makefile and asserts if the newly-generated version is not the same as the one already there. This ensures that the repository will never be out of date without a buildbot failing. http://reviews.llvm.org/D21032 llvm-svn: 272024
* Fix makefile for TestExternCSymbolsTamas Berghammer2016-06-031-1/+1
| | | | llvm-svn: 271618
* Fixed a problem where we couldn't call extern "C" functions.Sean Callanan2016-06-023-0/+36
| | | | | | | | | | | | | Some compilers do not mark up C++ functions as extern "C" in the DWARF, so LLDB has to fall back (if it is about to give up finding a symbol) to using the base name of the function. This fix also ensures that we search by full name rather than "auto," which could cause unrelated C++ names to be found. Finally, it adds a test case. <rdar://problem/25094302> llvm-svn: 271551
* [tsan] Prefer mangled name looking up variable declaration for racy addressDevin Coughlin2016-06-013-0/+98
| | | | | | | | | | | | | | | | For Thread Sanitizer reports, LLDB tries to find a global variable declaration corresponding to the racy address in order to provide a filename and line number. This commit changes the lookup of the variable to use the mangled name for lookup and fall back to the demangled version if unavailable. This is needed to report locations of races on Swift global variables. I've also added a test to make sure we look up C++ globals correctly. rdar://problem/26459401 Differential Revision: http://reviews.llvm.org/D20760 llvm-svn: 271433
* Add "-gmodules" support to the test suite.Todd Fiala2016-05-2612-29/+78
| | | | | | | | | | | | | | This change adds the capability of building test inferiors with the -gmodules flag to enable module debug info support. Windows is excluded per @zturner. Reviewers: granata.enrico, aprantl, zturner, labath Subscribers: zturner, labath, lldb-commits Differential Revision: http://reviews.llvm.org/D19998 llvm-svn: 270848
* Avoid using stdio in TestVirtualPavel Labath2016-05-262-20/+22
| | | | | | | | | | | | | | Summary: using stdio in tests does not work on windows, and it is not completely reliable on linux. Avoid using stdio in this test, as it is not necessary for this purpose. Reviewers: clayborg Subscribers: lldb-commits, zturner Differential Revision: http://reviews.llvm.org/D20567 llvm-svn: 270831
* It has been brought to my attention that, given two variablesEnrico Granata2016-05-252-6/+9
| | | | | | | | | | | | | | | | | T x; U y; doing x = *((T*)y) is undefined behavior, even if sizeof(T) == sizeof(U), due to pointer aliasing rules Fix up a couple of places in LLDB that were doing this, and transform them into a defined and safe memcpy() operation Also, add a test case to ensure we didn't regress by doing this w.r.t. tagged pointer NSDate instances llvm-svn: 270793
* Mark some aarch64-linux specific xfails marking bug entriesOmair Javaid2016-05-253-2/+3
| | | | | | | | TestBSDArchives.py and TestWatchLocation.py fail due to unicode error and bug has already been reported for arm and macOSx. TestConstVariables.py fails because lldb cant figure out frame variable type when used in expr. llvm-svn: 270780
* Fix an issue where LLDB would crash if one tried to 'frame variable' an ↵Enrico Granata2016-05-251-0/+1
| | | | | | | | unordered_map more than once in a stop due to the synthetic provider not properly caching the ValueObjects it was returning for the child elements Fixes rdar://26470909 llvm-svn: 270752
* Mark some arm-linux specific xfails marking bug entriesOmair Javaid2016-05-254-1/+5
| | | | | | | | TestCallUserAnonTypedef.py and TestIRInterpreter.py fail to limitation of JIT expressions in handling hard float ABI targets. TestBSDArchives.py fails due to python unicode error. TestBuiltinTrap.py fails due to wrong line information generated by some gcc versions. llvm-svn: 270745
* xfail TestRedefinitionsInline with older ClangEd Maste2016-05-241-1/+2
| | | | | | | | This fails on FreeBSD 10 with the system compiler, Clang 3.4.1. llvm.org/pr27845 llvm-svn: 270603
* Make sure TestRedefinitionsInInlines.py actually inlines.Chaoren Lin2016-05-231-2/+2
| | | | | | | | | | Reviewers: spyffe Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20540 llvm-svn: 270493
* xfail TestRedefinitionsInline on Windows.Zachary Turner2016-05-231-1/+1
| | | | llvm-svn: 270490
* Removed the m_decl_objects map from ClangASTContext.Sean Callanan2016-05-232-0/+23
| | | | | | | | | | | | | m_decl_objects is problematic because it assumes that each VarDecl has a unique variable associated with it. This is not the case in inline contexts. Also the information in this map can be reconstructed very easily without maintaining the map. The rest of the testsuite passes with this cange, and I've added a testcase covering the inline contexts affected by this. <rdar://problem/26278502> llvm-svn: 270474
* Always rerun all tests on Windows.Zachary Turner2016-05-231-0/+1
| | | | | | | | There is flakiness somewhere in the core infrastructure on Windows, so to get the buildbot reliably green we need to mark all tests as flaky. llvm-svn: 270460
* Reword ThreadSanitizer message for invalid mutex reports.Kuba Brecka2016-05-221-1/+1
| | | | llvm-svn: 270364
* Fix error propagation from the Z0 packet in gdb-remote breakpoint setting.Jim Ingham2016-05-191-0/+77
| | | | | | | | | | | | | The error was not getting propagated to the caller, so the higher layers thought the breakpoint was successfully set & resolved. I added a testcase, but it assumes 0x0 is not a valid place to set a breakpoint. On most systems that is true, but if it isn't true of your system, either find another good place and add it to the test, or x-fail the test. <rdar://problem/26345962> llvm-svn: 270014
OpenPOWER on IntegriCloud