TotalView Debugger Server (tvdsvr) Command Syntax
This chapter summarizes the syntax of the TotalView Debugger Server command, tvdsvr, which is used for remote debugging. For more information on remote debugging, refer to Starting the TotalView Debugger Server.
Topics in this chapter are:
Synopsis
tvdsvr {-server | -callback hostname:port | -serial device}
[other options]
Description
The tvdsvr debugger server allows TotalView to control and debug a program on a remote machine. To accomplish this, the tvdsvr program must run on the remote machine, and it must have access to the executables to be debugged. These executables must have the same absolute path name as the executable that TotalView is debugging, or the PATH environment variable for tvdsvr must include the directories containing the executables.
You must specify either the -server, -callback, or -serial option with the tvdsvr command. By default, the TotalView debugger automatically launches tvdsvr (known as the autolaunch feature) with the -callback option, and the server establishes a connection with TotalView.
If you prefer not to use the autolaunch feature, you can start tvdsvr manually and specify the -server option. Be sure to note the password that tvdsvr prints out with the message:
pw = hexnumhigh:hexnumlow
TotalView will prompt you for hexnumhigh:hexnumlow later. By default, tvdsvr automatically generates a password that is used when establishing connections. If desired, you can use the -set_pw option to set a specific password.
To connect to the tvdsvr from TotalView, you use the Fille > New Program dialog box and must specify the host name and TCP/IP port number, hostname:portnumber on which tvdsvr is running. Then, TotalView prompts you for the password for tvdsvr.
Options
The following options determine the port number and password necessary for TotalView to connect with tvdsvr.
-callback hostname:port
(Autolaunch feature only) Immediately establishes a connection with a TotalView process running on hostname and listening on port, where hostname is either a host name or TCP/IP address. If tvdsvr cannot connect with TotalView, it exits.
If you use the -port, -search_port, or -server options with this option, tvdsvr ignores them.
-callback_host hostname
Names the host upon which the callback is made. hostname indicates the machine upon which TotalView is running. This option is most often used with a bulk launch.
-callback_ports port-list
Names the ports on the host machines that are used for callbacks. The port-list argument contains a comma-separated list of the host names and TCP/IP port numbers (hostname:port,hostname:port...) on which TotalView is listening for connections from tvdsvr. This option is most often used with a bulk launch.
-debug_file consoleoutputfile
Redirects TotalView Debugger Server console output to a file named consoleoutputfile.
Default: All console output is written to stderr.
-dpvm
Uses the Compaq Tru64 UNIX implementation of the Parallel Virtual Machine (DPVM) library process as its input channel and registers itself as the DPVM tasker.
Note: This option is not intended for users launching tvdsvr manually. When you enable DPVM support within TotalView, TotalView automatically uses this option when it launches tvdsvr.
-port number
Sets the TCP/IP port number on which tvdsvr should communicate with totalview. If this TCP/IP port number is busy, tvdsvr does not select an alternate port number (that is, it communicates with nothing) unless you also specify -search_port.
Default: 4142
-pvm
Uses the ORNL implementation of the Parallel Virtual Machine (PVM) library process as its input channel and registers itself as the ORNL PVM tasker.
Note: This option is not intended for users launching tvdsvr manually. When you enable PVM support within TotalView, TotalView automatically uses this option when it launches tvdsvr.
-search_port
Searches for an available TCP/IP port number, beginning with the default port (4142) or the port set with the -port option and continuing until one is found. When the port number is set, tvdsvr displays the chosen port number with the following message:
port = number
Be sure that you remember this port number, since you will need it when you are connecting to this server from TotalView.
-serial device[:options]
Waits for a serial line connection from TotalView. For device, specify the device name of a serial line, such as /dev/com1. The only option you can specify is the baud rate, which defaults to 38400. For more information on debugging over a serial line, see Debugging Over a Serial Line.
-server
Listens for and accepts network connections on port 4142 (default).
Using -server can be a security problem. Consequently, you must explicitly enable this feature by placing an empty file named tvdsvr.conf in your /etc directory. This file must be owned by user ID 0 (root). When tvdsvr encounters this option, it checks if this file exists. This file's contents are ignored.
You can use a different port by specifying either -port or -search_port. To stop tvdsvr from listening and accepting network connections, you must terminate it by pressing Ctrl-C in the terminal window from which it was started or by using the kill command.
-set_pw hexnumhigh:hexnumlow
Sets the password to the 64-bit number specified by the two 32-bit numbers hexnumhigh and hexnumlow. When a connection is established between tvdsvr and TotalView, the 64-bit password passed by TotalView must match the password set with this option. When the password is set, tvdsvr displays the selected number in the following message:
pw = hexnumhigh:hexnumlow
We recommend using this option to avoid connections by other users.
Note: If necessary, you can disable password checking by specifying the "-set_pw 0:0" option with the tvdsvr command. Disabling password checking is dangerous; it allows anyone to connect to your server and start programs, including shell commands, using your UID. Therefore, we do not recommend disabling password checking.
-set_pws password-list
Sets 64-bit passwords. TotalView must supply these passwords when tvdsvr establishes the connection with it. The argument to this command is a comma-separated list of passwords that TotalView automatically generates. This option is most often used with a bulk launch.
-verbosity level
Sets the verbosity level of TotalView Debugger Server-generated messages to level, which may be one of silent, error, warning, or info.
Default: info
-working_directory directory
Makes directory the directory to which TotalView will be connected.
Note that the command assumes that the host machine and the target machine mount identical file systems. That is, the path name of the directory to which TotalView is connected must be identical on both the host and target machines.
After performing this operation, the TotalView Debugger Server is started.