略疼,检测哨兵用的都不顺。
记录备案:
b 31
run
watch set var flag
watchpoint modify -c '(flag==10)'
c
del b 1
c
% if want watch flag with another values, need again add the breakpoint first
b 31
c
watchpoint modify -c '(flag==20)'
c
c
watchpoint modify -c '(flag==40)'
c
...
Or in the IDE (Xcode) Environment, simple edit breakpoint with condition