JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.2: Debugging a Program With dbx
search filter icon
search icon

Document Information

Preface

1.  Getting Started With dbx

2.  Starting dbx

3.  Customizing dbx

4.  Viewing and Navigating To Code

5.  Controlling Program Execution

6.  Setting Breakpoints and Traces

7.  Using the Call Stack

8.  Evaluating and Displaying Data

9.  Using Runtime Checking

10.  Fixing and Continuing

11.  Debugging Multithreaded Applications

12.  Debugging Child Processes

13.  Debugging OpenMP Programs

14.  Working With Signals

15.  Debugging C++ With dbx

16.  Debugging Fortran Using dbx

17.  Debugging a Java Application With dbx

18.  Debugging at the Machine-Instruction Level

19.  Using dbx With the Korn Shell

20.  Debugging Shared Libraries

A.  Modifying a Program State

B.  Event Management

C.  Command Reference

assign Command

Native Mode Syntax

Java Mode Syntax

attach Command

Syntax

To Attach to a Running Java Process

bsearch Command

Syntax

call Command

Native Mode Syntax

Java Mode Syntax

cancel Command

Syntax

catch Command

Syntax

check Command

Syntax

clear Command

Syntax

collector Command

Syntax

collector archive Command

Syntax

collector dbxsample Command

Syntax

collector disable Command

Syntax

collector enable Command

Syntax

collector heaptrace Command

Syntax

collector hw_profile Command

Syntax

collector limit Command

Syntax

collector mpitrace Command

Syntax

collector pause Command

Syntax

collector profile Command

Syntax

collector resume Command

Syntax

collector sample Command

Syntax

collector show Command

Syntax

collector status Command

Syntax

collector store Command

Syntax

collector synctrace Command

Syntax

collector tha Command

Syntax

collector version Command

Syntax

cont Command

Syntax

dalias Command

Syntax

dbx Command

Native Mode Syntax

Java Mode Syntax

Options

dbxenv Command

Syntax

debug Command

Native Mode Syntax

Java Mode Syntax

Options

delete Command

Syntax

detach Command

Native Mode Syntax

Java Mode Syntax

dis Command

Syntax

Options

display Command

Native Mode Syntax

Java Mode Syntax

down Command

Syntax

dump Command

Syntax

edit Command

Syntax

examine Command

Syntax

exception Command

Syntax

exists Command

Syntax

file Command

Syntax

files Command

Native Mode Syntax

Java Mode Syntax

fix Command

Syntax

fixed Command

Syntax

fortran_modules Command

Syntax

frame Command

Syntax

func Command

Native Mode Syntax

Java Mode Syntax

funcs Command

Syntax

gdb Command

Syntax

handler Command

Syntax

hide Command

Syntax

ignore Command

Syntax

import Command

Syntax

intercept Command

Syntax

java Command

Syntax

jclasses Command

Syntax

joff Command

Syntax

jon Command

Syntax

jpkgs Command

Syntax

kill Command

Syntax

language Command

Syntax

line Command

Syntax

Examples

list Command

Syntax

Options

Examples

listi Command

loadobject Command

Syntax

loadobject -dumpelf Command

Syntax

loadobject -exclude Command

Syntax

loadobject -hide Command

Syntax

loadobject -list Command

Syntax

loadobject -load Command

Syntax

loadobject -unload Command

Syntax

loadobject -use Command

Syntax

lwp Command

Syntax

lwps Command

Syntax

mmapfile Command

Syntax

Example

module Command

Syntax

modules Command

Syntax

native Command

Syntax

next Command

Native Mode Syntax

Java Mode Syntax

nexti Command

Syntax

omp_loop Command

Syntax

omp_pr Command

Syntax

omp_serialize Command

Syntax

omp_team Command

Syntax

omp_tr Command

Syntax

pathmap Command

Syntax

Examples

pop Command

Syntax

print Command

Native Mode Syntax

Java Mode Syntax

proc Command

Syntax

prog Command

Syntax

quit Command

Syntax

regs Command

Syntax

Example (SPARC platform)

replay Command

Syntax

rerun Command

Syntax

restore Command

Syntax

rprint Command

Syntax

rtc showmap Command

Syntax

rtc skippatch Command

Syntax

run Command

Native Mode Syntax

Java Mode Syntax

runargs Command

Syntax

save Command

Syntax

scopes Command

Syntax

search Command

Syntax

showblock Command

Syntax

showleaks Command

Syntax

showmemuse Command

Syntax

source Command

Syntax

status Command

Syntax

Example

step Command

Native Mode Syntax

Java Mode Syntax

stepi Command

Syntax

stop Command

Syntax

Native Mode Syntax

Java Mode Syntax

stopi Command

Syntax

suppress Command

Syntax

sync Command

Syntax

syncs Command

Syntax

thread Command

Native Mode Syntax

Java Mode Syntax

threads Command

Native Mode Syntax

Java Mode Syntax

trace Command

