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.

Diving in Variable Windows<br />

Rebinding the Variable Window<br />

When you restart your program, <strong>TotalView</strong> must identify the thread in which<br />

the variable existed. For example, suppose variable my_var was in thread<br />

3.6. When you restart your program, <strong>TotalView</strong> tries to rebind the thread to<br />

a newly created thread. Because the order in which the operating system<br />

starts and executes threads can differ, there’s no guarantee that the thread<br />

3.6 in the current context is the same thread as what it was previously.<br />

Problems can occur. To correct rebinding issues, use the Threads box in the<br />

Variable Window toolbar to specify the thread to which you want to bind<br />

the variable.<br />

Another way to use the Threads box is to change to a different thread to<br />

see the variable or expression’s value there. For example, suppose variable<br />

my_var is being displayed in thread 3.4. If you type 3.5 in the Threads box,<br />

<strong>TotalView</strong> updates the information in the Expression List Window so that it<br />

is what exists in thread 3.5.<br />

Closing Variable Windows<br />

When you finish analyzing the information in a Variable Window, use the<br />

File > Close command to close the window. You can also use the File ><br />

Close Similar command to close all Variable Windows.<br />

Diving in Variable Windows<br />

If the variable being displayed in a Variable Window is a pointer, structure, or<br />

array, you can dive on the value. This new dive, which is called a nested dive,<br />

tells <strong>TotalView</strong> to replace the information in the Variable Window with information<br />

about the selected variable. If this information contains nonscalar<br />

data types, you can also dive on these data types. Although a typical data<br />

structure doesn’t have too many levels, repeatedly diving on data lets you<br />

follow pointer chains. That is, diving lets you see the elements of a linked list.<br />

The following topics contain information related to this topic:<br />

� “Displaying an Array of Structure’s Elements” on page 300<br />

� “Changing What the Variable Window Displays” on page 301<br />

<strong>TotalView</strong> lets you see a member of an array of structures as a single array<br />

across all the structures. See “Displaying an Array of Structure’s Elements” on<br />

page 300 for more information.<br />

<strong>TotalView</strong> remembers your dives. This means that you can use the undive/<br />

redive buttons to view where you already dove. (See Figure 185 on<br />

page 299.)<br />

298 Chapter 14: Examining and Changing Data

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

Saved successfully!

Ooh no, something went wrong!