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.

Manipulating Processes and Threads<br />

<strong>TotalView</strong> disables the Thread > Go command if asynchronous thread control is not<br />

available. If you enter a thread-level command in the CLI when asynchronous thread<br />

controls aren’t available, <strong>TotalView</strong> tries to perform an equivalent action. For example, it<br />

continues a process instead of a thread.<br />

For a single-process program, the Process > Go and Group > Go commands<br />

are equivalent. For a single-threaded process, the Process > Go and<br />

Thread > Go commands are equivalent.<br />

Creating a Process Without Starting It<br />

The Process > Create command creates a process and stops it before the<br />

first statement in your program executes. If you link a program with shared<br />

libraries, <strong>TotalView</strong> allows the dynamic loader to map into these libraries.<br />

Creating a process without starting it is useful when you need to do the following:<br />

� Create watchpoints or change the values of global variables after a process<br />

is created, but before it runs.<br />

� Debug C++ static constructor code.<br />

CLI: dstepi<br />

While there is no CLI equivalent to the Process > Create command,<br />

executing the dstepi command produces the same effect.<br />

Creating a Process by Single-Stepping<br />

The <strong>TotalView</strong> single-stepping commands lets you create a process and run<br />

it to the beginning of your programs. The single-stepping commands available<br />

from the Process menu are as shown in the following table:<br />

GUI command CLI command Creates the process and ...<br />

Process > Step dfocus p dstep Runs it to the first line of the main() routine.<br />

Process > Next dfocus p dnext Runs it to the first line of the main() routine;<br />

this is the same as Process > Step.<br />

Process ><br />

Step Instruction<br />

Process ><br />

Next Instruction<br />

dfocus p dstepi Stops it before any of your program executes.<br />

dfocus p dnexti Runs it to the first line of the main() routine.<br />

This is the same as Process > Step.<br />

If a group-level or thread-level stepping command creates a process, the<br />

behavior is the same as if it were a process-level command.<br />

Chapter 13, “Using Groups, Processes, and Threads,” on page 251 contains a detailed<br />

discussion of setting the focus for stepping commands.<br />

Stepping and Setting Breakpoints<br />

Several of the single-stepping commands require that you select a source<br />

line or machine instruction in the Source Pane. To select a source line,<br />

place the cursor over the line and click your left mouse button. If you select<br />

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

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

Saved successfully!

Ooh no, something went wrong!