summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/watchpoint/watchpoint_set_command
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-284-281/+0
| | | | | | | | | | | 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
* Rename `lldb_shared` to `use_lldb_suite`.Zachary Turner2015-10-272-2/+2
| | | | llvm-svn: 251444
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-232-0/+4
| | | | | | | | | | | | | Apparently there were tons of instances I missed last time, I guess I accidentally ran 2to3 non-recursively. This should be every occurrence of a print statement fixed to use a print function as well as from __future__ import print_function being added to every file. After this patch print statements will stop working everywhere in the test suite, and the print function should be used instead. llvm-svn: 251121
* Update every test to import `lldb_shared`.Zachary Turner2015-10-222-16/+4
| | | | | | | | | | | | | | | | | | | | | This is necessary in order to allow third party modules to be located under lldb/third_party rather than under the test folder directly. Since we're already touching every test file anyway, we also go ahead and delete the unittest2 import and main block wherever possible. The ability to run a test as a standalone file has already been broken for some time, and if we decide we want this back, we should use unittest instead of unittest2. A few places could not have the import of unittest2 removed,because they depend on the unittest2.expectedFailure or skip decorators. Removing all those was orthogonal in spirit to the purpose of this CL, so the import of unittest2 remains in those files that were using it for its test decorators. Those can be addressed separately. llvm-svn: 251055
* Merge dwarf and dsym testsTamas Berghammer2015-09-302-26/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently most of the test files have a separate dwarf and a separate dsym test with almost identical content (only the build step is different). With adding dwo symbol file handling to the test suit it would increase this to a 3-way duplication. The purpose of this change is to eliminate this redundancy with generating 2 test case (one dwarf and one dsym) for each test function specified (dwo handling will be added at a later commit). Main design goals: * There should be no boilerplate code in each test file to support the multiple debug info in most of the tests (custom scenarios are acceptable in special cases) so adding a new test case is easier and we can't miss one of the debug info type. * In case of a test failure, the debug symbols used during the test run have to be cleanly visible from the output of dotest.py to make debugging easier both from build bot logs and from local test runs * Each test case should have a unique, fully qualified name so we can run exactly 1 test with "-f <test-case>.<test-function>" syntax * Test output should be grouped based on test files the same way as it happens now (displaying dwarf/dsym results separately isn't preferable) Proposed solution (main logic in lldbtest.py, rest of them are test cases fixed up for the new style): * Have only 1 test fuction in the test files what will run for all debug info separately and this test function should call just "self.build(...)" to build an inferior with the right debug info * When a class is created by python (the class object, not the class instance), we will generate a new test method for each debug info format in the test class with the name "<test-function>_<debug-info>" and remove the original test method. This way unittest2 see multiple test methods (1 for each debug info, pretty much as of now) and will handle the test selection and the failure reporting correctly (the debug info will be visible from the end of the test name) * Add new annotation @no_debug_info_test to disable the generation of multiple tests for each debug info format when the test don't have an inferior Differential revision: http://reviews.llvm.org/D13028 llvm-svn: 248883
* Remove expectedFailureFreeBSD from passing watchpoint testsEd Maste2015-09-162-2/+0
| | | | | | llvm.org/pr18832 llvm-svn: 247801
* Remove Unicode byte-order mark from python files.Zachary Turner2015-08-131-1/+1
| | | | | | | | | This was caused by a bug in the PTVS source file editor, which has since been fixed and awaiting a new release. For now people using this editor need to remember to manually remove this before committing a file. llvm-svn: 244963
* XFAIL Watchpoint tests on Windows.Zachary Turner2015-08-131-1/+2
| | | | | | https://llvm.org/pr24446 tracks getting these tests re-enabled. llvm-svn: 244950
* XFAIL watchpoint tests on Android arm/aarch64Tamas Berghammer2015-07-221-1/+2
| | | | | | Differential revision: http://reviews.llvm.org/D11409 llvm-svn: 242887
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-012-2/+2
| | | | | | with all the other assertion messages. llvm-svn: 241212
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-272-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: Before: AssertionError: False is not True : Process is launched successfully After: AssertionError: False is not True : Command 'run a.out' failed. >>> error: invalid target, create a target using the 'target create' command >>> Process could not be launched successfully Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits, vharron Differential Revision: http://reviews.llvm.org/D9948 llvm-svn: 238363
* ["watch set" tests] Use default test case executable names.Siva Chandra2015-05-112-12/+8
| | | | | | | | | | | | | | Summary: This change similar to r236783. Reviewers: chaoren Reviewed By: chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9630 llvm-svn: 237010
* Missing `-lpthread` causes gcc test failure.Chaoren Lin2015-04-132-2/+0
| | | | | | | | | | | | | | | Summary: `-lpthread` was removed for `g++ -std=c++11` on Linux due to llvm.org/pr21553, but the original issue doesn't seem to be reproducible anymore. Even if it were, it had nothing to do with compiling inferiors. Reviewers: sbest, sivachandra, chying Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8991 llvm-svn: 234770
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-301-1/+1
| | | | | | | | | | | | | | | | against remote platform. Adds @skipIfPlatform and @skipUnlessPlatform decorators which will skip if / unless the target platform is in the provided platform list. Test Plan: ninja check-lldb shows no regressions. When running cross platform, tests which cannot run on the target platform are skipped. Differential Revision: http://reviews.llvm.org/D8665 llvm-svn: 233547
* Changed '-x'/'-xsize' to '-s'/'-size' when specifyingSean Callanan2015-03-262-7/+7
| | | | | | | | the size of a watchpoint. <rdar://problem/18184972> llvm-svn: 233237
* xfail tests that failed with clang-3.7, gcc4.8.2 and on i386 to get buildbot ↵Ying Chen2015-03-252-0/+2
| | | | | | | | | | | | | | | | | | green Summary: -Refer to bug https://buganizer.corp.google.com/issues/19893563 -Test log http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/1145 Test Plan: Run tests with different compiler and archs locally Reviewers: sivachandra, ovyalov, chaoren, vharron Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8573 llvm-svn: 233157
* Applying D7950 to four near copies of the file.Chaoren Lin2015-03-022-43/+49
| | | | | | | | | | | | | | Summary: Using std::thread/random instead of pthread/rand. Two of them also suffered from the synchronization problem in D7916. Reviewers: clayborg, zturner, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7991 llvm-svn: 230993
* Get test executables compiling on Windows.Zachary Turner2014-08-131-1/+1
| | | | | | | | | | | | | | Many of the test executables use pthreads directly. This isn't portable on Windows, so this patch converts these test to use C++11 threads and mutexes. Since Windows' implementation of std::thread classes throw and catch from header files, this patch also disables exceptions when compiling with clang on Windows. Reviewed by: Todd Fiala, Ed Maste Differential Revision: http://reviews.llvm.org/D4816 llvm-svn: 215562
* Update decorators for tests that still fail with FreeBSD Watchpoint supportEd Maste2014-02-142-2/+2
| | | | | | | | llvm.org/pr18832 Reported by John Wolfe llvm-svn: 201418
* Massive test suite cleanup to stop everyone from manually having to compute ↵Greg Clayton2013-12-102-2/+2
| | | | | | | | | | "mydir" inside each test case. This has led to many test suite failures because of copy and paste where new test cases were based off of other test cases and the "mydir" variable wasn't updated. Now you can call your superclasses "compute_mydir()" function with "__file__" as the sole argument and the relative path will be computed for you. llvm-svn: 196985
* test: Add decorator for FreeBSD watchpoint failureEd Maste2013-11-251-0/+1
| | | | | | | Watchpoints have not yet been implemented for FreeBSD. llvm.org/pr16706 llvm-svn: 195649
* tests: Mark expected FreeBSD failures due to pr16706Ed Maste2013-07-251-0/+1
| | | | | | Watchpoints are not yet working on FreeBSD llvm-svn: 187134
* Removing expected failures for watchpoint tests which are now passing.Andrew Kaylor2013-05-291-1/+0
| | | | llvm-svn: 182813
* Un-skipping tests affected by llvm.org/pr15256Daniel Malea2013-03-042-3/+1
| | | | | | patch by Ashok Thirumurthi! llvm-svn: 176462
* Fixing the watchpoint test case to reflect changes in error reportingEnrico Granata2013-02-221-5/+1
| | | | llvm-svn: 175845
* Skip tests that assert on Linux in ↵Daniel Malea2013-02-132-1/+3
| | | | | | | | RecordLayoutBuilder::updateExternalFieldOffset() - Filed bugzilla PR-15256 llvm-svn: 175065
* Update test scripts and Makefiles to allow testing with GCC:Daniel Malea2013-01-251-1/+1
| | | | | | | | | | | - introduce new variable ARCHFLAG in make/Makefile.rules to switch between "-arch" on Mac and "-m" everywhere else - update testcase makefiles to use LD_EXTRAS instead of LDFLAGS (the former interacts with Makefile.rules badly) - special treatment for gcc 4.6: replace "-std=c++11" with "-std=c++0x" as the former is not handled correctly - remove hardcoded "-arch" from test Makefile This patch should not have any effect on lldb on Mac OS X. llvm-svn: 173402
* Update test status on LinuxDaniel Malea2012-11-231-0/+1
| | | | | | | | | - add decorators @expectedFailLinux and @skipOnLinux - skip/mark xfail cases due to open bugzillas # 14323, 14416, 14423, 14424, 14425, 14426 Patch by Ashok Thirumurthi! llvm-svn: 168529
* Patch from Dan Malea daniel.malea@gmail.com to add some requiredJason Molenda2012-11-081-0/+1
| | | | | | flags to the Linux makefiles to get the tests to run. llvm-svn: 167600
* Fix all the test case breakages caused by folks writing tests all over the ↵Jim Ingham2012-09-222-6/+4
| | | | | | | | place that depended explicitly on the output of "break set". Please don't do this sort of thing!!!!! llvm-svn: 164433
* rdar://problem/11597911Johnny Chen2012-06-052-0/+10
| | | | | | | | Fix confusing error message about "expression did not evaluate to an address" when doing 'watchpoint set expression". Instead of using 0 as the fail_value when invoking ValueObject::GetValueAsUnsigned(), modify the API to take an addition bool pointer (defaults to NULL) to indicate success/failure of value conversion. llvm-svn: 158016
* Second batch of adding @dsym_test/@dwarf_test decorators to existing test cases.Johnny Chen2012-04-061-0/+2
| | | | | | | Plus some minor cleanup of test method names. Third and final batch is coming. llvm-svn: 154197
* Add error handling for missing option terminator "--" and a test scenario ↵Johnny Chen2012-02-091-0/+4
| | | | | | | | for it. Also fix a logic error for a missing return stmt. Oops. llvm-svn: 150195
* After discussions with Jim and Greg, modify the 'watchpoint set' command to ↵Johnny Chen2012-02-082-12/+14
| | | | | | | | | | | | | | | | become a mutiword command with subcommand 'expression' and 'variable'. The first subcommand is for supplying an expression to be evaluated into an address to watch for, while the second is for watching a variable. 'watchpoint set expression' is a raw command, which means that you need to use the "--" option terminator to end the '-w' or '-x' option processing and to start typing your expression. Also update several test cases to comply and add a couple of test cases into TestCompletion.py, in particular, test that 'watchpoint set ex' completes to 'watchpoint set expression ' and that 'watchpoint set var' completes to 'watchpoint set variable '. llvm-svn: 150109
* Refine the 'watchpoint set' command to now require either the '-v' option ↵Johnny Chen2012-02-082-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (for watching of a variable) or the '-e' option (for watching of an address) to be present. Update some existing test cases with the required option and add some more test cases. Since the '-v' option takes <variable-name> and the '-e' option takes <expr> as the command arg, the existing infrastructure for generating the option usage can produce confusing help message, like: watchpoint set -e [-w <watch-type>] [-x <byte-size>] <variable-name | expr> watchpoint set -v [-w <watch-type>] [-x <byte-size>] <variable-name | expr> The solution adopted is to provide an extra member field to the struct CommandArgumentData called (uint32_t)arg_opt_set_association, whose purpose is to link this particular argument data with some option set(s). Also modify the signature of CommandObject::GetFormattedCommandArguments() to: GetFormattedCommandArguments (Stream &str, uint32_t opt_set_mask = LLDB_OPT_SET_ALL) it now takes an additional opt_set_mask which can be used to generate a filtered formatted command args for help message. Options::GenerateOptionUsage() impl is modified to call the GetFormattedCommandArguments() appropriately. So that the help message now looks like: watchpoint set -e [-w <watch-type>] [-x <byte-size>] <expr> watchpoint set -v [-w <watch-type>] [-x <byte-size>] <variable-name> rdar://problem/10703256 llvm-svn: 150032
* Add some more test cases for the "watchpoint set" command.Johnny Chen2012-01-311-0/+67
| | | | llvm-svn: 149324
* Fixed a typo in the test case. Updated comment.Johnny Chen2012-01-301-2/+2
| | | | llvm-svn: 149295
* Add "watch set" command as a more general interface in conjunction with ↵Johnny Chen2012-01-303-0/+216
"frame var -w". Also add test cases for watching a variable as well as a location expressed as an expression. o TestMyFirstWatchpoint.py: Modified to test "watchpoint set -w write global". o TestWatchLocationWithWatchSet.py: Added to test "watchpoint set -w write -x 1 g_char_ptr + 7" where a contrived example program with several threads is supposed to only access the array index within the range [0..6], but there's some misbehaving thread writing past the range. rdar://problem/10701761 llvm-svn: 149280
OpenPOWER on IntegriCloud