Sun Studio 12 Update 1: Debugging a Program With dbx

Setting Breakpoints in All Member Functions of a Class

To set a breakpoint in all member functions of a specific class, use the stop inclass command.

By default, breakpoints are inserted only in the class member functions defined in the class, not those that it might inherit from its base classes. To insert breakpoints in the functions inherited from the base classes also, specify the -recurse option.

To set a breakpoint in all member functions defined in the class shape, type:


(dbx) stop inclass shape

To set a breakpoint in all member functions defined in the class shape, and also in functions inherited from the class, type:


(dbx) stop inclass shape -recurse

For more information on specifying an inclass event, see inclass classname [-recurse | -norecurse] and stop Command.

Due to the large number of breakpoints that may be inserted by stop inclass and other breakpoint selections, you should be sure to set the dbx environment variable step_events to on to speed up the step and next commands (see Efficiency Considerations).