Programming Utilities Guide

/proc

dbx, truss, and prex all use /proc to control the target process. /proc allows only one client to control a target process safely. Because of this, you cannot run programs like dbx and prex simultaneously on the same target program. If you try to run prex on a target while dbx or truss is running on the same target, prex displays the message "Cannot attach to target."

You can, however, interleave prex and dbx execution by following these steps:

  1. Start prex.

  2. Set up the state of the probe points.

  3. Give the command quit suspend.

  4. Start dbx.

  5. Attach to the suspended program.

    The target will not execute any code between prex and dbx.

    You can also suspend the target by sending it a SIGSTOP signal, then type "quit resume" to prex. If you do this, you should also send a SIGCONT signal after invoking dbx on the stopped process (or else dbx hangs).