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.

#<br />

source make_actions.tcl<br />

#<br />

dload fork_loop<br />

dset ARGS_DEFAULT {0 4 –wp}<br />

dstep<br />

catch {make_actions fork_loop.cxx} msg<br />

puts $msg<br />

Starting the CLI<br />

The only real difference between the last two examples is the first few lines<br />

in the file. In this second example, the shell ignores the backslash continuation<br />

character; Tcl processes it. This means that the shell executes the<br />

exec command while Tcl will ignore it.<br />

Starting Your Program<br />

The CLI lets you start debugging operations in several ways. To execute<br />

your program from within the CLI, enter a dload command followed by the<br />

drun command.<br />

If your program is launched from a starter program such as srun or yod, use the drerun<br />

command rather than drun to start your program. If you use drun, default arguments<br />

to the process are suppressed; drerun passes them on.<br />

The following example uses the totalviewcli command to start the CLI. This<br />

is followed by dload and drun commands. Since this was not the first time<br />

the file was run, breakpoints exist from a previous session.<br />

In this listing, the CLI prompt is “d1.”. The information preceding the greater-than<br />

symbol (>) symbol indicates the processes and threads upon which the current command<br />

acts. The prompt is discussed in “About the CLI Prompt” on page 207.<br />

% totalviewcli<br />

d1. dload arraysAlpha #load the arraysAlpha program<br />

1<br />

d1. dactions # Show the action points<br />

No matching breakpoints were found<br />

d1. dlist –n 10 75<br />

75 real16_array (i, j) = 4.093215 * j+2<br />

76 #endif<br />

77 26 continue<br />

78 27 continue<br />

79<br />

80 do 40 i = 1, 500<br />

81 denorms(i) = x'00000001'<br />

82 40 continue<br />

83 do 42 i = 500, 1000<br />

84 denorms(i) = x'80000001'<br />

d1. dbreak 80 # Add two action points<br />

1<br />

d1. dbreak 83<br />

2<br />

d1. drun # Run the program to the action point<br />

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

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

Saved successfully!

Ooh no, something went wrong!