Displaying Variables
 
Displaying Program Variables
Display local and global variables using dprint:
CLI: dprint variable
This command lets you view variables and expressions without having to select or find them.
For example, dprint j returns the value of j:
j = 0x00000005 (5)
CLI: dwhere, dup, and dprint
Use dwhere to locate the stack frame, use dup to move to it, and then use dprint to display the value.
Dereferencing Variables Automatically
In most cases, you want to see what a pointer points to, rather than the value of its variable. Use the CLI to automatically dereference pointers.
Dereferencing pointers is especially useful when you want to visualize the data linked together with pointers, since it can present the data as a unified array. Because the data appears as a unified array, you can use TotalView’array manipulation commands to view the data.
Automatic dereferencing can occur in the following situations:
*When TotalView initially displays a value.
*When you dive on a value in an aggregate or structure.
Displaying Areas of Memory
You can display areas of memory using hexadecimal, octal, or decimal values:
*An address
*A pair of addresses
All octal constants must begin with 0 (zero). Hexadecimal constants must begin with 0x.