summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
Commit message (Collapse)AuthorAgeFilesLines
* Make File option flags consistent for Python APIStephane Sezer2016-03-242-1/+44
| | | | | | | | | | | | | | | | | | Summary: Fixes SBCommandReturnObject::SetImmediateOutputFile() and SBCommandReturnObject::SetImmediateOutputFile() for files opened with "a" or "a+" by resolving inconsistencies between File and our Python parsing of file objects. Reviewers: granata.enrico, Eugene.Zelenko, jingham, clayborg Subscribers: lldb-commits, sas Differential Revision: http://reviews.llvm.org/D18228 Change by Francis Ricci <fjricci@fb.com> llvm-svn: 264351
* Make 'type lookup' print an error message instead of complete radio silence ↵Enrico Granata2016-03-241-0/+1
| | | | | | | | when it can't find a type matching user input It would be fun to make it provide suggestions (e.g. 'can't find NString, did you mean NSString instead?'), but this worries me a little bit on the account of just how thorough of a type system scan it would have to do llvm-svn: 264343
* Add ThreadSanitizer debugging support.Kuba Brecka2016-03-236-0/+219
| | | | | | | | | | | | This patch adds ThreadSanitizer support into LLDB: - Adding a new InstrumentationRuntime plugin, ThreadSanitizerRuntime, in the same way ASan is implemented. - A breakpoint stops in `__tsan_on_report`, then we extract all sorts of information by evaluating an expression. We then populate this into StopReasonExtendedInfo. - SBThread gets a new API, SBThread::GetStopReasonExtendedBacktraces(), which returns TSan’s backtraces in the form of regular SBThreads. Non-TSan stop reasons return an empty collection. - Added some test cases. Reviewed by Greg Clayton. llvm-svn: 264162
* Change 'apropos' such that it doesn't look into the "long help/syntax" ↵Enrico Granata2016-03-231-1/+1
| | | | | | | | | | strings for commands This solves issues such as 'apropos foo' returning valid matches just because syntax examples happen to use 'foo' as a placeholder token Fixes rdar://9043025 llvm-svn: 264123
* Fix a bug caused by my alias refactoring where, if an alias was defined in ↵Enrico Granata2016-03-223-0/+87
| | | | | | terms of another alias, trying to run the nested command would actually cause a crash in the command interpreter llvm-svn: 264096
* Add a DiagnosticManager replace error streams in the expression parser.Sean Callanan2016-03-191-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to do a better job presenting errors that occur when evaluating expressions. Key to this effort is getting away from a model where all errors are spat out onto a stream where the client has to take or leave all of them. To this end, this patch adds a new class, DiagnosticManager, which contains errors produced by the compiler or by LLDB as an expression is created. The DiagnosticManager can dump itself to a log as well as to a string. Clients will (in the future) be able to filter out the errors they're interested in by ID or present subsets of these errors to the user. This patch is not intended to change the *users* of errors - only to thread DiagnosticManagers to all the places where streams are used. I also attempt to standardize our use of errors a bit, removing trailing newlines and making clients omit 'error:', 'warning:' etc. and instead pass the Severity flag. The patch is testsuite-neutral, with modifications to one part of the MI tests because it relied on "error: error:" being erroneously printed. This patch fixes the MI variable handling and the testcase. <rdar://problem/22864976> llvm-svn: 263859
* Fix thread/process ID reading from linux core filesPavel Labath2016-03-167-0/+94
| | | | | | | | | | | | | | | | | Summary: This also adds a basic smoke test for linux core file reading. I'm checking in the core files as well, so that the tests can run on all platforms. With some tricks I was able to produce reasonably-sized core files (~40K). This fixes the first part of pr26322. Reviewers: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D18176 llvm-svn: 263628
* On some platforms, the compiler is allowed to assume that BOOL == bool. On ↵Enrico Granata2016-03-152-1/+9
| | | | | | | | | | | | others, BOOL == signed char. This can cause differences in which bit patterns end up meaning YES or NO. In general, however, 0 == NO and 1 == YES. To keep it simple, LLDB will now show "YES" and "NO" only for 1 and 0 respectively, and format other values as the plain numeric value instead. Fixes rdar://24809994 llvm-svn: 263604
* Make it so that the data formatter for NSError can see through a variable of ↵Enrico Granata2016-03-152-5/+8
| | | | | | type NSError**. Fixes rdar://25060684 llvm-svn: 263603
* Fixed MemoryCache L1 cache flushMarianne Mailhot-Sarrasin2016-03-113-0/+81
| | | | | | | | Use the same method to find the cache line as in Read(). Differential Revision: http://reviews.llvm.org/D18050 llvm-svn: 263233
* [LLDB][MIPS] Fix TestDisassembleBreakpointMohit K. Bhakkad2016-03-071-1/+1
| | | | | | | | | | Patch by Nitesh Jain Reviewers: clayborg, jaydeep. Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D17597 llvm-svn: 262819
* Revert a part of "Add/Improve complex, vector, aggregate types handling for ↵Pavel Labath2016-02-291-3/+3
| | | | | | | | | | | | SysV ARM (hard/soft) ABI." This partially reverts commit r262218. The commit added additional checks to a test case. The test case is too big so it's not feasible to XFAIL it completely. Suggest to implement the checks as a separate test case, which can then be XFAILed more surgically. llvm-svn: 262223
* Add/Improve complex, vector, aggregate types handling for SysV ARM ↵Omair Javaid2016-02-291-3/+3
| | | | | | | | | | (hard/soft) ABI. For details see: Differential revision: http://reviews.llvm.org/D17708 llvm-svn: 262218
* [LLDB][MIPS] Fix TestInferiorAssert.py for MIPSSagar Thakur2016-02-261-0/+4
| | | | | | | | | | | Patch by Nitesh Jain. Summary: The debug version of libc.so is require for backtracing which may not be available on all platforms. Reviewers: ovyalov, clayborg Subscribers: zturner, lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep Differential: http://reviews.llvm.org/D17131 llvm-svn: 262011
* Get register context for the 32-bit process in a WoW64 process minidumpAdrian McCarthy2016-02-253-0/+107
| | | | | | | | | | | | 32-bit processes on 64-bit Windows run in a layer called WoW64 (Windows-on-Windows64). If you capture a mini dump of such a process from a 32-bit debugger, you end up with a register context for the 64-bit WoW64 process rather than the 32-bit one you probably care about. This detects WoW64 by looking to see if there's a module named wow64.dll loaded. For such processes, it then looks in the 64-bit Thread Environment Block (TEB) to locate a copy of the 32-bit CONTEXT record that the plugin needs for the register context. Added some rudimentary tests. I'd like to improve these later once we figure out how to get the exception information from these mini dumps. Differential Revision: http://reviews.llvm.org/D17465 llvm-svn: 261808
* xfail case sensitivity test on Linux.Zachary Turner2016-02-241-0/+1
| | | | | | | | | | | | There are two tests in this file. One which only runs on Windows and tests that you can set a breakpoint with mismatched case. And another that only runs on non-Windows and tests that you cannot set a breakpoint with mismatched case. This latter test is failing on non Windows platforms for some reason. It could be that the test is just written incorrectly, as I think the actual functionality actually works correctly on non-Windows platforms. llvm-svn: 261800
* Some fixes for case insensitive paths on Windows.Zachary Turner2016-02-243-0/+134
| | | | | | | | | | | | | | | | | | | Paths on Windows are not case-sensitive. Because of this, if a file is called main.cpp, you should be able to set a breakpoint on it by using the name Main.cpp. In an ideal world, you could just tell people to match the case, but in practice this can be a real problem as it requires you to know whether the person who compiled the program ran "clang++ main.cpp" or "clang++ Main.cpp", both of which would work, regardless of what the file was actually called. This fixes http://llvm.org/pr22667 Patch by Petr Hons Differential Revision: http://reviews.llvm.org/D17492 Reviewed by: zturner llvm-svn: 261771
* Remove expectedFailureFreeBSD decoratorEd Maste2016-02-1910-14/+14
| | | | | | | | All invocations are updated to use the generic expectedFailureAll. Differential Revision: http://reviews.llvm.org/D17455 llvm-svn: 261355
* Remove XFAIL from test passing on FreeBSDEd Maste2016-02-191-1/+0
| | | | | | | | | | | There is a report in the PR from several months ago that it failed intermittently, but it is passing consistently for me on FreeBSD 10 and 11. We can re-add a decorator if further testing shows it is still flakey. llvm.org/pr17214 llvm-svn: 261340
* Remove XFAIL from test passing on FreeBSDEd Maste2016-02-191-1/+0
| | | | | | | | This is passing for me consistently on FreeBSD 10 and FreeBSD 11. llvm.org/pr15989 llvm-svn: 261339
* Remove expectedFlakeyFreeBSD decorator for prompt settingEd Maste2016-02-181-1/+0
| | | | | | | | | The race condition/use after free involved in setting long prompts appears to be fixed now (although I do not know which commit fixed it). llvm.org/pr22611 llvm-svn: 261266
* Add target and host platform enumerations so we're not using strings.Zachary Turner2016-02-182-2/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D17088 llvm-svn: 261241
* Bump up timeout in TestChangeProcessGroupPavel Labath2016-02-161-1/+1
| | | | | | | The test fails very rarely. I suspect this is simply because the inferior does not have enough time to create the file under heavy load. llvm-svn: 260951
* [TestLibCxxAtomic] Skip for GCC.Siva Chandra2016-02-131-0/+1
| | | | | | | | | | | | Summary: This is the form on other libc++ tests. Reviewers: sivachandra Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17230 llvm-svn: 260793
* [TestLibCxxAtomic] Fix Makefile so that the test builds on Linux.Siva Chandra2016-02-131-0/+1
| | | | | | | | | | Reviewers: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17227 llvm-svn: 260770
* Data formatter support for libc++ std::atomic<T>Enrico Granata2016-02-123-0/+81
| | | | | | | | | | On libc++ std::atomic is a fairly simple data type (layout wise, at least), wrapping actual contents in a member variable named "__a_" All the formatters are doing is "peel away" this intermediate layer and exposing user data as direct children or values of the std::atomic root variable Fixes rdar://24329405 llvm-svn: 260752
* The data formatters for NSArray, NSDictionary and (only partially) NSSet ↵Enrico Granata2016-02-124-64/+1
| | | | | | | | | | | | | | | | | contain logic to inspect the objects without running code. However, they also contain fallback logic that - in cases where LLDB can't recognize the specific subclass - actually does run code in order to inspect those objects. The argument for this logic was that these data types are critical enough that the risk of getting it wrong is outweighed by the advantage of always providing accurate child information. Practical experience however shows that "po" - a code running data-inspection command - is quite frequently used, and not considered burdensome by users. As such, this makes the code-running fallback in the data formatters a risk that carries very little actual reward. Also, unlike the time this code was originally written, we now have accurate class information for Objective-C, and thus we are less likely to improperly identify classes. This commit removes support for the code-running fallback, and aligns the data formatters for NSArray, NSDictionary and NSSet to the general no-code-running behavior of other data formatters. While it is possible for us to add support for some subclasses that are now no longer covered by static inspection alone, this is beyond the scope of this commit. llvm-svn: 260664
* When calling TypeSystemMap::Clear, objects being destroyed in the process of Jim Ingham2016-02-121-17/+16
| | | | | | | | | | | | | | | | | clearing the map ended up calling back into the TypeSystemMap to do lookups. Not a good idea, and in this case it would cause a deadlock. You would only see this when replacing the target contents after an exec, and only if you had stopped before the exec, evaluated an expression, then continued on to the point where you did the exec. Fixed this by making sure the TypeSystemMap::Clear tears down the TypeSystems in the map before clearing the map. I also add an expression before exec to the TestExec.py so that we'll catch this issue if it crops up again in the future. <rdar://problem/24554920> llvm-svn: 260624
* XFAIL TestCommandScriptImmediateOutput on FreeBSD alsoEd Maste2016-02-111-1/+1
| | | | llvm-svn: 260589
* Remove expectedFailureLinux decorator.Zachary Turner2016-02-1017-48/+46
| | | | llvm-svn: 260422
* [LLDB][MIPS] Generalise MIPS arch namesMohit K. Bhakkad2016-02-103-3/+3
| | | | | | | | | | Patch by Nitesh Jain Reviewers: clayborg, jaydeep. Subscribers: zturner, bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D16840 llvm-svn: 260362
* Remove skipIf<compiler> decorators.Zachary Turner2016-02-0912-12/+12
| | | | | | | These were supposed to have been removed in a previous patch, but I missed them. llvm-svn: 260291
* Remove decorators related to debug info types.Zachary Turner2016-02-091-1/+1
| | | | | | All existing usages were ported over to the common decorators. llvm-svn: 260290
* Delete all the xfail / skip decorators for specific compilers.Zachary Turner2016-02-098-9/+9
| | | | | | Ported everything over to using expectedFailureAll. llvm-svn: 260289
* Remove expected failure and skip decorators for host os.Zachary Turner2016-02-096-37/+37
| | | | | | | All decorator invocations are updated to use the generic expectedFailureAll and skipIf decorators. llvm-svn: 260288
* Remove skipIfHostPlatform and skipUnlessHostPlatform decorators.Zachary Turner2016-02-092-4/+4
| | | | llvm-svn: 260177
* Remove the skipUnlessArch decorator.Zachary Turner2016-02-091-7/+7
| | | | | | Convert everything over to using skipIf. llvm-svn: 260176
* A number of improvements to decorator conditionals.Zachary Turner2016-02-082-2/+2
| | | | | | | | | | | | | | | | | | | * Change the `not_in` function to be called `no_match`. This makes it clear that keyword arguments can be more than just lists. * Change the name of `_check_list_or_lambda` to `_match_decorator_property`. Again clarifying that decorator params are not always lists. * Always use a regex match when matching strings. This allows automatic support for regex matching on all decorator properties. Also support compiled regex values. * Fix a bug in the compiler check used by _decorateTest. The two arguments were reversed, the condition was always wrong. * Change one test that uses skipUnlessArch to use skipIf, to demonstrate that skipIf can now handle more scenarios. Differential Revision: http://reviews.llvm.org/D16938 llvm-svn: 260135
* Remove expectedFailureWindows decorator.Zachary Turner2016-02-0846-78/+78
| | | | | | | | | | | | | | | expectedFailureWindows is equivalent to using the general expectedFailureAll decorator with oslist="windows". Additionally, by moving towards these common decorators we can solve the issue of having to support decorators that can be called with or without arguments. Once all decorators are always called with arguments, and this is enforced by design (because you can't specify the condition you're decorating for without passing an argument) the implementation of the decorators can become much simpler Differential Revision: http://reviews.llvm.org/D16936 llvm-svn: 260134
* Fix an issue where certain CommandObjects (or Options thereof) were being ↵Enrico Granata2016-02-061-0/+48
| | | | | | | | | | created once, bound to a specific CommandInterpreter (and hence a specific Debugger), and then cached for reuse across different Debugger instances Obviously, if the original Debugger goes away, those commands are holding on to now stale memory, which has the potential to cause crashes Fixes rdar://24460882 llvm-svn: 259964
* Move the rest of the tests over to using the new decorator module.Zachary Turner2016-02-04134-150/+301
| | | | llvm-svn: 259838
* Move some of the common decorators to decorators.py.Zachary Turner2016-02-0410-12/+20
| | | | | | | | | | | | This doesn't attempt to move every decorator. The reason for this is that it requires touching every single test file to import decorators.py. I would like to do this in a followup patch, but in the interest of keeping the patches as bite-sized as possible, I've only attempted to move the underlying common decorators first. A few tests call these directly, so those tests are updated as part of this patch. llvm-svn: 259807
* The SetStopInfo from a Mach Exception was setting the stopJim Ingham2016-02-031-1/+0
| | | | | | | | | | reason to None when we stop due to a trace, then noticed that we were on a breakpoint that was not valid for the current thread. That should actually have set it back to trace. This was pr26441 (<rdar://problem/24470203>) llvm-svn: 259684
* Move some android platform functions to lldbplatformutil.Zachary Turner2016-02-031-4/+4
| | | | | | | | | | | | | | | | | | | My eventual goal is to move all of the test decorators to their own module such as `decorators.py`. But some of the decorators use existing functions in `lldbtest.py` and conceptually the functions are probably more appropriately placed in lldbplatformutil. Moreover, lldbtest.py is a huge file with a ton of random utility functions scattered around, so this patch also workds toward the goal of reducing the footprint of this one module to a more reasonable size. So this patch moves some of them over to lldbplatformutil with the eventual goal of moving decorators over to their own module. Reviewed By: Tamas Berghammer, Pavel Labath Differential Revision: http://reviews.llvm.org/D16830 llvm-svn: 259680
* Remove skipUnlessListedRemote test decoratorPavel Labath2016-02-031-5/+0
| | | | | | | | | | | | | | This decorator was used in only one test, and it's behaviour was quite complicated. It skipped if: - test was remote - platform was *not* android I am not aware of anyone running tests with this configuration (and even then, I am not aware of a reason why the test should not pass), but if TestLoadUnload starts breaking for you after this commit, please disable the test with @expectedFailureAll(remote=True, oslist=[YOUR_PLATFORM]) llvm-svn: 259642
* Fix inverted conditional in TestInferiorAssert.pyZachary Turner2016-02-021-2/+2
| | | | llvm-svn: 259608
* Don't return a tuple from the skip test function.Zachary Turner2016-02-022-3/+3
| | | | | | | | | | | Previously we were returning a tuple of (bool, skip_reason) from the tuple function. This makes for some awkward code, especially since a value of True for the first argument implies that the second argument is None, and a value of False implies that the second argument is not None. So it was basically redundant, and with this patch we simply return the skip reason or None directly. llvm-svn: 259590
* XFAIL TestConsecutiveBreakpoints.test_single_step_thread_specific on OSXPavel Labath2016-02-021-0/+1
| | | | llvm-svn: 259527
* skip TestWatchLocation on OS XTodd Fiala2016-02-021-0/+1
| | | | | | | | Skipping this test while I investigate. It started failing with r259379. (It is generating an error due to unicode decode issues.) llvm-svn: 259526
* Remove redundant test in TestExitDuringStepPavel Labath2016-02-021-12/+4
| | | | | | | | | After recent changes, test_thread_state_is_stopped has become equivalent to test_step_in, as the function exit_during_step_base was not using the "test_thread_state" parameter. As test was XFAILed on all platforms anyway, and we have other tests for the bug which it (used to) test, I am simply removing the function. llvm-svn: 259517
OpenPOWER on IntegriCloud