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