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.

Setting a Breakpoint<br />

introduced the types of groups contained with <strong>TotalView</strong>. That chapter<br />

ignored what happens when you execute a <strong>TotalView</strong> command on a group.<br />

For example, what does “stepping a group” actually mean? What happens<br />

to processes and threads that aren’t in this group?<br />

Associated with these three terms is a fourth term: arena. The arena is the<br />

collection of processes, threads, and groups that are affected by a debugging<br />

command. This collection is called an arena list.<br />

In the GUI, the arena is most often set using the pulldown list in the toolbar.<br />

You can set the arena using commands in the menubar. For example,<br />

there are eight next commands. The difference between them is the arena;<br />

that is, the difference between the next commands is the processes and<br />

threads that are the target of what the next command runs.<br />

When <strong>TotalView</strong> executes any action command, the arena decides the<br />

scope of what can run. It doesn’t, however, determine what does run.<br />

Depending on the command, <strong>TotalView</strong> determines the TOI, POI, or GOI,<br />

and then executes the command’s action on that thread, process, or<br />

group. For example, suppose <strong>TotalView</strong> steps the current control group:<br />

� <strong>TotalView</strong> needs to know what the TOI is so that it can determine what<br />

threads are in the lockstep group—<strong>TotalView</strong> only lets you step a lockstep<br />

group.<br />

� The lockstep group is part of a share group.<br />

� This share group is also contained in a control group.<br />

By knowing what the TOI is, the GUI also knows what the GOI is. This is<br />

important because, while <strong>TotalView</strong> knows what it will step (the threads in<br />

the lockstep group), it also knows what it will allow to run freely while it is<br />

stepping these threads. In the CLI, the P/T set determines the TOI.<br />

Setting a Breakpoint<br />

You can set breakpoints in your program by selecting the boxed line numbers<br />

in the Source Code pane of a Process window. A boxed line number<br />

indicates that the line generates executable code. A icon masking a<br />

line number indicates that a breakpoint is set on the line. Selecting the<br />

icon clears the breakpoint.<br />

When a program reaches a breakpoint, it stops. You can let the program<br />

resume execution in any of the following ways:<br />

� Use the single-step commands described in “Using Stepping Commands” on<br />

page 239.<br />

� Use the set program counter command to resume program execution at<br />

a specific source line, machine instruction, or absolute hexadecimal<br />

value. See “Setting the Program Counter” on page 248.<br />

252 Chapter 13: Using Groups, Processes, and Threads

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

Saved successfully!

Ooh no, something went wrong!