37 lines · plain
1# RUN: %clangxx_host -std=c++11 %p/Inputs/stop-hook-threads.cpp -g -o %t2# 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 %s4# 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 %s6# XFAIL: system-freebsd7# XFAIL: system-netbsd8# UNSUPPORTED: system-windows9# This test is flakey and hangs on windows periodically: llvm.org/pr3837310# UNSUPPORTED: system-linux, system-darwin11 12thread list13break set -f stop-hook-threads.cpp -p "Set break point at this line"14target stop-hook list15 16# CHECK: Hook: 117# CHECK-NEXT: State: enabled18# CHECK-NO-FILTER-NEXT: AutoContinue on19# CHECK-FILTER-NEXT: Thread20# CHECK-FILTER-NEXT: index: 221# CHECK-NEXT: Commands: 22# CHECK-NEXT: expr lldb_val += 123# CHECK-NEXT: thread list24 25# CHECK-FILTER: Hook: 226# CHECK-FILTER-NEXT: State: enabled27# CHECK-FILTER-NEXT: AutoContinue on28# CHECK-FILTER-NEXT: Commands: 29# CHECK-FILTER-NEXT: script print('Hit stop hook')30 31# Get the threads going32continue33 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.37