Automatically Acquiring PVM/DPVM Processes
This section describes how TotalView automatically acquires PVM and DPVM processes in a PVM or DPVM debugging session. Specifically, TotalView uses the PVM tasker to intercept pvm_spawn() calls.
When you start TotalView as part of a PVM or DPVM debugging session, it takes the following actions:
- TotalView checks to make sure there are no other PVM or DPVM taskers running. If TotalView finds a tasker on any host that it is debugging, it displays the following message and then exits:
Fatal error: A PVM tasker is already running on host 'host'
- TotalView finds all the hosts in the PVM or DPVM configuration. Using the pvm_spawn() call, TotalView starts a TotalView Debugger Server (tvdsvr) on each remote host that has the same architecture type as the host on which TotalView is running. It tells you it has started a debugger server by printing:
Spawning TotalView Debugger Server onto PVM host 'host'
If you add a host with a compatible machine architecture to your PVM or DPVM debugging session after you start TotalView, TotalView automatically starts a debugger server on that host.
After all debugger servers are running, TotalView will intercept every PVM or DPVM task created with the pvm_spawn() call on hosts that are part of the debugging session. If a PVM or DPVM task is created on a host with a different machine architecture, TotalView ignores that task.
When TotalView receives a PVM or DPVM tasker event, it takes the following actions:
- TotalView reads the symbol table of the spawned executable.
- If a saved breakpoints file for the executable exists and you have enabled automatic loading of breakpoints, TotalView loads breakpoints for the process.
- TotalView asks if you want to stop the process before it enters the main() routine.
If you answer Yes, TotalView stops the process before it enters main() (that is, before it executes any user code). This allows you to set breakpoints in the spawned process before any user code executes. On most machines, TotalView stops a process in the start() routine of the crt0.o module if it is statically linked. If the process is dynamically linked, the debugger stops it just after it finishes running the dynamic linker. Because the Process Window displays assembler instructions, you will need to use the View > Lookup Function command to display the source code for the main() routine. For more information on this command, refer to Finding the Source Code for Functions.