summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove flaky annotation for TestCallWithTimeout on linuxPavel Labath2016-02-011-1/+0
| | | | | | The test has passed last 100 runs of the buildbot. llvm-svn: 259368
* [LLDB][MIPS] Fix TestExprsChar.pySagar Thakur2016-01-251-0/+1
| | | | | | | | | | | Patch by Nitesh Jain. Summary: When incorrect type used for 'char' then (at least) one of the expression evaluates to incorrect value. Please refer to bug llvm.org/pr23069 Reviewers: ovyalov, clayborg Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep Differential: reviews.llvm.org/D16132 llvm-svn: 258684
* Remove assumptions that thread 0 is always the main thread.Zachary Turner2016-01-211-6/+2
| | | | | | | | | | | | | | | | | Starting with Windows 10, the Windows loader is itself multi-threaded, meaning that the loader spins up a few threads to do process initialization before it executes main. Windows delivers these notifications asynchronously and they can come out of order, so we can't be sure that the first thread we get a notification about is actually the zero'th thread. This patch fixes this by requesting the thread stopped at the breakpoint that was specified, rather than getting thread 0 and verifying that it is stopped at a breakpoint. Differential Revision: http://reviews.llvm.org/D16247 llvm-svn: 258432
* XFAIL some tests failing for Windows -> AndroidTamas Berghammer2015-12-171-0/+1
| | | | llvm-svn: 255885
* Read macro info from .debug_macro section and use it for expression evaluation.Siva Chandra2015-12-165-0/+153
| | | | | | | | | | | | | | | | | Summary: DWARF 5 proposes a reinvented .debug_macro section. This change follows that spec. Currently, only GCC produces the .debug_macro section and hence the added test is annottated with expectedFailureClang. Reviewers: spyffe, clayborg, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15437 llvm-svn: 255729
* Recommit "Fix race during process interruption"Pavel Labath2015-12-071-2/+2
| | | | | | | | This is a resubmit of r254403, see that commit's message for context. This fixes an issue in the original commit, where we would incorrectly interrupt the process if the interrupt request came just as we were about to send the stopped event to the public. llvm-svn: 254902
* Revert "Fix race during process interruption"Pavel Labath2015-12-011-2/+2
| | | | | | The android buildbot gets quite flaky after this change. I'm reverting it while I investigate. llvm-svn: 254430
* Fix race during process interruptionPavel Labath2015-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The following situation was occuring in TestAttachResume: - we did a "continue" from a breakpoint (which involves a private start-stop to step over the breakpoint) - after receiving the stop-reply from the step-over, we issue a "detach" (which requires a process interrupt) - at this moment, the public state is "running", private state is "about-to-be-stopped" (the stopped event was broadcast, but it was not received yet) - StopForDestroyOrDetach (public thread) notes the public state is running, sends an interrupt request to the private thread - private thread gets the eBroadcastBitInterrupt (before the eStateStopped message), and asks the process plugin to stop (via Halt()) - process plugin says it has nothing to do as the process is already stopped - private thread shrugs and carries on. receives the stop event, restores the breakpoint and resumes the process. - after a while, the public thread times out and says it failed to stop the process This patch does the following: - splits Halt() into two functions, private and public, their usage depends on the context - public Halt(): sends eBroadcastBitInterrupt to the private thread and waits for the Stop event - HaltPrivate(): asks the plugin to stop and makes a note that the halt was requested. When the next stop event comes it sets the interrupt flag on it. - removes HijackPrivateProcessEvents(), as the only user (old Halt()) has gone away - removes the m_currently_handling_event hack, as the new Halt() does not need it - adds a use_run_lock parameter to public Halt() and WaitForProcessToStop(). This was needed because RunThreadPlan uses Halt() while holding the run lock and we don't want Halt() to take it away from him. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14989 llvm-svn: 254403
* Fix to solve Bug 23139 & Bug 23560Abhishek Aggarwal2015-11-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Reason of both bugs: 1. For the very first frame, Unwinder doesn't check the validity of Full UnwindPlan before creating StackFrame from it: When 'process launch' command is run after setting a breakpoint in inferior, the Unwinder runs and saves only Frame 0 (the frame in which breakpoint was set) in thread's StackFrameList i.e. m_curr_frames_sp. However, it doesn't check the validity of the Full UnwindPlan for this frame by unwinding 2 more frames further. 2. Unwinder doesn't update the CFA value of Cursor when Full UnwindPlan fails and FallBack UnwindPlan succeeds in providing valid CFA values for frames: Sometimes during unwinding of stack frames, the Full UnwindPlan inside the RegisterContextLLDB object may fail to provide valid CFA values for these frames. Then the Fallback UnwindPlan is used to unwind the frames. If the Fallback UnwindPlan succeeds, then it provides a valid new CFA value. The RegisterContextLLDB::m_cfa field of Cursor object is updated during the Fallback UnwindPlan execution. However, UnwindLLDB misses the implementation to update the 'cfa' field of this Cursor with this valid new CFA value. - This patch fixes both these issues. - Remove XFAIL in test files corresponding to these 2 Bugs Change-Id: I932ea407545ceee2d628f946ecc61a4806d4cc86 Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com> Reviewers: jingham, lldb-commits, jasonmolenda Subscribers: lldb-commits, ovyalov, tberghammer Differential Revision: http://reviews.llvm.org/D14226 llvm-svn: 253026
OpenPOWER on IntegriCloud