Sun Studio 12 Update 1: Debugging a Program With dbx

Breakpoint Event Specifications

A breakpoint is a location where an action occurs, at which point the program stops executing. The following are event specifications for breakpoint events.

in function

The function has been entered, and the first line is about to be executed. The first executable code after the prolog is used as the actual breakpoint location. This may be a line where a local variable is being initialized. In the case of C++ constructors, execution stops after all base class constructors have executed. If the -instr modifier is used (see -instr), it is the first instruction of the function about to be executed. The function specification can take a formal parameter signature to help with overloaded function names or template instance specification. For example:

 stop in mumble(int, float, struct Node *)

Note –

Do not confuse in function with the-in function modifier.

at [filename:]line_number

The designated line is about to be executed. If you specify filename, then the designated line in the specified file is about to be executed. The file name can be the name of a source file or an object file. Although quotation marks are not required, they may be necessary if the file name contains special characters. If the designated line is in template code, a breakpoint is placed on all instances of that template.

at address_expression

The instruction at the given address is about to be executed. This event is available only with thestopi command (see stopi Command) or with the -instr event modifier (see -instr).

infile filename

This event puts a breakpoint on every function defined in a file. The stop infile command iterates through the same list of functions as the funcs -f filename command.

Method definitions in .h files, template files, or plain C code in .h files, such as the kind used by the regexp command, might contribute function definitions to a file, but these definitions are excluded.

If the specified filename is the name of an object file (that is, it ends in .o). breakpoints are put on every function that occurs in that object file.

The stop infile list.h command does not put breakpoints on all instances of methods defined in the list.h file. Use events like inclass or inmethod to do so.

The fix command might eliminate or add a function to a file. The stop infile command puts breakpoints on all old versions of function in a file as well as any functions that might be added in the future.

No breakpoints are put on nested functions or subroutines in Fortran files.

You can use the clear command to disable a single breakpoint in the set created by the infile event.

infunction function

Equivalent to in function for all overloaded functions named function or all template instantiations thereof.

inmember function inmethod function

Equivalent to in function or the member function named function for every class.

inclass classname [-recurse | -norecurse]

Equivalent to in function for all member functions that are members of classname, but not any of the bases of classname. -norecurse is the default. If -recurse is specified, the base classes are included.

inobject object-expression [-recurse | -norecurse]

A member function called on the specific object at the address denoted by object-expression has been called.stop inobject ox is roughly equivalent to the following, but unlike inclass, bases of the dynamic type of ox are included. -recurse is the default. If -norecurse is specified, the base classes are not included.

stop inclass dynamic_type(ox) -if this==ox