View Full Version : TotalView startup files

07-20-2006, 10:24 AM
TotalView needs to work in a great many environments. What has evolved is a rather complex system where startup data can be placed in many different places. Here is an overview:


The tvdrc file is where you'll find and place startup commands. Notice that there are three of them. If they exist, TotalView will read each one! All three can contain command definitions, commands, and variable settings. The global .tvdrc file is most often used by TotalView administrators. An administrator would place things here that affects all users. The tvdrc file (notice no period in the name) resides within your home directory's .totalview subdirectory. This is where you place things that you always want set. The local .tvdrc file is in the same directory as your executable. It contains things important when you are debugging just that executable.
The files are always read in this order. The commands in these files affect every TotalView session. Command line options have a different purpose: they affect just the session being started.

Generally, command line options tell TotalView to do something that is best done before it starts executing. For example, the -pvm option enables PVM support within TotalView, which is something you can't do once TotalView starts executing. Or the -nlb option tells TotalView that it shouldn't automatically load breakpoints, loading them is the default. Here's where command line options are described: TotalView Command Syntax (http://www.etnus.com/Documentation/latest/html/wwhelp/wwhimpl/api.htm?href=Reference_Guide/TotalViewCommandSyntax.html) TotalView Debugger Server Command Syntax (http://www.etnus.com/Documentation/latest/html/wwhelp/wwhimpl/api.htm?href=Reference_Guide/tvdsvrCommandSyntax.html)
Two options that are more general are -e and -s. The -e command line option lets you directly execute a CLI command. For example:

totalview -e `puts hello'
The -s option tells TotalView that it should execute the CLI commands contained within a file. This is really handy when you have more than one .tvdrc file or when you need to debug a program in different environments.

You can use more than one -e and -s option on one command line. For example:

totalview -e '"set foo 3"' -e 'puts "The value of foo is $foo" `

In most cases, the reason you put information in a tvdrc file is because you want something to be set all the time. In contrast, you use command-line options to do something just for the current session.

Preferences serve a third function: they indicate things that you will want to change either within a session or as needed in a convenient way. Here's the kind of information that can be set using preferences: Action points: lets you set the scope of what is stopped, if the action point is set in a share group, automatic saving and loading, and if a Process Window is opened when a breakpoint is hit. Launch strings: these are best set in a tvdrc file. Bulk launch: these are best set in a tvdrc file. Dynamic libraries: asks if TotalView should stop when loading dynamic libraries. This lets you set breakpoints within them. Parallel: enables use of dbfork and what actions to take when your job goes parallel. Fonts: lets you indicate which fonts TotalView should use when displaying information. Formatting: sets the precision at which TotalView displays numbers and strings. Pointer Dive: controls how pointers are dereferenced and how pointers to arrays are cast.
In most cases, the defaults are probably OK for your needs. The most often used preference are Fonts and Formatting. For detailed information on preferences, see File Preferences (http://www.etnus.com/Documentation/latest/html/wwhelp/wwhimpl/api.htm?href=Online_Help/RootFilePreferences.html).