History log of /external/lldb/test/functionalities/watchpoint/hello_watchlocation/main.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
90c56e6324c7099f6c98c6c28427214824677d4b 30-Sep-2011 Johnny Chen <johnny.chen@apple.com> o lldbtest.py:

Add a keyword argument 'endstr' to TestBase.expect() method to assert that the output
will end with 'endstr'.

Add TestBase.switch_to_thread_with_stop_reason(stop_reason) to select the thread with
the stop reason = 'stop_reason' as the current thread.

o TestWatchLocation.py:

Modified to switch to the stopped thread with stop reason = watchpoint and to evaluate
an expression with expected output for stronger assertion.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/test/functionalities/watchpoint/hello_watchlocation/main.cpp
1b4525213621b2179f0841edd54842eebecd28cd 30-Sep-2011 Johnny Chen <johnny.chen@apple.com> Add an accompanying option to the 'frame variable -w' command to, instead of watching the variable,
watch the location pointed to by the variable. An example,

(lldb) frame variable -w write -x 1 -g g_char_ptr
(char *) g_char_ptr = 0x0000000100100860 ""...
Watchpoint created: WatchpointLocation 1: addr = 0x100100860 size = 1 state = enabled type = w
declare @ '/Volumes/data/lldb/svn/trunk/test/functionalities/watchpoint/hello_watchlocation/main.cpp:21'

...

(lldb) c
Process 3936 resuming

...

rocess 3936 stopped
* thread #2: tid = 0x3403, 0x00000001000009b7 a.out`do_bad_thing_with_location(char*, char) + 23 at main.cpp:27, stop reason = watchpoint 1
frame #0: 0x00000001000009b7 a.out`do_bad_thing_with_location(char*, char) + 23 at main.cpp:27
24 do_bad_thing_with_location(char *char_ptr, char new_val)
25 {
26 *char_ptr = new_val;
-> 27 }
28
29 uint32_t access_pool (uint32_t flag = 0);
30
(lldb)

Also add TestWatchLocation.py test to exercise this functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/test/functionalities/watchpoint/hello_watchlocation/main.cpp