Debugging a Program With dbx

Scenario 3: Comparing Data Graphs at Different Points in Program

The updating of a graph can also be controlled manually.

  1. Load the C or Fortran example program.

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

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

  4. Type af into the Expression: text field.

  5. Choose Data Graph Expression. A graph of the values in the af array after the first loop iteration appears. Make sure automatic updating is turned off on this graph (the default setting).

  6. Execute another loop iteration of the program using the Go command.

  7. Bring up another graph of the af array choosing Data Graph Expression. This graph contains the data values set in the second iteration of the outer loop.

  8. The data contained in the two loop iterations of the af array can now be compared. Any graph with automatic updating turned off can be used as a reference graph to a graph that is continually being updated automatically or manually.