Debugging a Program With dbx

Following fork

If a child process does vfork(), fork(1), or fork(2), the process id changes, but the process image stays the same. Depending on how the dbxenv variable follow_fork_mode is set, dbx does the following:

Parent 

In the traditional behavior, dbx ignores the fork and follows the parent.

Child 

In this mode, dbx automatically switches to the forked child using the new pid. All connection to and awareness of the original parent is lost.

Both 

This mode is only available when using dbx through Sun WorkShop.

Ask 

You are prompted to choose parent, child, both, or stop to investigate whenever dbx detects a fork. If you choose stop, you can examine the state of the program, then type cont to continue, in which case you will be prompted again to select which way to proceed.