You can attach to a running child process in one of the following ways.
When starting dbx:
$ dbx program_name process_id |
From the dbx command line:
(dbx) debug program_name process_id |
You can substitute program_name with the name - (minus sign), so that dbx finds the executable associated with the given process ID (process_id). After using a -, a subsequent run command or rerun command does not work because dbx does not know the full path name of the executable.
You can also attach to a running child process using the Debugger window in the Sun Studio IDE. (See “Attaching the Debugger to a Running Process” in the IDE online help.)