1import lldb 2 3num_hits = 0 4 5 6def watchpoint_command(frame, wp, dict): 7 global num_hits 8 if num_hits == 0: 9 print ("I stopped the first time") 10 frame.EvaluateExpression("cookie = 888") 11 num_hits += 1 12 frame.thread.process.Continue() 13 else: 14 print ("I stopped the %d time" % (num_hits)) 15 frame.EvaluateExpression("cookie = 999") 16