Installing Tcl/CLI macros

 

Note   
This discussion is a continuation of the last three tips, which discussed how to create a macro that stepped slowly through your program. If you go to the tips contents file, you'll be able to review these tips. (Look in the "Action Points" area.)

Now that you have mastered the slowly procedures, you need to get them into TotalView. The easiest, but not best, way is to use the Tcl source command. For example, here is what you would type from within a CLI window:

source slowly.tvd

Your file doesn't need to have a file name extension and you can use any extension you want. However, by convention, TotalView CLI macros have a .tvd extension. As there is no default extension, you must type the complete file name.

The better way is to place these procedures in a startup file and have them automatically become part of your TotalView environment.

If you look in your home directory, you'll find a .totalview subdirectory. If you have a file named .tvdrc within it, you already have a startup file. If you don't have one, copy the slowly.tvd file to this directory and rename it to .tvdrc. If you have a .tvdrc file, copy slowly.tvd to this directory, then open your .tvdrc file and add the source statement. You can, of course, just copy the contents of slowly.tvd into your .tvdrc file but you might as well keep things separate.

The next time you start TotalView, the slowly command will be available.


You can find tips that we've already sent out in our Tip Archive

Help us improve these tips!