User`s guide

59
Chapter 6
6. Controlling Program Execution
A program typically runs until it exits or encounters an unrecoverable error.
You can use dbx, however, to stop a program under various conditions, step
through your program line by line, stop execution on receiving a signal, and
execute conditional commands based on your program’s status.
This chapter covers:
“Setting Breakpoints”
“Continuing Execution After a Breakpoint”
“Tracing Program Execution”
“Writing Conditional Commands”
“Managing Breakpoints, Traces, and Conditional Commands”
“Using Signal Processing”
“Stopping at System Calls”
“Stepping Through Your Program”
“Starting at a Specified Line”
Setting Breakpoints
Breakpoints allow you to stop execution of your program. Breakpoints can be
unconditional, in which case they always stop your program, or conditional, in
which case they stop your program only if a test condition that you specify
is true.
Note: All breakpoints halt program execution before executing the line on
which they are set. Therefore, if you want to examine the effects of a line of
code, you should set the breakpoint on the line of code following the one
whose effects you want to study.