Giving Commands to the Debugger. Overview

The debugger has several different mechanisms you can use to direct its behavior. It receives input from:

  1. At startup, before attaching to or starting the target executable and before processing command line qualifiers, commands in:
    1. .idbrc, if available, otherwise
    2. ~/.idbrc, if available
  2. Just before accepting command input from you:
    1. ./dbxinit, if available, otherwise
    2. ~/.dbxinit, if available
  3. Files specified in the source command

Some examples of the difference between .idbrc and .dbxinit are shown in the following table:

Example Command

If Used in .idbrc

If Used in .dbxinit

Assume the command "set $stoponattach = 1" is in one of these files and you invoked the debugger as:

% idb -pid process_id executable_file

The debugger attaches and stops. The debugger attaches and waits for you to press Ctrl+C; subsequent attaches will stop.
Assume the command "stop in main" is in one of these files. The debugger generates a message that there is no main in which to place a breakpoint, because there is no target yet. The debugger sets the breakpoint (assuming there is a main in the target).