system() handling
Restriction: This
is supported on only.
When a program running in a UNIX environment starts another program using a call to system(),
the system() function calls both fork() and exec().
The following describes the Distributed Debugger's behavior after you perform a Step
Over command on a line containing a system() call, and tells you
what actions you should take to begin debugging the child process.
- The system() function calls fork(). The Distributed Debugger
stops execution and raises a Process fork action dialog.
- At this point you should choose to debug the child process. Once the Process fork action
dialog closes, issue the Run command to continue debugging the child
process.
- The new child process calls exec() to load /bin/sh, and the
debugger opens a New process dialog and the active Distributed
debugger Source pane shows a disassembly view of the initial runtime entry point of /bin/sh.
- Click OK to start debugging the child process.
- The Distributed Debugger stops in the main function of /bin/sh.
- Issue the Run command.
- The /bin/sh process issues a fork() call. Again, the Distributed
Debugger stops and brings up a Fork action dialog.
- At this point you should choose to debug the Child process. Once the Process fork
action dialog closes, issue the Run command to continue debugging the
child process.
- The new child process calls exec() to load the program specified in the
call to system() in the original program. The Distributed Debugger opens a
New process dialog and the active Distributed Debugger Source pane shows
a disassembly view of the initial runtime entry point of the program specified in the call
to system().
- Click OK. The Distributed Debugger stops at main(). From here you
can continue debugging.

exec() handling
fork() handling