Debugging a Program With dbx

Quitting Debugging

A dbx session runs from the time you start dbx until you quit dbx; you can debug any number of programs in succession during a dbx session.

To quit a dbx session, type quit at the dbx prompt.


(dbx) quit

When you start dbx and attach it to a running process using the process_id option, the process survives and continues when you quit the debugging session. dbx performs an implicit detach before quitting the session.

Stopping Execution

You can stop execution of a process at any time using Ctrl+C without leaving dbx.

Detaching a Process From dbx

If you have attached dbx to a process you can detach the process from dbx without killing it or the dbx session using the detach command.

To detach a process from dbx without killing the process:


(dbx) detach

Killing a Program Without Terminating the Session

The dbx kill command terminates debugging of the current process as well as killing the process. However, kill preserves the dbx session itself leaving dbx ready to debug another program.

Killing a program is a good way of eliminating the remains of a program you were debugging without exiting dbx.

To kill a program executing in dbx:


(dbx) kill