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.

Simplifying What You’re Debugging<br />

You need to keep your focus narrow so that you’re only investigating a limited<br />

number of behaviors. This is where debugging becomes an art. A multiprocess,<br />

multi-threaded program can be doing a great number of things.<br />

Understanding where to look when problems occur is the art.<br />

For example, you most often execute commands at the default focus. Only<br />

when you think that the problem is occurring in another process do you<br />

change to that process. You still execute in the default focus, but this time<br />

the default focus changes to another process.<br />

Although it seems like you’re often shifting from one focus to another, you<br />

probably will do the following:<br />

� Modify the focus so that it affects just the next command. If you are using<br />

the GUI, you might select this process and thread from the list displayed<br />

in the Root Window. If you are using the CLI, you use the dfocus<br />

command to limit the scope of a future command. For example, the following<br />

is the CLI command that steps thread 7 in process 3:<br />

dfocus t3.7 dstep<br />

� Use the dfocus command to change focus temporarily, execute a few<br />

commands, and then return to the original focus.<br />

This chapter is just an overview of the threads, processes, and groups.<br />

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

details.<br />

32 Chapter 2: About Threads, Processes, and Groups

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

Saved successfully!

Ooh no, something went wrong!