Making Basic Use of the Debugger: Overview

The Intel® Debugger (IDB) supports DBX and GDB modes. In the command line interface, GDB is the default mode. In the GUI, DBX is the default mode. To change the debugger mode, see section Basic Information on Starting the Debugger. To learn how to switch between the modes, see the Switching between DBX and GDB Mode section.

You look for a bug by doing the following:

  1. Find a repeatable reproducer of the bug (the simpler the reproducer is, the easier the next steps will be).
  2. Prepare your program for debugging.
  3. Start the debugger.
  4. Give commands to the debugger.
  1. Command the debugger to either

  1. Command the debugger to create breakpoints that will pause the process as close as possible to where the bug happened.

  1. If you are using the debugger to create the process, tell it to create the process now.

  1. Do whatever it takes to reproduce the bug, so that the breakpoints will stop the process close to where the bug has caused something detectably wrong to happen.
  2. Look around to determine the location of the bug:

  1. If the bug is in the code where the debugger has stopped the process, exit the debugger and fix the bug.

  1. If the bug has not happened yet, remove any breakpoints that are triggering too often, create other breakpoints that work better at locating the problem, and continue the process.

  1. If the bug has already occurred, take the same steps of creating breakpoints and so on, but set one or more breakpoints earlier in the program before the error occurs. Rerun from an earlier position, and step through the program to determine the exact line causing the error.

See also

Intel® Debugger: Expert Use

Using Intel® Debugger: Advanced Topics