The stop command sets a source-level breakpoint.
The stop command has the following general syntax:
stop event-specification [modifier]
When the specified event occurs, the process is stopped.
This section describes some of the more important syntaxes that are valid in native mode. For information about additional events, see Setting Event Specifications.
Stop execution now. Only valid within the body of a when command.
Stop execution now but do not update the Oracle Developer Studio IDE Debugger windows.
Stop execution when the memory specified by address-expression has been accessed. See also Stopping Execution When an Address Is Accessed.
Stop execution at line-number. See Setting a Breakpoint at a Line of Source Code.
Stop execution when the condition denoted by condition-expression evaluates to true.
Stop execution when function is called. See Setting a Breakpoint in a Function.
C++ only: Set breakpoints on all member functions of a class, struct, union, or template class. -norecurse is the default. If -recurse is specified, the base classes are included. See also Setting Breakpoints in All Member Functions of a Class.
C++ only: set breakpoints on all member functions name. See Setting Breakpoints in Member Functions of Different Classes.
C++ only: set breakpoint on entry into any non-static method of the class and all its base classes when called from the object object-expression. -recurse is the default. If -norecurse is specified, the base classes are not included. See Setting Breakpoints in Objects.
line-number is the number of a source code line.
function is the name of a function.
class-name is the name of a C++ class, struct, union, or template class.
mode specifies how the memory was accessed. It can be composed of one or all of the letters:
The memory at the specified address has been read.
The memory has been written to.
The memory has been executed.
mode can also contain the following:
Stops the process after the access (default).
Stops the process before the access.
name is the name of a C++ function.
object-expression identifies a C++ object.
variable is the name of a variable.
The following modifiers are valid in native mode.
The specified event occurs only when condition-expression evaluates to true.
Execution stops only if the specified event occurs during the extent of function.
Starting at 0, each time the event occurs, the counter is incremented. When number is reached, execution stops and the counter is reset to 0.
Starting at 0, each time the event occurs, the counter is incremented. Execution is not stopped.
Create a temporary breakpoint that is deleted when the event occurs.
Create the breakpoint in a disabled state.
Do instruction-level variation. For example, step becomes instruction level stepping, and at takes a text address for an argument instead of a line number.
Make this event permanent across debug. Certain events (like breakpoints) are not appropriate to be made permanent. delete all will not delete permanent handlers. To delete permanent handlers, use delete hid.
Hide the event from the status command. Some import modules might choose to use this. Use status -h to see them.
Execution stops only if the specified event occurs in the specified LWP.
Execution stops only if the specified event occurs in the specified thread.
The following specific syntaxes are valid in Java mode.
Stop execution when the memory specified by class-name.field-name has been accessed.
Stop execution at line-number.
Stop execution at line-number in filename.
Stop execution when the value of field-name in class-name has changed.
Stop execution when any class is loaded.
Stop execution when class-name is loaded.
Stop execution when any class is unloaded.
Stop execution when class-name is unloaded.
Stop execution when the condition denoted by condition-expression evaluates to true.
Stop execution when class-name.method-name has been entered, and the first line is about to be executed. If no parameters are specified and the method is overloaded, a list of methods is displayed.
Stop execution when class-name.method-name has been entered, and the first line is about to be executed.
Set breakpoints on all non-member methods class-name.method-name.
Set breakpoints on all non-member methods class-name.method-name.
Stop execution when a Java exception has been thrown.
Stop execution when a Java exception of type has been thrown.
where:
class-name is the name of a Java class.. You can use either of the following:
The package path using a period (.) as a qualifier; for example, test1.extra.T1.Inner
The full path name preceded by a pound sign (#) and using slash (/) and dollar sign ($) as qualifiers. For example, #test1/extra/T1$Inner. Enclose class-name in quotation marks if you use the $ qualifier.
condition-expression can be any expression, but it must evaluate to an integral type.
field-name is the name of a field in the class.
filename is the name of a file.
line-number is the number of a source code line.
method-name is the name of a Java method.
mode specifies how the memory was accessed. It can be composed of one or all of the letters:
The memory at the specified address has been read.
The memory has been written to.
mode can also contain the following:
Stops the process before the access.
The program counter will point at the offending instruction.
parameters are the method’s parameters.
type is a type of Java exception. -unhandled or -unexpected are valid values for type.
The following modifiers are valid in Java mode:
The specified event occurs only when condition-expression evaluates to true.
Starting at 0, each time the event occurs, the counter is incremented. When number is reached, execution stops and the counter is reset to 0.
Starting at 0, each time the event occurs, the counter is incremented. Execution is not stopped.
Create a temporary breakpoint that is deleted when the event occurs.
Create the breakpoint in a disabled state.
See stopi Command for information about setting a machine-level breakpoint.
For a list and the syntax of all events, see Setting Event Specifications.