30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 184: Variable Window<br />

with Machine Instructions<br />

Displaying Variables<br />

If a Variable Window is already being displayed, you can change the type to<br />

$void and add an array specifier. If you do this, the results are similar to<br />

what is shown in this figure.<br />

Changing Types to Display Machine Instructions<br />

You can display machine instructions in a Variable Window by changing the<br />

text in the Variable Window Type field. All you need do is edit the type string<br />

to be an array of $code data types. You also need to add an array specifier to<br />

tell <strong>TotalView</strong> how many instruction to display. For example, the following<br />

changes the Variable Window so that it displays three machine instructions:<br />

$code[3]<br />

The Variable Window lists the following information about each machine<br />

instruction:<br />

Offset+Label The symbolic address of the location as a hexadecimal<br />

offset from a routine name.<br />

Code The hexadecimal value stored in the location.<br />

Instruction The instruction and operands stored in the location.<br />

You can also edit the value listed in the Value field for each machine<br />

instruction.<br />

Displaying Machine Instructions<br />

You can display the machine instructions for entire routines as follows:<br />

� Dive on the address of an assembler instruction in the Source Pane (such<br />

as main+0x10 or 0x60). A Variable Window displays the instructions for<br />

the entire function, and highlights the instruction you dove on.<br />

� Dive on the PC in the Stack Frame Pane. A Variable Window displays the<br />

instructions for the entire function that contains the PC, and also highlights<br />

the instruction pointed to by the PC. (See Figure 184.)<br />

� Cast a variable to type $code or array of $code.<br />

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

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

Saved successfully!

Ooh no, something went wrong!