the expression. For the following session, we restart the program examined in the
previous examples. When it stops at the breakpoint in line 9, we set a read watch‐
point for the expression
a + b:
(gdb) b 9
Breakpoint 1 at 0x4010ba: file myprog2.c, line 9.
(gdb) r
Starting program: ...
Breakpoint 1, main () at myprog2.c:9
9 ++*iPtr;
(gdb) rwatch a+b
Hardware read watchpoint 2: a + b
If we now let the program continue, the debugger stops it at the next statement that
reads either of the variables
a or b. The next such statement is the printf call in line
12. Because that statement reads both
a and b, the debugger stops the program ...