September 2008
Intermediate to advanced
280 pages
6h 31m
English
A breakpoint is like a tripwire within a program: You set a breakpoint at a particular "place" within your program, and when execution reaches that point, the debugger will pause the program's execution (and will, in the case of a text-based debugger such as GDB, give you a command prompt).
GDB is very flexible about the meaning of "place"; it could mean things as varied as a line of source code, an address of code, a line number within a source file, or the entry into a function.
A snippet of a debug session is shown below to illustrate what happens when GDB breaks at a line of code. In the snippet, we list part of the source code, put a breakpoint at line 35 of the program, and then run the program. GDB hits the ...