diff options
author | Jim Ingham <jingham@apple.com> | 2019-02-23 00:13:25 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2019-02-23 00:13:25 +0000 |
commit | ff8c7a0947663ce7515f0b8ee52b9d0fe8883bc3 (patch) | |
tree | aa2c285e2f294cc7b0620c84c9f4f726677c8a21 /lldb/lit/ExecControl/StopHook/stop-hook-threads.test | |
parent | 275d15ecf3476b7f884174e1c85f4894fb815bf1 (diff) | |
download | bcm5719-llvm-ff8c7a0947663ce7515f0b8ee52b9d0fe8883bc3.tar.gz bcm5719-llvm-ff8c7a0947663ce7515f0b8ee52b9d0fe8883bc3.zip |
Make sure that stop-hooks run asynchronously.
They aren't designed to nest recursively, so this will prevent that.
Also add a --auto-continue flag, putting "continue" in the stop hook makes
the stop hooks fight one another in multi-threaded programs.
Also allow more than one -o options so you can make more complex stop hooks w/o
having to go into the editor.
<rdar://problem/48115661>
Differential Revision: https://reviews.llvm.org/D58394
llvm-svn: 354706
Diffstat (limited to 'lldb/lit/ExecControl/StopHook/stop-hook-threads.test')
-rw-r--r-- | lldb/lit/ExecControl/StopHook/stop-hook-threads.test | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lldb/lit/ExecControl/StopHook/stop-hook-threads.test b/lldb/lit/ExecControl/StopHook/stop-hook-threads.test index c761bdc1d14..134357535cd 100644 --- a/lldb/lit/ExecControl/StopHook/stop-hook-threads.test +++ b/lldb/lit/ExecControl/StopHook/stop-hook-threads.test @@ -4,7 +4,6 @@ # RUN: %lldb -b -s %p/Inputs/stop-hook-threads-2.lldbinit -s %s -f %t \ # RUN: | FileCheck --check-prefix=CHECK --check-prefix=CHECK-FILTER %s # XFAIL: system-windows -# UNSUPPORTED: linux thread list break set -f stop-hook-threads.cpp -p "Set break point at this line" @@ -12,23 +11,22 @@ target stop-hook list # CHECK: Hook: 1 # CHECK-NEXT: State: enabled +# CHECK-NO-FILTER-NEXT: AutoContinue on # CHECK-FILTER-NEXT: Thread # CHECK-FILTER-NEXT: index: 2 # CHECK-NEXT: Commands: -# CHECK-NEXT: frame variable +# CHECK-NEXT: expr lldb_val += 1 +# CHECK-NEXT: thread list # CHECK-FILTER: Hook: 2 # CHECK-FILTER-NEXT: State: enabled +# CHECK-FILTER-NEXT: AutoContinue on # CHECK-FILTER-NEXT: Commands: -# CHECK-FILTER-NEXT: continue +# CHECK-FILTER-NEXT: script print('Hit stop hook') # Get the threads going continue -# When we filter per thread, we expect exactly 4 identical "frame var" results -# CHECK-FILTER: (uint32_t) thread_index = [[THREAD_INDEX:[0-9]*]] -# CHECK-FILTER-COUNT-3: (uint32_t) thread_index = [[THREAD_INDEX]] -# CHECK-FILTER-NOT: thread_index - -# When we don't filter, we expect to count 12 stopped threads in the thread list output -# CHECK-NO-FILTER-COUNT-12: at stop-hook-threads.cpp{{.*}} stop reason = breakpoint
\ No newline at end of file +# Now make sure we hit the command the right number of times: +# CHECK-NO-FILTER: lldb_val was set to: 15. +# CHECK-FILTER: lldb_val was set to: 5. |