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 />

Figure 189: Dive in All<br />

a<br />

b<br />

c<br />

a<br />

b<br />

c<br />

a<br />

b<br />

c<br />

a<br />

b<br />

c<br />

a<br />

b<br />

c<br />

Similarly, my_var.an_element[10] and my_var[10].an_element are also<br />

expressions, since both <strong>TotalView</strong> and your program must figure out where<br />

the data associated with the element resides.<br />

The expression in the Expression field is dynamic. That is, you can tell<br />

<strong>TotalView</strong> to evaluate what you enter before trying to obtain a memory<br />

address. For example, if you enter my_var.an_element[i], <strong>TotalView</strong> evaluates<br />

the value of i before it redisplays your information. A more complicated<br />

example is my_var.an_element[i+1]. In this example, <strong>TotalView</strong> must<br />

use its internal expression evaluation system to create a value before it<br />

retrieves data values.<br />

You can replace the variable expression with something completely different,<br />

such as i+1, and <strong>TotalView</strong> simply displays the value produced by evaluating<br />

the expression.<br />

Chapter 17, “Evaluating Expressions,” on page 381 has a discussion of the<br />

evaluation system and typing expressions in an eval point in the Tools ><br />

Evaluate Window. In contrast, the expressions you can type in the<br />

Expression List Window are restricted with the principal restriction being<br />

that what you type cannot have side effects. For example, you cannot use<br />

an expression that contains a function call or an operator that changes<br />

memory, such as ++ or --.<br />

302 Chapter 14: Examining and Changing Data<br />

a<br />

a<br />

a<br />

a<br />

a

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

Saved successfully!

Ooh no, something went wrong!