The alias command associates a specified name with some defined text. This text can contain one or more commands. You can use an alias in the same way as a native TotalView or Tcl command. In addition, you can include an alias as part of the definition of another alias.
If you do not enter an alias-name argument, the CLI displays the names and definitions of all aliases. If you specify only an
alias-name argument, the CLI displays the definition of the alias.
Because the alias command can contain Tcl commands,
defn-body must comply with all Tcl expansion, substitution, and quoting rules.
The TotalView global startup file, tvdinit.tvd, defines a set of default one or two-letter aliases for all common commands. To see a list of these commands, type
alias with no argument in the CLI window.
You cannot use an alias to redefine the name of a CLI-defined command. You can, however, redefine a built-in CLI command by creating your own Tcl procedure. For example, the following procedure disables the built-in
dwatch command. When a user types
dwatch, the CLI executes this code instead of the built-in CLI code.
Defines an alias called m that lists the source code of function
main().
Defines an alias called step2 that does two
dstep commands. This new command applies to the focus that exists when this alias is used.
Creates an alias that performs the same operations as that in the previous example, differing in that it uses the alias for
dstep. You could also create the following alias which does the same thing:
alias step2 {s 2}.
Defines an alias called step1 that steps the first user thread in process 1. All other threads in the process run freely while TotalView steps the current line in your program.