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.

Handling Signals<br />

Thread > Continuation Signal Command<br />

Handling Signals<br />

If your program contains a signal handler routine, you may need to adjust the<br />

way <strong>TotalView</strong> handles signals. The following table shows how <strong>TotalView</strong> handles<br />

UNIX signals if you do not tell it how to handle them:<br />

Signals that <strong>TotalView</strong> Passes Back<br />

to Your Program Signals that <strong>TotalView</strong> Treats as Errors<br />

SIGHUP SIGIO SIGILL SIGPIPE<br />

SIGINT SIGIO SIGTRAP SIGTERM<br />

SIGQUIT SIGPROF SIGIOT SIGTSTP<br />

SIGKILL SIGWINCH SIGEMT SIGTTIN<br />

SIGALRM SIGLOST SIGFPE SIGTTOU<br />

SIGURG SIGUSR1 SIGBUS SIGXCPU<br />

SIGCONT SIGUSR2 SIGSEGV SIGXFSZ<br />

SIGCHLD SIGSYS<br />

<strong>TotalView</strong> uses the SIGTRAP and SIGSTOP signals internally. If a process receives either<br />

of these signals, <strong>TotalView</strong> neither stops the process with an error nor passes the signal<br />

back to your program. You cannot alter the way <strong>TotalView</strong> uses these signals.<br />

On some systems, hardware registers affect how <strong>TotalView</strong> and your program<br />

handle signals such as SIGFPE. For more information, see “Interpreting<br />

the Status and Control Registers” on page 250 of this manual and the “Architectures”<br />

chapter in the <strong>TotalView</strong> Reference <strong>Guide</strong>.<br />

On an SGI computer, setting the TRAP_FPE environment variable to any value indicates<br />

that your program traps underflow errors. If you set this variable, however, you<br />

also need to use the controls in the File > Signals Dialog Box to indicate what<br />

<strong>TotalView</strong> should do with SIGFPE errors. (In most cases, you set SIGFPE to Resend.)<br />

You can change the signal handling mode using the File > Signals command.<br />

(See Figure 63.)<br />

CLI: dset TV::signal_handling_mode<br />

The signal names and numbers that <strong>TotalView</strong> displays are platform-specific.<br />

That is, what you see in this box depends on the computer and operating<br />

system in which your program is executing.<br />

You can change the default way in which <strong>TotalView</strong> handles a signal by setting<br />

the TV::signal_handling_mode variable in a .tvdrc startup file. For more<br />

information, see Chapter 4 of the “<strong>TotalView</strong> Reference <strong>Guide</strong>.”<br />

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

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

Saved successfully!

Ooh no, something went wrong!