Using SoftBench Debugger

Handling Signals and Events

Handling Signals and Events

The UNIX operating system notifies a program of asynchronous events via signals. HP-UX also supports other "events" such as exec (program load) and throw (used in C++ exception handling). SoftBench Debugger handles these events using intercepts.

Intercepts are distinct from any signal handlers in your program. They intercept signals before they are sent to your program, and may either pass signals through to your program (to be handled by your signal handlers) or discard them.

Viewing and Editing Intercepts

"Execution: Signals/Intercepts…" brings up a dialog box with the current state of debugger signal and event handling, and allows you to control what SoftBench Debugger does with any intercept.

You can modify intercept handling only when SoftBench Debugger is in control. When your program runs, you must interrupt it (using Interrupt Program) or wait for it to hit a breakpoint before you can specify intercept handlers.

The scrollable list at the top of the "Intercepts" dialog box (see Figure 7-13) shows the current status of all available intercepts. This list shows all the attributes of each intercept, and also shows the "monitor number" (useful if you want to issue certain commands to DDE) and the number of times the intercept has been received. Note that the "monitor number" does not correspond to the UNIX signal number.

214

Chapter 7

Page 214
Image 214
HP UX SoftBench Software manual Handling Signals and Events, Viewing and Editing Intercepts, 214