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.

Creating Custom Groups<br />

The way in which you specify the P/T set argument is the same as the way<br />

that you specify a P/T set for the dfocus command. For example,<br />

watchpoint(L) returns all threads in the current lockstep group. The only<br />

operator that differs is comm, whose argument is a process.<br />

The dot operator (.), which indicates the current set, can be helpful when<br />

you are editing an existing set.<br />

The following examples clarify how you use these operators and functions.<br />

The P/T set a (all) is the argument to these operators.<br />

f {breakpoint(a) | watchpoint(a)} dstatus<br />

Shows information about all threads that stopped at<br />

breakpoints and watchpoints. The a argument is the<br />

standard P/T set indicator for all.<br />

f {stopped(a) - breakpoint(a)} dstatus<br />

Shows information about all stopped threads that are<br />

not stopped at breakpoints.<br />

f {. | breakpoint(a)} dstatus<br />

Shows information about all threads in the current set,<br />

as well as all threads stopped at a breakpoint.<br />

f {g.3 - p6} duntil 577<br />

Runs thread 3 along with all other processes in the<br />

group to line 577. However, it does not run anything in<br />

process 6.<br />

f {($PTSET) & p123}<br />

Uses just process 123 in the current P/T set.<br />

Creating Custom Groups<br />

Debugging a multi-process or multi-threaded program most often focuses<br />

on running the program in one of two ways: either you run everything or<br />

run one or two things. Figuring out what you should be running, however, is<br />

a substantial part of the art of debugging. You can make things easier on<br />

yourself if you divide your program into groups, and then control these<br />

groups separately. When you need to do this, use the Groups > Custom<br />

Groups Dialog Box. (See Figure 164 on page 277.) This dialog box also lets<br />

you alter a group’s contents as well as delete the group.<br />

You can only manage process groups with this dialog box. Thread groups can only be<br />

managed using the CLI. In addition, the groups you create must reside within one control<br />

group.<br />

When you first display this dialog box, <strong>TotalView</strong> also displays a second dialog<br />

box. Use this dialog box to enter the group’s name.<br />

276 Chapter 13: Using Groups, Processes, and Threads

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

Saved successfully!

Ooh no, something went wrong!