Handling Signals

If your program contains a signal handler routine, you may need to adjust the way TotalView handles signals. You can do this by using:

Unless you tell it otherwise, here is how TotalView handles UNIX signals:

Signals that TotalView Passes Back to Your Program
Signals that TotalView Treats as an Error
SIGHUP
SIGIO
SIGILL
SIGPIPE
SIGINT
SIGIO
SIGTRAP
SIGTERM
SIGQUIT
SIGPROF
SIGIOT
SIGTSTP
SIGKILL
SIGWINCH
SIGEMT
SIGTTIN
SIGALRM
SIGLOST
SIGFPE
SIGTTOU
SIGURG
SIGUSR1
SIGBUS
SIGXCPU
SIGCONT
SIGUSR2
SIGSEGV
SIGXFSZ
SIGCHLD

SIGSYS

TotalView uses the SIGTRAP and SIGSTOP signals internally. If the process encounters either signal, TotalView neither stops the process with an error nor passes the signal back to your program. Further, you cannot alter the way TotalView uses these signals.

On some systems, hardware registers can affect how signals such as SIGFPE are handled. For more information, refer to Interpreting Status and Control Registers and Architectures.

Note:   On SGI machines, setting the TRAP_FPE environment variable to any value indicates that your program will trap underflow errors. If you set this variable, however, you will also need to use the File >Signals dialog box to indicate what TotalView should do with SIGFPE errors. (In most cases, you will set SIGFPE to Resend.) As an alternative, you can use the -signal_handling_mode "action_list" option or the totalview*signalHandlingMode X resource to "Resend=SIGFPE".

You can change the signal handling mode by going to the Process Window and selecting the File > Signals command. The dialog box shown in the following figure appears.

File > Signals Dialog Box

Note:   The signal names and numbers shown in the dialog box are platform-specific.

When your program encounters an error signal, TotalView stops all related processes. If you do not want this behavior, deselect the Stop control group on error signal (which is found on the Options Page of the File > Preference's dialog box).

Also by default, when your program encounters an error signal, TotalView opens or raises the Process Window. Deselecting the Open process window on error signal check box, found on the Options Page of the File > Preference's dialog box, tells TotalView that it should not open or raise the window. You can also use an X resource (totalview*popOnError) or the -pop_on_error command-line option to create a default setting for this check box.

If processes in a multiprocess program encounter an error, TotalView only opens a Process Window for the first process that encounters an error. This stops TotalView from filling up the screen with Process Windows.

If you select the Open process window at breakpoint check box, which is found on the File > Preference's Action Points Page, TotalView opens or raises the Process Window when your program reaches a breakpoint. You can also set TotalView's default behavior using the -pop_at_breakpoint command-line option or an X Resource (totalview*popAtBreakpoint)

If necessary, scroll the signal list to the signal being changed. Make your changes by selecting one of the following radio buttons:

Error

Stops the process, places it in the error state, and displays an error in the title bar of the Process Window. If the Stop control group on error signal check box is selected, TotalView also stops all related processes. You should select this signal handling mode for severe error conditions such as SIGSEGV and SIGBUS signals.

Stop

Stops the process and places it in the stopped state. Select this signal handling mode if you want TotalView to handle this signal the same as a SIGSTOP signal.

Resend

Sends the signal to the process. If your program contains a signal handling routine, you should use this mode for all the signals that it handles. By default, the common signals for terminating a process (SIGKILL and SIGHUP) use this mode.

Ignore

Discards the signal and restarts the process without a signal.

Note:   Do not use Ignore mode for fatal signals, such as SIGSEGV and SIGBUS. If you do, TotalView can get caught in a signal/resignal loop with your program; the signal will immediately recur because the failing instruction will reexecute repeatedly.

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0