Breakpoint When Using fork()/execve()
You must link with the dbfork library to debug programs that call fork() and execve(). See Compiling Programs.
Processes That Call fork()
By default, TotalView places breakpoints in all processes in the share group. When any of these processes reach a breakpoint, TotalView stops all processes in the control group. Said in a different way, TotalView stops the control group containing the share group. This means that TotalView will be stopping more than one share group. (For more information, see Examining Groups.) To override these defaults:
- Dive into the tag field to display the Action Point > Properties dialog box.
- Deselect the Plant in share group checkbox and make sure that the Group radio button is selected.
Processes That Call execve()
Breakpoints that are shared by a parent and children with the same executable do not apply to children with different executables. To set the breakpoints for children that call execve():
- Set the breakpoints and breakpoint options desired in the parent and the children that do not call execve().
- Start the multiprocess program by displaying the Group > Go command. When the first child calls execve(), TotalView displays the following message:
Process name has exec'd
name
.
Do you want to stop it now?
- Answer Yes. TotalView opens a Process Window for the process. (If you answer No, TotalView will not allow you to set breakpoints.)
- Set breakpoints for the process. After you set breakpoints for the first child using this executable, TotalView does not prompt when other children call execve() to use it. Therefore, if you do not want to share the breakpoints among other children using the same executable, dive into the breakpoints and set the breakpoint options.
- Select the Group > Go command.