summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command
Commit message (Collapse)AuthorAgeFilesLines
* tests: XFAIL/UNSUPPORTED tests on WindowsSaleem Abdulrasool2020-01-011-0/+1
| | | | | | | | | Now that we are building the python bindings on Windows once more, the extended testsuite is running. Mark a few failing tests and skip a few tests which hang. This should at least bring the bot back to green without reverting the Python changes which are an improvement for the build system and enable another ~35% of the test suite which was previously disabled.
* [lldb][NFC] Remove 'from __future__ import print_function' from all tests ↵Raphael Isemann2019-12-132-2/+0
| | | | | | | | | | | | | | | | | | | | | that don't actually call 'print()' Summary: A lot of tests do this trick but the vast majority of them don't even call `print()`. Most of this patch was generated by a script that just looks at all the files and deletes the line if there is no `print (` or `print(` anywhere else in the file. I checked the remaining tests manually and deleted the import if we never call print (but instead do stuff like `expr print(...)` and similar false-positives). I also corrected the additional empty lines after the import in the files that I manually edited. Reviewers: JDevlieghere, labath, jfb Reviewed By: labath Subscribers: dexonsmith, wuzish, nemanjai, kbarton, christof, arphaman, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71452
* [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-253-7/+102
| | | | | | | | | | | | | | | | | 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
* [lldb][NFC] Simplify makefiles also for breakpoint testsRaphael Isemann2019-09-121-3/+1
| | | | | | | | These tests were temporarily missing when the big Makefile simplification patch landed, so this just applies the same change to these tests. llvm-svn: 371738
* [lldb] Readd missing functionalities/breakpoint testsRaphael Isemann2019-09-109-0/+504
| | | | | | | It seems when I restructured the test folders the functionalities/breakpoint was deleted. This just reverts this change and re-adds the tests. llvm-svn: 371512
* [lldb] Restructure test folders to match LLDB command hierarchyRaphael Isemann2019-09-019-504/+0
| | | | | | | | | | | | | | | | | | | Summary: As discussed on lldb-dev, this patch moves some LLDB tests into a hierarchy that more closely resembles the commands we use in the LLDB interpreter. This patch should only move tests that use the command interpreter and shouldn't touch any tests that primarily test the SB API. Reviewers: #lldb, jfb, JDevlieghere Reviewed By: #lldb, JDevlieghere Subscribers: dexonsmith, arphaman, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67033 llvm-svn: 370605
* [lldb][NFC] Remove unused imports in python testsRaphael Isemann2019-08-023-6/+0
| | | | llvm-svn: 367663
* 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
* [lit] Use the new build.py script in the lldb-mi testsStella Stamenova2018-12-181-2/+0
| | | | | | This allows the tests to pass on Windows as well llvm-svn: 349562
* Support setting a breakpoint by FileSpec+Line+Column in the SBAPI.Adrian Prantl2018-08-301-2/+2
| | | | | | | | | | | | This patch extends the SBAPI to allow for setting a breakpoint not only at a specific line, but also at a specific (minimum) column. When a column is specified, it will try to find an exact match or the closest match on the same line that comes after the specified location. Differential Revision: https://reviews.llvm.org/D51461 llvm-svn: 341078
* Make sure deleting all breakpoints clears their sites firstEugene Zemtsov2018-04-162-0/+23
| | | | | | | | Bug: https://bugs.llvm.org/show_bug.cgi?id=36430 Differential Revision: https://reviews.llvm.org/D45554 llvm-svn: 330163
* Allow relative file paths when settings source breakpointsGreg Clayton2018-04-131-1/+25
| | | | | | | | | | | | | | | | | Many IDEs set breakpoints using absolute paths and this causes problems when the full path of the source file path doesn't match what is in the debug info. This can be due to different build systems and do or do not resolve symlinks. This patch allows relative breakpoint to be set correctly without needing to do any target.source-map tricks. If IDEs want to, they can send down relative paths like: ./main.c ./src/main.c src/main.c foo/bar/src/main.c I used the breakpoint resolver to match on the file basename and then we weed out anything whose relative paths don't match. This will be a huge improvement for IDEs as they can specify as much of a relative path as desired to uniquely identify a source file in the current project. Differential Revision: https://reviews.llvm.org/D45592 llvm-svn: 330028
* Avoid dirtying the source tree in breakpoint command testsPavel Labath2018-02-204-92/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The paralelization patch exposed a bunch of cases where we were still touching the source tree (as these tests were now stepping on each others toes and being flaky). This patch removes such issues from breakpoint command tests. Since the only reason they were creating files was to indirectly test whether the breakpoint commands got executed (and plumbing the full build tree path to all places that needed it would be messy) I decided to modify the tests to check for a different side effect instead: modification of a global variable. This also makes the code simpler as checking the value of the global variable is easier, and there is nothing to clean up. As the tests aren't really doing anything debug-info related, I took the opportunity to also mark them as NO_DEBUG_INFO_TESTCASEs. Reviewers: jingham, aprantl Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43464 llvm-svn: 325570
* Compile the LLDB tests out-of-tree.Adrian Prantl2018-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch is the result of a discussion on lldb-dev, see http://lists.llvm.org/pipermail/lldb-dev/2018-January/013111.html for background. For each test (should be eventually: each test configuration) a separate build directory is created and we execute make VPATH=$srcdir/path/to/test -C $builddir/path/to/test -f $srcdir/path/to/test/Makefile -I $srcdir/path/to/test In order to make this work all LLDB tests need to be updated to find the executable in the test build directory, since CWD still points at the test's source directory, which is a requirement for unittest2. Although we have done extensive testing, I'm expecting that this first attempt will break a few bots. Please DO NOT HESITATE TO REVERT this patch in order to get the bots green again. We will likely have to iterate on this some more. Differential Revision: https://reviews.llvm.org/D42281 llvm-svn: 323803
* Wrap all references to build artifacts in the LLDB testsuite (NFC)Adrian Prantl2018-01-193-5/+5
| | | | | | | | | in TestBase::getBuildArtifact(). This NFC commit is in preparation for https://reviews.llvm.org/D42281 (compile the LLDB tests out-of-tree). Differential Revision: https://reviews.llvm.org/D42280 llvm-svn: 323007
* Make breakpoint names real entities.Jim Ingham2017-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When introduced, breakpoint names were just tags that you could apply to breakpoints that would allow you to refer to a breakpoint when you couldn't capture the ID, or to refer to a collection of breakpoints. This change makes the names independent holders of breakpoint options that you can then apply to breakpoints when you add the name to the breakpoint. It adds the "breakpoint name configure" command to set up or reconfigure breakpoint names. There is also full support for then in the SB API, including a new SBBreakpointName class. The connection between the name and the breakpoints sharing the name remains live, so if you reconfigure the name, all the breakpoint options all change as well. This allows a quick way to share complex breakpoint behavior among a bunch of breakpoints, and a convenient way to iterate on the set. You can also create a name from a breakpoint, allowing a quick way to copy options from one breakpoint to another. I also added the ability to make hidden and delete/disable protected names. When applied to a breakpoint, you will only be able to list, delete or disable that breakpoint if you refer to it explicitly by ID. This feature will allow GUI's that need to use breakpoints for their own purposes to keep their breakpoints from getting accidentally disabled or deleted. <rdar://problem/22094452> llvm-svn: 313292
* Add an auto-continue flag to breakpoints & locations.Jim Ingham2017-08-031-1/+30
| | | | | | | | | | | | | | You can get a breakpoint to auto-continue by adding "continue" as a command, but that has the disadvantage that if you hit two breakpoints simultaneously, the continue will force the process to continue, and maybe even forstalling the commands on the other. The auto-continue flag means the breakpoints can negotiate about whether to stop. Writing tests, I wanted to supply some commands when I made the breakpoints, so I also added that ability. llvm-svn: 309969
* Fix serialization of Python breakpoint commands.Jim Ingham2016-09-261-2/+2
| | | | | | | | | | | CommandData breakpoint commands didn't know whether they were Python or Command line commands, so they couldn't serialize & deserialize themselves properly. Fix that. I also changed the "breakpoint list" command to note in the output when the commands are Python commands. Fortunately only one test was relying on this explicit bit of text output. llvm-svn: 282432
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-064-109/+208
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* LLDB help content has accumulated over time without a recent attempt toKate Stone2016-07-141-1/+1
| | | | | | | | | review it for consistency, accuracy, and clarity. These changes attempt to address all of the above while keeping the text relatively terse. <rdar://problem/24868841> llvm-svn: 275485
* Remove expectedFailureWindows decorator.Zachary Turner2016-02-081-1/+1
| | | | | | | | | | | | | | | 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-042-3/+5
| | | | llvm-svn: 259838
* Remove `use_lldb_suite` from the package, and don't import it anymore.Zachary Turner2015-11-033-3/+3
| | | | | | | | | | | | | | | | This module was originally intended to be imported by top-level scripts to be able to find the LLDB packages and third party libraries. Packages themselves shouldn't need to import it, because by the time it gets into the package, the top-level script should have already done this. Indeed, it was just adding the same values to sys.path multiple times, so this patch is essentially no functional change. To make sure it doesn't get re-introduced, we also delete the `use_lldb_suite` module from `lldbsuite/test`, although the original copy still remains in `lldb/test` llvm-svn: 251963
* Tighten up sys.path, and use absolute imports everywhere.Zachary Turner2015-11-033-6/+7
| | | | | | | | | | | | | | | | | | | | For convenience, we had added the folder that dotest.py was in to sys.path, so that we could easily write things like `import lldbutil` from anywhere and any test. This introduces a subtle problem when using Python's package system, because when unittest2 imports a particular test suite, the test suite is detached from the package. Thus, writing "import lldbutil" from dotest imports it as part of the package, and writing the same line from a test does a fresh import since the importing module was not part of the same package. The real way to fix this is to use absolute imports everywhere. Instead of writing "import lldbutil", we need to write "import lldbsuite.test.util". This patch fixes up that and all other similar cases, and additionally removes the script directory from sys.path to ensure that this can't happen again. llvm-svn: 251886
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-288-0/+393
This is the conclusion of an effort to get LLDB's Python code structured into a bona-fide Python package. This has a number of benefits, but most notably the ability to more easily share Python code between different but related pieces of LLDB's Python infrastructure (for example, `scripts` can now share code with `test`). llvm-svn: 251532
OpenPOWER on IntegriCloud