Debugging a Program With dbx

Scenario 2: Updating Graphs of Data Automatically.

The updating of a graph can be controlled automatically by turning on the Update at: Program stops option. This feature enables you to make comparisons of data as it changes during the execution of the program.

  1. Load the C or Fortran sample program.

  2. Set a breakpoint at the end of the outer loop of the bf function.

  3. Start the program, running the program to that breakpoint.

  4. Type bf into the Expressions text field.

  5. Choose Data Graph Expression. A graph of the values in the bf array after the first loop iteration appear.

  6. Click Show Options and select Update At: Program stops.

  7. Choose the Go command to cause the execution of several other loop iterations of the program. Each time the program stops at the breakpoint, the graph is updated with the values set in the previous loop iteration.

  8. Utilizing the automatic update feature can save time when an up to date view of the data is desired at each breakpoint.