1# REQUIRES: lua 2# XFAIL: system-netbsd 3# RUN: echo "int main() { int val = 1; val++; return 0; }" | %clang_host -x c - -g -o %t 4# RUN: %lldb -s %s --script-language lua %t 2>&1 | FileCheck %s 5b main 6r 7watchpoint set variable val 8watchpoint command add -s lua 9print("val=" .. tostring(frame:FindVariable("val"):GetValue())) 10quit 11c 12# CHECK: val=1 13# CHECK: val=2 14# CHECK: Process {{[0-9]+}} exited 15r 16watchpoint set variable val 17watchpoint modify 1 -c "(val == 1)" 18watchpoint command add -s lua 19print("conditional watchpoint") 20wp:SetEnabled(false) 21quit 22c 23# CHECK-COUNT-1: conditional watchpoint 24# CHECK-NOT: conditional watchpoint 25# CHECK: Process {{[0-9]+}} exited 26r 27watchpoint set expr 0x00 28watchpoint command add -s lua 29print("never triggers") 30quit 31c 32# CHECK-NOT: never triggers 33# CHECK: Process {{[0-9]+}} exited 34