summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectWatchpoint.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Give more explicit error messages when watchpoint creation command ↵Johnny Chen2012-06-041-2/+29
| | | | | | | | (watchpoint set) fails, like number of supported hardware watchpoints reached or the watch size is not allowed. llvm-svn: 157948
* Add the capability to display the number of supported hardware watchpoints ↵Johnny Chen2012-05-231-0/+9
| | | | | | | | | to the "watchpoint list" command. Add default Process::GetWatchpointSupportInfo() impl which returns an error of "not supported". Add "qWatchpointSupportInfo" packet to the gdb communication layer to support this, and modify TestWatchpointCommands.py to test it. llvm-svn: 157345
* Clarify "watchpoint set" help text.Johnny Chen2012-04-271-2/+6
| | | | | | rdar://problem/11327790 llvm-svn: 155694
* Add error handling for missing option terminator "--" and a test scenario ↵Johnny Chen2012-02-091-6/+15
| | | | | | | | 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-081-139/+224
| | | | | | | | | | | | | | | | 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
* Update comment.Johnny Chen2012-02-081-1/+2
| | | | llvm-svn: 150036
* Refine the 'watchpoint set' command to now require either the '-v' option ↵Johnny Chen2012-02-081-43/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* Trivial indentation change.Johnny Chen2012-01-301-1/+2
| | | | llvm-svn: 149297
* Add "watch set" command as a more general interface in conjunction with ↵Johnny Chen2012-01-301-1/+207
| | | | | | | | | | | | | | | | | | | | "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
* Cleaned up many error codes. For any who is filling in error strings intoGreg Clayton2011-10-261-4/+4
| | | | | | | | | | | | | lldb_private::Error objects the rules are: - short strings that don't start with a capitol letter unless the name is a class or anything else that is always capitolized - no trailing newline character - should be one line if possible Implemented a first pass at adding "--gdb-format" support to anything that accepts format with optional size/count. llvm-svn: 142999
* Add a commnad to set a condition for a watchpoint. Example:Johnny Chen2011-10-171-0/+151
| | | | | | | | | | | | | | | watchpoint modify -c 'global==5' modifies the last created watchpoint so that the condition expression is evaluated at the stop point to decide whether we should proceed with the stopping. Also add SBWatchpont::SetCondition(const char *condition) to set condition programmatically. Test cases to come later. llvm-svn: 142227
* SBValue::Watch() and SBValue::WatchPointee() are now the official API for ↵Johnny Chen2011-10-141-27/+27
| | | | | | | | | | | | | | | | | | creating a watchpoint for either the variable encapsulated by SBValue (Watch) or the pointee encapsulated by SBValue (WatchPointee). Removed SBFrame::WatchValue() and SBFrame::WatchLocation() API as a result of that. Modified the watchpoint related test suite to reflect the change. Plus replacing WatchpointLocation with Watchpoint throughout the code base. There are still cleanups to be dome. This patch passes the whole test suite. Check it in so that we aggressively catch regressions. llvm-svn: 141925
* Add capability to set ignore count for watchpoint on the command line:Johnny Chen2011-10-051-0/+138
| | | | | | | | watchpoint ignore -i <count> [<watchpt-id | watchpt-id-list>] Add tests of watchpoint ignore_count for command line as well as API. llvm-svn: 141217
* Watchpoint IDs and ID Ranges are not quite the same as Breakpoint IDs and ID ↵Johnny Chen2011-09-221-4/+4
| | | | | | | | | | | | | | | | | Ranges. Add eArgTypeWatchpointID and eArgTypeWatchpointIDRange to the CommandArgumentType enums and modify the signature of CommandObject::AddIDsArgumentData() from: AddIDsArgumentData(CommandArgumentEntry &arg) to: AddIDsArgumentData(CommandArgumentEntry &arg, CommandArgumentType ID, CommandArgumentType IDRange) to accommodate. llvm-svn: 140346
* Add initial implementation of watchpoint commands for list, enable, disable, ↵Johnny Chen2011-09-221-0/+557
and delete. Test cases to be added later. llvm-svn: 140322
OpenPOWER on IntegriCloud