Add PR check to suggest alternatives to using undef (#118506)
[llvm-project.git] / lldb / test / Shell / ExecControl / StopHook / stop-hook-threads.test
blobb449110c28bd6134d421f79d161edb2f59a32491
1 # RUN: %clangxx_host -std=c++11 %p/Inputs/stop-hook-threads.cpp -g -o %t
2 # RUN: %lldb -b -s %p/Inputs/stop-hook-threads-1.lldbinit -s %s -f %t \
3 # RUN:     | FileCheck --check-prefix=CHECK --check-prefix=CHECK-NO-FILTER %s
4 # RUN: %lldb -b -s %p/Inputs/stop-hook-threads-2.lldbinit -s %s -f %t \
5 # RUN:     | FileCheck --check-prefix=CHECK --check-prefix=CHECK-FILTER %s
6 # XFAIL: system-freebsd
7 # XFAIL: system-netbsd
8 # UNSUPPORTED: system-windows
9 # This test is flakey and hangs on windows periodically: llvm.org/pr38373
10 # UNSUPPORTED: system-linux, system-darwin
12 thread list
13 break set -f stop-hook-threads.cpp -p "Set break point at this line"
14 target stop-hook list
16 # CHECK: Hook: 1
17 # CHECK-NEXT:  State: enabled
18 # CHECK-NO-FILTER-NEXT: AutoContinue on
19 # CHECK-FILTER-NEXT:  Thread
20 # CHECK-FILTER-NEXT:  index: 2
21 # CHECK-NEXT:  Commands: 
22 # CHECK-NEXT:    expr lldb_val += 1
23 # CHECK-NEXT:    thread list
25 # CHECK-FILTER: Hook: 2
26 # CHECK-FILTER-NEXT:  State: enabled
27 # CHECK-FILTER-NEXT:  AutoContinue on
28 # CHECK-FILTER-NEXT:  Commands: 
29 # CHECK-FILTER-NEXT:    script print('Hit stop hook')
31 # Get the threads going
32 continue
34 # Now make sure we hit the command the right number of times:
35 # CHECK-NO-FILTER: lldb_val was set to: 15.
36 # CHECK-FILTER: lldb_val was set to: 5.