Debian Codegraph @

lldb/test/API/commands/watchpoints/watchpoint_commands/command/watchpoint_command.py

raw
1 import lldb
2
3 num_hits = 0
4
5
6 def 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 return True
13 if num_hits == 1:
14 print("I stopped the second time, but with no return")
15 frame.EvaluateExpression("cookie = 666")
16 num_hits += 1
17 else:
18 print("I stopped the %d time" % (num_hits))
19 frame.EvaluateExpression("cookie = 999")
20 return False # This cause the process to continue.