C and C++ SoftBench User's Guide

Using SoftBench Debugger
Debugging C++ Programs
Chapter 7 225
Using Breakpoints for Exception Handling
HP-UX provides support for debugging C++ exceptions. You can enable
intercepts on the "throw" and "catch" events. "Throw" intercepts occur at
the time a C++ exception is detected, and "catch" intercepts occur where
the exception is handled.
See “Handling Signals and Events” on page 214 for a description of
intercepts.
Accessing Inherited C++ Values
C++ objects can inherit variables and member functions from other
classes. SoftBench Debugger allows you to specify whether inherited
member functions and variables should be included in certain
operations.
Choosing "Options: C++ Settings…" displays the C++ "Options" dialog
box. The settings in this dialog box specify how many "levels" of
inheritance should be affected by the respective operations.
The breakpoint, trace, and watchpoint settings affect inherited members
in classes, instances, and templates. If you select " All", the monitor
affects all members in an object regardless of the source of inheritance. If
you select " Count", only the specified number of "levels" are affected.
For example, if you set the count to 0, the monitor affects only the first
"level" of inheritance. This means SoftBench Debugger sets the monitor
only on local (non-inherited) member functions or variables. Setting the
count to 1 means the monitor affects the object's local functions or
variables and functions or variables inherited from one level of
"ancestor" objects are affected.
You can use the "Print" setting when printing an object. If you select
" All", SoftBench Debugger prints all component variables, regardless
of the source of inheritance. If you set the count to 1, SoftBench
Debugger prints the object's local variables and any variables inherited
from one level of "ancestor".
Debugging Static Constructors
When you load a program for debugging, SoftBench Debugger begins
executing it and pauses at the first line of main(). This is ideal for most
debugging situations.