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.

Displaying Variables<br />

since the variable no longer exists. The Status area can contain other information<br />

that alerts you to issues and problems with a variable.<br />

When you debug recursive code, <strong>TotalView</strong> doesn’t automatically refocus a<br />

Variable Window onto different instances of a recursive function. If you<br />

have a breakpoint in a recursive function, you need to explicitly open a new<br />

Variable Window to see the local variable’s value in that stack frame.<br />

CLI: dwhere, dup, and dprint<br />

Use dwhere to locate the stack frame, use dup to move to it, and<br />

then use dprint to display the value.<br />

Select the View > Compilation Scope > Floating command to tell <strong>TotalView</strong><br />

that it can refocus a Variable Window on different instances. For more information,<br />

see “Viewing Variables in Different Scopes as Program Executes” on<br />

page 288.<br />

Controlling the Information Being Displayed<br />

<strong>TotalView</strong> can display more information about your variable than its value.<br />

This information is sometimes called meta-information. You can control how<br />

much of this meta-information it displays by clicking on the More and Less<br />

buttons. (See Figure 171 on page 286.)<br />

As the button names indicate, clicking More displays more meta-information<br />

and clicking Less displays less of it.<br />

The two most useful fields are Type, which shows you what your variable’s<br />

actual type is, and Expression, which allows you to control what is being<br />

displayed. This is sometimes needed because <strong>TotalView</strong> tries to show the<br />

type in the way that it thinks you declared it in your program.<br />

The online help describes all the meta-information fields.<br />

Seeing Value Changes<br />

<strong>TotalView</strong> can tell you when a variable’s value changes in several ways.<br />

� When your program stops at a breakpoint, <strong>TotalView</strong> adds a yellow highlight<br />

to the variable’s value if it has changed. This is shown in Figure 172<br />

on page 286.<br />

If the thread is stopped for another reason—for example, you’ve stepped<br />

the thread—and the value has changed, <strong>TotalView</strong> does not add yellow<br />

highlighting to the line.<br />

� You can tell <strong>TotalView</strong> to display the Last Value column. Do this by selecting<br />

Last Value in the column menu, which is displayed after you click on<br />

the column menu ( ) icon. (See Figure 173 on page 287.)<br />

Notice that <strong>TotalView</strong> has highlighted all items that have changed within<br />

an array. In a similar fashion it can show the individual items that have<br />

changed within a structure.<br />

In general, <strong>TotalView</strong> only retains the value for data items displayed within<br />

the Variable Window. At times, <strong>TotalView</strong> may track adjacent values within<br />

<strong>TotalView</strong> <strong>Users</strong> <strong>Guide</strong>: version 8.7 285

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

Saved successfully!

Ooh no, something went wrong!