llvm-project/lldb/test
Johnny Chen 34ddc8db22 Refine the 'watchpoint set' command to now require either the '-v' option (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
2012-02-08 01:13:31 +00:00
..
api/check_public_api_headers Patches for running some of the Linux tests from Dawn, thanks! 2011-12-22 19:21:46 +00:00
arm_emulation Remove old emulation test data files. 2011-04-22 16:29:23 +00:00
attic Move two files to the 'attic'. 2010-10-05 00:08:08 +00:00
benchmarks Move some print stmts to the test method, where they get printed only if the test is qualified to run 2011-12-10 07:18:11 +00:00
example Changed the test case class names to be noun-like instead of verb-like. 2010-09-01 19:59:58 +00:00
expression_command Convert all python objects in our API to use overload the __str__ method 2012-02-04 02:27:34 +00:00
functionalities Refine the 'watchpoint set' command to now require either the '-v' option (for watching of a variable) or 2012-02-08 01:13:31 +00:00
help Refine the 'watchpoint set' command to now require either the '-v' option (for watching of a variable) or 2012-02-08 01:13:31 +00:00
lang Special build dictionary needs the same dictionary when specifying the after-the-test cleanup. 2012-02-06 21:11:17 +00:00
logging Modify the loggings output oracle to fix test suite failure, after the recent change to CommandInterpreter.cpp. 2011-08-25 21:51:45 +00:00
macosx Modify a couple of Makefiles to use clang instead of gcc, since gcc is being deprecated. 2012-01-12 23:50:28 +00:00
make Add usage example from test/functionalities/archives/Makefile. 2012-01-17 00:58:08 +00:00
pexpect-2.4 Add pexpect-2.4 (a pure Python module for controlling and automating other programs) to the test directory. 2011-03-11 20:13:06 +00:00
plugins lldb should warn when dSYM does not match the binary. 2012-02-01 01:49:50 +00:00
python_api Print out the frame only if self.TraceOn() is True. 2012-02-06 19:36:29 +00:00
settings Followup check in for http://llvm.org/viewvc/llvm-project?rev=148491&view=rev, 2012-01-23 19:49:28 +00:00
source-manager Work in progress for: 2011-12-20 00:41:28 +00:00
types Add comment for build_and_run_with_source_atoms_expr() and remove redundant #include from basic_type.cpp. 2012-01-10 23:36:06 +00:00
unittest2 o Added unittest2 which has added the new features in unittest for Python 2.7 2010-08-05 23:42:46 +00:00
warnings/uuid lldb should warn when dSYM does not match the binary. 2012-02-01 01:49:50 +00:00
Makefile tests: Improve Makefile/dotest to properly set LLDB_HERE variable used in some 2011-10-31 23:27:06 +00:00
README-TestSuite Add some descriptions about the default executable name being 'a.out' and can be overwritten 2011-07-28 21:15:39 +00:00
bench-history Add bench entries. 2011-11-29 19:13:38 +00:00
bench.py Establish a baseline for bench.py score by using a fixed lldb executable as the 2011-10-26 22:58:02 +00:00
blacklist.py Don't set DYLD_LIBRARY_PATH in the Python environment (which will get passed down to 2011-08-03 17:41:28 +00:00
dosep.ty Remove invalid docstring (due to cut-and-paste error). 2011-11-16 18:48:48 +00:00
dotest.py Add a period. 2012-01-31 00:48:02 +00:00
lldbbench.py Add display of min and max samples to Stopwatch's string representation. 2011-10-27 00:32:03 +00:00
lldbtest.py Add test cases for APIs to get template arguments from an SBType. 2012-02-03 20:43:00 +00:00
lldbutil.py Convert all python objects in our API to use overload the __str__ method 2012-02-04 02:27:34 +00:00
redo.py Modify redo.py script so that if sessin_dir is left unspecified, it uses the heuristic 2012-01-24 01:53:02 +00:00