next up previous contents
Next: Following are the possible Up: Debugging tools Previous: Following are possible causes

Debugging infinite loops:

The most ubiquitous problem is a program going in an infinite loop. For this do the following steps:

  1. Run dbx program_name.
  2. Execute the program by run [argument list]. At this point the program is in infinite loop.
  3. Press ctrl-c and break the loop.
  4. See the trace by the command t. The very first function listed in the trace contains the infinite loop.
  5. Single step inside the function.



Sushil Prasad
Fri Oct 9 10:28:36 EDT 1998