summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command
Commit message (Collapse)AuthorAgeFilesLines
* remove FreeBSD xfail decorator from TestCallStdStringFunctionEd Maste2017-08-101-3/+0
| | | | | | | | | | | This test is consistently reporting unexpected pass for me on FreeBSD 10 and 12. It was failing on the old FreeBSD buildbot which has now been retired for some time. Will investigate further if this fails once a new buildbot is configured and running tests. llvm.org/pr17807 llvm-svn: 310626
* Convert a few more tests to use run_to_source_breakpoint.Jim Ingham2017-07-131-26/+2
| | | | llvm-svn: 307943
* Working through testcases, converting to run_to_source_breakpoint.Jim Ingham2017-07-065-99/+14
| | | | llvm-svn: 307287
* Add a lldbutils routine that gathers up the boiler-plateJim Ingham2017-07-064-84/+9
| | | | | | | | | | to make a target, set a source regex breakpoint, run to the breakpoint and find the thread that hit the breakpoint. Start the process of replacing the boiler plate with this routine. llvm-svn: 307234
* Mark TestCallThatRestarts as flaky on androidPavel Labath2017-06-131-0/+2
| | | | | | | | | | | | | This test started being flaky since r303848 (RunThreadPlan: Fix halting logic in IgnoreBreakpoints = false). I am not reverting that, as I am confident that actually fixed a problem. A more likely explanation is that there is still one corner case that is not handled correctly there. Marking the test as flaky until I get a chance to investigate. I also mark the test as no-debug-info-dependend -- it stresses expression evaluation, as far as debug info goes, the test if extremely simple. llvm-svn: 305286
* Recommit "RunThreadPlan: Fix halting logic in IgnoreBreakpoints = false"Pavel Labath2017-05-252-18/+55
| | | | | | | | | | | | | | | | | | This is a resubmit of r303732, which was reverted due to a regression. The original patch caused a regression in TestLoadUnload, which has only showed up when running the remote test suite. The problem there was that we interrupted the target just as it has hit the rendezvous breakpoint in the dlopen call. This meant that the stop reason was set to "breakpoint" even though the event would not have been broadcast if we had not stopped the process. I fix this by checking StopInfo->ShouldNotify() before stopping. I also add a new test for the handling of conditional breakpoints in expressions, which I noticed to be broken (pr33164) Differential Revision: https://reviews.llvm.org/D33283 llvm-svn: 303848
* Revert "RunThreadPlan: Fix halting logic in IgnoreBreakpoints = false"Pavel Labath2017-05-241-14/+6
| | | | | | | This reverts commit r303732, as it introduces a regression in TestLoadUnload on android. llvm-svn: 303740
* RunThreadPlan: Fix halting logic in IgnoreBreakpoints = falsePavel Labath2017-05-241-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The function had logic to handle the case when the expression terminated while we were trying to halt the process, but it failed to take into account the possibility that the expression stopped because it hit a breakpoint. This was caused by the fact that the handling of the stopped events was duplicated for the "halting" and regular cases (the regular case handled this situation correctly). I've tried to merge these two cases into one to make sure they stay in sync. I should call out that the two cases were checking whether the thread plan has completed in slightly different ways. I am not sure what is the difference between them, but I think the check should be the same in both cases, whatever it is, so I just took the one from the regular case, as that is probably more tested. For the test, I modified TestUnwindExpression to run the expression with a smaller timeout (this is how I found this bug originally). With a 1ms one thread timeout, the test failed consistently without this patch. Reviewers: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D33283 llvm-svn: 303732
* Fix segfault resulting from empty print promptPavel Labath2017-05-051-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I have found a way to segfault lldb in 7 keystrokes! Steps to reproduce: 1) Launch lldb 2) Type `print` and hit enter. lldb will now prompt you to type a list of expressions, followed by an empty line. 3) Hit enter, indicating the end of your input. 4) Segfault! After some investigation, I've found the issue in Host/common/Editline.cpp. Editline::MoveCursor() relies on m_input_lines not being empty when the `to` argument is CursorPosition::BlockEnd. This scenario, as far as I can tell, occurs in one specific instance: In Editline::EndOrAddLineCommand() when the list of lines being processed contains exactly one string (""). Meeting this condition is fairly simple, I have posted steps to reproduce above. Reviewers: krytarowski, zturner, labath Reviewed By: labath Subscribers: scott.smith, lldb-commits Differential Revision: https://reviews.llvm.org/D32421 Patch by Alex Langford. llvm-svn: 302225
* Don't access the process in expressions w/o checking thatJim Ingham2016-11-031-0/+27
| | | | | | | | | | the process exists. I also added some tests that crash before this fix, and work correctly after. <rdar://problem/29083321> llvm-svn: 285974
* Fix a crash in expressions with fixits in the dummy target.Jim Ingham2016-10-171-2/+9
| | | | | | | | | In the expression command, if the target is NULL, you have to use the dummy target. <rdar://problem/28811687> llvm-svn: 284439
* Add the radar number on our end.Jim Ingham2016-10-111-1/+1
| | | | llvm-svn: 283940
* Fixup the xfail situation on Windows.Zachary Turner2016-10-052-0/+2
| | | | | | Xfails added and/or removed to reflect the current state of Windows. llvm-svn: 283380
* Adding ivars in class extensions isn't supported on i386; skip a test.Sean Callanan2016-09-301-0/+1
| | | | llvm-svn: 282943
* Added a setting that enables saving all .o files from a given JIT expression.Sean Callanan2016-09-263-0/+76
| | | | | | | | This allows debugging of the JIT and other analyses of the internals of the expression parser. I've also added a testcase that verifies that the setting works correctly when off and on. llvm-svn: 282434
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-0634-574/+1006
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Bump up TestCallWithTimeout timeoutPavel Labath2016-09-021-2/+2
| | | | | | Still a bit flaky on remote targets. Trying a larger bump this time. :/ llvm-svn: 280477
* Make TestCallStopAndContinue clang-format-resilientPavel Labath2016-08-122-3/+2
| | | | llvm-svn: 278490
* Remember to add the testcase I wrote for r274822.Jim Ingham2016-07-153-0/+102
| | | | llvm-svn: 275519
* 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
* XFAIL tests which fail with gcc on linuxPavel Labath2016-06-291-0/+1
| | | | llvm-svn: 274116
* Don't run the top-level expression test case with -gmodules.Sean Callanan2016-06-231-1/+1
| | | | | | <rdar://problem/26563587> llvm-svn: 273622
* Add "-gmodules" support to the test suite.Todd Fiala2016-05-261-0/+1
| | | | | | | | | | | | | | 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
* Mark some arm-linux specific xfails marking bug entriesOmair Javaid2016-05-252-1/+3
| | | | | | | | 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
* 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
* xfail TestTopLevelExprs for arm and aarch64 linuxOmair Javaid2016-05-181-0/+1
| | | | | | | | | TestTopLevelExprs fails on arm and aarch64 linux similar to behaviour on android. A bug exists here: llvm.org/pr27787. This patch marks xfail on arm and aarch64. llvm-svn: 269980
* xfail TestTopLevelExprs for Android API 21-22 (llvm.org/pr27787)Tamas Berghammer2016-05-171-2/+4
| | | | llvm-svn: 269759
* Test diamond virtual inheritance in top-level expressions.Sean Callanan2016-05-161-1/+45
| | | | llvm-svn: 269698
* Clean up test results on Windows.Zachary Turner2016-05-132-1/+1
| | | | | | | | | Remove XFAIL from some tests that now pass. Add XFAIL to some tests that now fail. Fix a crasher where a null pointer check isn't guarded. Properly handle all types of errors in SymbolFilePDB. llvm-svn: 269454
* Added missing makefile from patch D19124 (should fix the corresponding ↵Cameron Desrochers2016-05-121-0/+5
| | | | | | commit rL269340) llvm-svn: 269366
* [LLDB] Added support for PHI nodes to IR interpreterMarianne Mailhot-Sarrasin2016-05-122-0/+57
| | | | | | | | | | This allows expressions such as 'i == 1 || i == 2` to be executed using the IR interpreter, instead of relying on JIT code injection (which may not be available on some platforms). Patch by cameron314 Differential Revision: http://reviews.llvm.org/D19124 llvm-svn: 269340
* Added a testcase that verifies that multiline expressions work.Sean Callanan2016-05-093-0/+68
| | | | llvm-svn: 268971
* XFail TestIRInterpreter on WindowsAdrian McCarthy2016-04-271-0/+1
| | | | | | | | There's an open bug with calling functions in the inferior. And Windows doesn't have the POSIX function getpid(). Differential Revision: http://reviews.llvm.org/D19626 llvm-svn: 267800
* Added a testcase for the IR interpreter, ensuring that it behaves like the JIT.Sean Callanan2016-04-273-0/+84
| | | | | | <rdar://problem/25785338> llvm-svn: 267768
* Bump up timeout in TestCallWithTimeoutPavel Labath2016-04-261-2/+2
| | | | | | Expression very rarely (linux buildbot, build 13907) completed before we managed to interrupt it. llvm-svn: 267554
* Fixes for platforms that default to unsigned charUlrich Weigand2016-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This fixes several test case failure on s390x caused by the fact that on this platform, the default "char" type is unsigned. - In ClangASTContext::GetBuiltinTypeForEncodingAndBitSize we should return an explicit *signed* char type for encoding eEncodingSint and bit size 8, instead of the default platform char type (which may be unsigned). This fix matches existing code in ClangASTContext::GetIntTypeFromBitSize, and fixes the TestClangASTContext.TestBuiltinTypeForEncodingAndBitSize unit test case. - The test/expression_command/char/TestExprsChar.py test case is known to fail on platforms defaulting to unsigned char (pr23069), and just needs to be xfailed on s390x like on arm. - The test/functionalities/watchpoint/watchpoint_on_vectors/main.c test case defines a vector of "char" and implicitly assumes to be signed. Use an explicit "signed char" instead. Differential Revision: http://reviews.llvm.org/D18979 llvm-svn: 266309
* mark TestCallWithTimeout.py XFAIL on macosx.Todd Fiala2016-04-011-1/+1
| | | | | | | | | | This test is failing on the CI but not locally for me. Needs investigation. tracked by: https://llvm.org/bugs/show_bug.cgi?id=27182 llvm-svn: 265175
* Figure out what the fixed expression is, and print it. Added another target ↵Jim Ingham2016-03-291-1/+5
| | | | | | | | | | | | | setting to quietly apply fixits for those who really trust clang's fixits. Also, moved the retry into ClangUserExpression::Evaluate, where I can make a whole new ClangUserExpression to do the work. Reusing any of the parts of a UserExpression in situ isn't supported at present. <rdar://problem/25351938> llvm-svn: 264793
* Expose top-level Clang expressions via the command line and the API.Sean Callanan2016-03-285-0/+174
| | | | | | | | | | | | | | | | | | Top-level Clang expressions are expressions that act as new translation units, and define their own symbols. They do not have function wrappers like regular expressions do, and declarations are persistent regardless of use of the dollar sign in identifiers. Names defined by these are given priority over all other symbol lookups. This patch adds a new expression option, '-p' or '--top-level,' which controls whether the expression is treated this way. It also adds a flag controlling this to SBExpressionOptions so that this API is usable externally. It also adds a test that validates that this works. (The test requires a fix to the Clang AST importer which I will be committing shortly.) <rdar://problem/22864976> llvm-svn: 264662
* Use Clang's FixItHints to correct expressions with "trivial" mistakes (e.g. ↵Jim Ingham2016-03-253-0/+114
| | | | | | | | | | | | | | | "." for "->".) This feature is controlled by an expression command option, a target property and the SBExpressionOptions setting. FixIt's are only applied to UserExpressions, not UtilityFunctions, those you have to get right when you make them. This is just a first stage. At present the fixits are applied silently. The next step is to tell the user about the applied fixit. <rdar://problem/25351938> llvm-svn: 264379
* Add regression test for expressions calling functions taking anonymous ↵Ewan Crawford2016-03-153-0/+78
| | | | | | | | | | | | struct typedef arguments This CL adds a regression test for the bug listed at https://llvm.org/bugs/show_bug.cgi?id=26790 Functionality was implemented in commit r263544 Author: Luke Drummond <luke.drummond@codeplay.com> Differential Revision: http://reviews.llvm.org/D17777 llvm-svn: 263547
* Remove expectedFailureFreeBSD decoratorEd Maste2016-02-192-3/+2
| | | | | | | | All invocations are updated to use the generic expectedFailureAll. Differential Revision: http://reviews.llvm.org/D17455 llvm-svn: 261355
* 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-092-2/+2
| | | | | | Ported everything over to using expectedFailureAll. llvm-svn: 260289
* Fix a typo in an xfail decorator in TestExprsCharTamas Berghammer2016-02-091-1/+1
| | | | llvm-svn: 260216
* [TestExprsChar] Fix a typo is failure archs listSiva Chandra2016-02-091-1/+1
| | | | | | | | | | Reviewers: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17014 llvm-svn: 260192
* Remove skip and xfail decorators for target architecture.Zachary Turner2016-02-091-5/+3
| | | | | | | | | | | | | | | | This removes the following decorators: * skipIfI386 * expectedFailureI386 * expectedFailurex86_64 * skipIfArch * skipUnlessArch * skipUnlessI386 And other related decorators. All code using those decorators is updated to use expectedFailureAll and skipIf llvm-svn: 260178
* Remove expectedFailureWindows decorator.Zachary Turner2016-02-0814-18/+18
| | | | | | | | | | | | | | | 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
* Move the rest of the tests over to using the new decorator module.Zachary Turner2016-02-0417-15/+34
| | | | llvm-svn: 259838
* Move some of the common decorators to decorators.py.Zachary Turner2016-02-043-3/+9
| | | | | | | | | | | | 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
OpenPOWER on IntegriCloud