Go forward to Continuing and Stepping.
Go up to Stopping.
Breakpoints, watchpoints, and exceptions
========================================
A "breakpoint" makes your program stop whenever a certain point in
the program is reached. For each breakpoint, you can add conditions to
control in finer detail whether your program stops. You can set
breakpoints with the `break' command and its variants (*note Setting
breakpoints: Set Breaks.), to specify the place where your program
should stop by line number, function name or exact address in the
program. In languages with exception handling (such as GNU C++), you
can also set breakpoints where an exception is raised (
see Breakpoints and exceptions: Exception Handling.).
In SunOS 4.x, SVR4, and Alpha OSF/1 configurations, you can now set
breakpoints in shared libraries before the executable is run.
A "watchpoint" is a special breakpoint that stops your program when
the value of an expression changes. You must use a different command
to set watchpoints (see Setting watchpoints: Set Watchpoints.), but
aside from that, you can manage a watchpoint like any other breakpoint:
you enable, disable, and delete both breakpoints and watchpoints using
the same commands.
You can arrange to have values from your program displayed
automatically whenever GDB stops at a breakpoint. *Note Automatic
display: Auto Display.
GDB assigns a number to each breakpoint or watchpoint when you
create it; these numbers are successive integers starting with one. In
many of the commands for controlling various features of breakpoints you
use the breakpoint number to say which breakpoint you want to change.
Each breakpoint may be "enabled" or "disabled"; if disabled, it has no
effect on your program until you enable it again.
Menu
- Set Breaks
- Setting breakpoints
- Set Watchpoints
- Setting watchpoints
- Exception Handling
- Breakpoints and exceptions
- Delete Breaks
- Deleting breakpoints
- Disabling
- Disabling breakpoints
- Conditions
- Break conditions
- Break Commands
- Breakpoint command lists
- Breakpoint Menus
- Breakpoint menus