Syntax

Native Mode Syntax

Java Mode Syntax

tracei Command

Syntax

uncheck Command

Syntax

undisplay Command

Native Mode Syntax

Java Mode Syntax

unhide Command

Syntax

unintercept Command

Syntax

unsuppress Command

Syntax

unwatch Command

Syntax

up Command

Syntax

use Command

watch Command

Syntax

whatis Command

Native Mode Syntax

Java Mode Syntax

when Command

Syntax

Native Mode Syntax

Java Mode Syntax

wheni Command

Syntax

where Command

Native Mode Syntax

Java Mode Syntax

whereami Command

Syntax

whereis Command

Syntax

which Command

Syntax

whocatches Command

Syntax

Index

stop Command

The stop command sets a source-level breakpoint.

Syntax

The stop command has the following general syntax:

stop event_specification [modifier]

When the specified event occurs, the process is stopped.

Native Mode Syntax

The following specific syntaxes are some of the more important syntaxes that are valid in native mode. For additional events, see Setting Event Specifications.

stop [ -update ]

Stop execution now. Only valid within the body of a when command.

stop -noupdate

Stop execution now but do not update the Oracle Solaris Studio IDE Debugger windows.

stop access mode address_expression [,byte_size_expression ]

Stop execution when the memory specified by address_expression has been accessed. See also Stopping Execution When an Address Is Accessed.

stop at line-number

Stop execution at line_number. See also Setting a stop Breakpoint at a Line of Source Code.

stop change variable

Stop execution when the value of variable has changed.

stop cond condition_expression

Stop execution when the condition denoted by condition_expression evaluates to true.

stop in function

Stop execution when function is called. See also Setting a stop Breakpoint in a Function.

stop inclass class_name [ -recurse | -norecurse ]

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.

stop infile file_name

Stop execution when any function in file_name is called.

stop infunction name

C++ only: Set breakpoints on all non-member functions name.

stop inmember name

C++ only: set breakpoints on all member functions name. See Setting Breakpoints in Member Functions of Different Classes.

stop inobject object_expression [ -recurse | -norecurse ]

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 also 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:

r

The memory at the specified address has been read.

w

The memory has been written to.

x

The memory has been executed.

mode can also contain the following:

a

Stops the process after the access (default).

b

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.

-if condition_expression

The specified event occurs only when condition_expression evaluates to true.

-in function

Execution stops only if the specified event occurs during the extent of function.

-count number

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.

-count infinity

Starting at 0, each time the event occurs, the counter is incremented. Execution is not stopped.

-temp

Create a temporary breakpoint that is deleted when the event occurs.

-disable

Create the breakpoint in a disabled state.

-instr

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.

-perm

Make this event permanent across debug. Certain events (like breakpoints) are not appropriate to be made permanent. delete all will not delete permanent handlers, use delete hid.

-hidden

Hide the event from the status command. Some import modules may choose to use this. Use status -h to see them.

-lwp lwp_id

Execution stops only if the specified event occurs in the given LWP.

-thread thread_id

Execution stops only if the specified event occurs in the given thread.

Java Mode Syntax

The following specific syntaxes are valid in Java mode.

stop access mode class_name.field_name

Stop execution when the memory specified by class_name.field_name has been accessed.

stop at line_number

Stop execution at line_number.

stop at file_name:line_number

Stop execution at line_number in file_name.

stop change class_name.field_name

Stop execution when the value of field_name in class_name has changed.

stop classload

Stop execution when any class is loaded.

stop classload class_name

Stop execution when class_name is loaded.

stop classunload

Stop execution when any class is unloaded.

stop classunload class_name

Stop execution when class_name is unloaded.

stop cond condition_expression

Stop execution when the condition denoted by condition_expression evaluates to true.

stop in class_name.method_name

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 in class_name.method_name([parameters])

Stop execution when class_name.method_name has been entered, and the first line is about to be executed.

stop inmethod class_name.method_name

Set breakpoints on all non-member methods class_name.method_name.

stop inmethod class_name.method_name ([parameters])

Set breakpoints on all non-member methods class_name.method_name.

stop throw

Stop execution when a Java exception has been thrown.

stop throw type

Stop execution when a Java exception of type has been thrown.

where:

class_name is the name of a Java class, using either the package path (using period (.) as a qualifier; for example, test1.extra.T1.Inner) or 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.

file_name 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:

r

The memory at the specified address has been read.

w

The memory has been written to.

mode can also contain the following:

b

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 can be used for type.

The following modifiers are valid in Java mode:

-if condition_expression

The specified event occurs only when condition_expression evaluates to true.

-count number

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.

-count infinity

Starting at 0, each time the event occurs, the counter is incremented. Execution is not stopped.

-temp

Create a temporary breakpoint that is deleted when the event occurs.

-disable

Create the breakpoint in a disabled state.

See also stopi Command for setting a machine-level breakpoint.

For a list and the syntax of all events see Setting Event Specifications.