30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Disabling Autolaunch<br />

Changing the Remote Shell Command<br />

Some environments require you to create your own autolaunching command.<br />

You might do this, for example, if your remote shell command<br />

doesn’t provide the security that your site requires.<br />

If you create your own autolaunching command, you must use the tvdsvr –<br />

callback and –set_pw command-line options.<br />

If you’re not sure whether rsh (or remsh on HP computers) works at your<br />

site, try typing “rsh hostname” (or “remsh hostname”) from an xterm window,<br />

where hostname is the name of the host on which you want to invoke the<br />

remote process. If the process doesn’t just run and instead this command<br />

prompts you for a password, you must add the host name of the host computer<br />

to your .rhosts file on the target computer.<br />

For example, you can use the following combination of the echo and telnet<br />

commands:<br />

echo %D %L %P %V; telnet %R<br />

After telnet establishes a connection to the remote host, you can use the<br />

cd and tvdsvr commands directly, using the values of %D, %L, %P, and %V<br />

that were displayed by the echo command; for example:<br />

cd directory<br />

tvdsvr –callback hostname:portnumber –set_pw password<br />

If your computer doesn’t have a command for invoking a remote process,<br />

<strong>TotalView</strong> can’t autolaunch the tvdsvr and you must disable both single<br />

server and bulk server launches.<br />

For information on the rsh and remsh commands, see the manual page<br />

supplied with your operating system.<br />

Changing Arguments<br />

You can also change the command-line arguments passed to rsh (or whatever<br />

command you use to invoke the remote process).<br />

For example, if the host computer doesn’t mount the same file systems as<br />

your target computer, tvdsvr might need to use a different path to access<br />

the executable being debugged. If this is the case, you can change %D to<br />

the directory used on the target computer.<br />

If the remote executable reads from standard input, you cannot use the –n<br />

option with your remote shell command because the remote executable<br />

receives an EOF immediately on standard input. If you omit the –n command-line<br />

option, the remote executable reads standard input from the<br />

xterm in which you started <strong>TotalView</strong>. This means that you should invoke<br />

tvdsvr from another xterm window if your remote program reads from standard<br />

input. The following is an example:<br />

%C %R "xterm –display hostname:0 –e tvdsvr \<br />

–callback %L -working_directory %D –set_pw %P \<br />

–verbosity %V"<br />

92 Chapter 5: Setting Up Remote Debugging Sessions

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!