summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectWatchpoint.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Resolve printf formatting warnings on Linux:Daniel Malea2012-11-291-2/+2
| | | | | | | | - use macros from inttypes.h for format strings instead of OS-specific types Patch from Matt Kopec! llvm-svn: 168945
* Watchpoints remember the type of the expression or variable they were set ↵Jim Ingham2012-10-231-10/+12
| | | | | | | | | | with, and use it to print the old and new values. Temporarily disable the "out of scope" checking since it didn't work correctly, and was not what people generally expected watchpoints to be doing. llvm-svn: 166472
* Add the ability to set timeout & "run all threads" options both from the ↵Jim Ingham2012-10-161-2/+3
| | | | | | | | | | "expr" command and from the SB API's that evaluate expressions. <rdar://problem/12457211> llvm-svn: 166062
* Extended the "watchpoint set variable" code toSean Callanan2012-09-141-0/+33
| | | | | | | | support watchpoints on globals. <rdar://problem/12297238> llvm-svn: 163913
* Change the NULL to a 0 since we need a uint32_tFilipe Cabecinhas2012-09-111-2/+2
| | | | llvm-svn: 163625
* Implementing an Options class for EvaluateExpression() in order to make the ↵Enrico Granata2012-09-051-9/+7
| | | | | | signature more compact and make it easy to 'just run an expression' llvm-svn: 163239
* rdar://problem/12007576Johnny Chen2012-08-131-3/+11
| | | | | | | Record the snapshot of our watched value when the watchpoint is set or hit. And report the old/new values when watchpoint is triggered. Add some test scenarios. llvm-svn: 161785
* rdar://problem/11457143 [ER] need "watchpoint command ..."Johnny Chen2012-08-091-0/+4
| | | | | | Add 'watchpoint command add/delete/list' to lldb, plus two .py test files. llvm-svn: 161638
* Ran the static analyzer on the codebase and found a few things.Greg Clayton2012-07-171-9/+7
| | | | llvm-svn: 160338
* <rdar://problem/11672978> Fixing an issue where an ObjC object might come ↵Enrico Granata2012-07-161-1/+2
| | | | | | out without a description because the expression used to obtain it would timeout before running to completion llvm-svn: 160326
* <rdar://problem/11870357>Greg Clayton2012-07-141-1/+2
| | | | | | Allow "frame variable" to find ivars without the need for "this->" or "self->". llvm-svn: 160211
* Make 'watchpoint set' default to write instead of read_write.Johnny Chen2012-06-291-6/+6
| | | | llvm-svn: 159455
* Chnage VerifyWatchpointIDs() from a static function to a class function to ↵Johnny Chen2012-06-191-8/+8
| | | | | | be called from other source files. llvm-svn: 158751
* Make raw & parsed commands subclasses of CommandObject rather than having ↵Jim Ingham2012-06-081-871/+963
| | | | | | | | | | | | | | | | the raw version implement an Execute which was never going to get run and another ExecuteRawCommandString. Took the knowledge of how to prepare raw & parsed commands out of CommandInterpreter and put it in CommandObject where it belongs. Also took all the cases where there were the subcommands of Multiword commands declared in the .h file for the overall command and moved them into the .cpp file. Made the CommandObject flags work for raw as well as parsed commands. Made "expr" use the flags so that it requires you to be paused to run "expr". llvm-svn: 158235
* rdar://problem/11597911Johnny Chen2012-06-051-2/+3
| | | | | | | | 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
* rdar://problem/11584012Johnny Chen2012-06-041-28/+8
| | | | | | | | | | | Refactorings of watchpoint creation APIs so that SBTarget::WatchAddress(), SBValue::Watch(), and SBValue::WatchPointee() now take an additional 'SBError &error' parameter (at the end) to contain the reason if there is some failure in the operation. Update 'watchpoint set variable/expression' commands to take advantage of that. Update existing test cases to reflect the API change and add test cases to verify that the SBError mechanism works for SBTarget::WatchAddress() by passing an invalid watch_size. llvm-svn: 157964
* 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