summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [LLDB] Disable MSVC warning C4190: ↵Alexandre Ganea2019-12-031-0/+12
| | | | | | 'LLDBSwigPythonBreakpointCallbackFunction' has C-linkage specified, but returns UDT 'llvm::Expected<bool>' which is incompatible with C Differential Revision: https://reviews.llvm.org/D70830
* [LLDB][Python] warning fix for LLDBSwigPythonBreakpointCallbackFunctionLawrence D'Anna2019-10-301-0/+5
| | | | | | | | | | | | | | | | | | This is a quick followup to this commit: https://reviews.llvm.org/rGa69bbe02a2352271e8b14542073f177e24c499c1 In that, I #pragma-squelch this warning in `ScriptInterpreterPython.cpp` but we get the same warning in `PythonTestSuite.cpp`. This patch squelches the same warning in the same way as the reviweed commit. I'm submitting it without review under the "obviously correct" rule. At least if this is incorrect the main commit was also incorrect. By the way, as far as I can tell, these functions are extern "C" because SWIG does that to everything, not because they particularly need to be.
* [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_argsLawrence D'Anna2019-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: Move breakpoints from the old, bad ArgInfo::count to the new, better ArgInfo::max_positional_args. Soon ArgInfo::count will be no more. It looks like this functionality is already well tested by `TestBreakpointCommandsFromPython.py`, so there's no need to write additional tests for it. Reviewers: labath, jingham, JDevlieghere Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69468
* Add the ability to pass extra args to a Python breakpoint callback.Jim Ingham2019-10-251-1/+2
| | | | | | | | | | | | | | | | | For example, it is pretty easy to write a breakpoint command that implements "stop when my caller is Foo", and it is pretty easy to write a breakpoint command that implements "stop when my caller is Bar". But there's no way to write a generic "stop when my caller is..." function, and then specify the caller when you add the command to a breakpoint. With this patch, you can pass this data in a SBStructuredData dictionary. That will get stored in the PythonCommandBaton for the breakpoint, and passed to the implementation function (if it has the right signature) when the breakpoint is hit. Then in lldb, you can say: (lldb) break com add -F caller_is -k caller_name -v Foo More generally this will allow us to write reusable Python breakpoint commands. Differential Revision: https://reviews.llvm.org/D68671
* Pass an SBStructuredData to scripted ThreadPlans on use.Jim Ingham2019-10-031-0/+1
| | | | | | | | | | This will allow us to write reusable scripted ThreadPlans, since you can use key/value pairs with known keys in the plan to parametrize its behavior. Differential Revision: https://reviews.llvm.org/D68366 llvm-svn: 373675
* Give an error when StepUsingScriptedThreadPlan is passed a bad classname.Jim Ingham2019-09-281-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D68173 llvm-svn: 373135
* [ScriptInterpreterPython] Fix the unit test after refactorJonas Devlieghere2019-03-291-3/+4
| | | | llvm-svn: 357313
* [Python] Define empty SWIG wrapper for unit testin"Jonas Devlieghere2019-03-261-0/+187
| | | | | | | | | The python plugin uses wrappers generated by swig. For the symbols to be available, we'd need to link against liblldb, which is not an option because the symbols could conflict with the static library we are testing. Instead we define the symbols ourselves in the unit test. llvm-svn: 356971
* [PythonTestSuite] Fix usage of InitializePrivate in PythonTestSuiteJonas Devlieghere2019-03-251-3/+8
| | | | llvm-svn: 356950
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [FileSystem] Improve assert and add Terminate in unit test.Jonas Devlieghere2018-11-011-0/+2
| | | | | | | | Speculative fix for the Xcode bots where we were seeing the assertion being triggered because we would re-initialize the FileSystem without terminating it. llvm-svn: 345849
* [FileSystem] Extend file system and have it use the VFS.Jonas Devlieghere2018-10-311-1/+3
| | | | | | | | | | | | | | | | This patch extends the FileSystem class with a bunch of functions that are currently implemented as methods of the FileSpec class. These methods will be removed in future commits and replaced by calls to the file system. The new functions are operated in terms of the virtual file system which was recently moved from clang into LLVM so it could be reused in lldb. Because the VFS is stateful, we turned the FileSystem class into a singleton. Differential revision: https://reviews.llvm.org/D53532 llvm-svn: 345783
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-22/+18
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* Fix unit tests on windowsPavel Labath2016-08-111-1/+1
| | | | | | Python headers need to be included before PosixApi.h llvm-svn: 278345
* Initialize the Python script interpreter lazily (i.e. not at debugger startup)Enrico Granata2016-04-121-0/+1
| | | | | | This time it should also pass the gtests llvm-svn: 266103
* gtest - Make a `PythonTestSuite` base class for setup / teardown.Zachary Turner2015-11-131-0/+42
This allows other potential unit test suites (of which one is forthcoming in a subsequent patch) to re-use the same initialization and teardown of the GIL. llvm-svn: 252993
OpenPOWER on IntegriCloud