19c739252SPavel Labath# RUN: %clangxx_host -std=c++11 %p/Inputs/stop-hook-threads.cpp -g -o %t 287aa9c9eSJonas Devlieghere# RUN: %lldb -b -s %p/Inputs/stop-hook-threads-1.lldbinit -s %s -f %t \ 387aa9c9eSJonas Devlieghere# RUN: | FileCheck --check-prefix=CHECK --check-prefix=CHECK-NO-FILTER %s 487aa9c9eSJonas Devlieghere# RUN: %lldb -b -s %p/Inputs/stop-hook-threads-2.lldbinit -s %s -f %t \ 587aa9c9eSJonas Devlieghere# RUN: | FileCheck --check-prefix=CHECK --check-prefix=CHECK-FILTER %s 6*2c2eb5e6SMichał Górny# XFAIL: system-freebsd 787aa9c9eSJonas Devlieghere# XFAIL: system-netbsd 887aa9c9eSJonas Devlieghere# UNSUPPORTED: system-windows 987aa9c9eSJonas Devlieghere# This test is flakey and hangs on windows periodically: llvm.org/pr38373 1087aa9c9eSJonas Devlieghere# UNSUPPORTED: system-linux, system-darwin 1187aa9c9eSJonas Devlieghere 1287aa9c9eSJonas Devliegherethread list 1387aa9c9eSJonas Devliegherebreak set -f stop-hook-threads.cpp -p "Set break point at this line" 1487aa9c9eSJonas Devliegheretarget stop-hook list 1587aa9c9eSJonas Devlieghere 1687aa9c9eSJonas Devlieghere# CHECK: Hook: 1 1787aa9c9eSJonas Devlieghere# CHECK-NEXT: State: enabled 1887aa9c9eSJonas Devlieghere# CHECK-NO-FILTER-NEXT: AutoContinue on 1987aa9c9eSJonas Devlieghere# CHECK-FILTER-NEXT: Thread 2087aa9c9eSJonas Devlieghere# CHECK-FILTER-NEXT: index: 2 2187aa9c9eSJonas Devlieghere# CHECK-NEXT: Commands: 2287aa9c9eSJonas Devlieghere# CHECK-NEXT: expr lldb_val += 1 2387aa9c9eSJonas Devlieghere# CHECK-NEXT: thread list 2487aa9c9eSJonas Devlieghere 2587aa9c9eSJonas Devlieghere# CHECK-FILTER: Hook: 2 2687aa9c9eSJonas Devlieghere# CHECK-FILTER-NEXT: State: enabled 2787aa9c9eSJonas Devlieghere# CHECK-FILTER-NEXT: AutoContinue on 2887aa9c9eSJonas Devlieghere# CHECK-FILTER-NEXT: Commands: 2987aa9c9eSJonas Devlieghere# CHECK-FILTER-NEXT: script print('Hit stop hook') 3087aa9c9eSJonas Devlieghere 3187aa9c9eSJonas Devlieghere# Get the threads going 3287aa9c9eSJonas Devliegherecontinue 3387aa9c9eSJonas Devlieghere 3487aa9c9eSJonas Devlieghere# Now make sure we hit the command the right number of times: 3587aa9c9eSJonas Devlieghere# CHECK-NO-FILTER: lldb_val was set to: 15. 3687aa9c9eSJonas Devlieghere# CHECK-FILTER: lldb_val was set to: 5. 37