JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.3: Debugging a Program With dbx     Oracle Solaris Studio 12.3 Information Library
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.  Macros

D.  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

macro 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

loadobject Command

The loadobject command lists and manages symbolic information from load objects. It is valid only in native mode.

Syntax

loadobject -list [regexp] [-a]

Show currently loaded load objects (see loadobject -list Command

loadobject -load loadobject

Load symbols for specified load object (see loadobject -load Command).

loadobject -unload [regexp]

Unload specified load objects (see loadobject -unload Command).

loadobject -hide [regexp]

Remove load object from dbx's search algorithm (see loadobject -hide Command).

loadobject -use [regexp]

Add load object to dbx's search algorithm (see loadobject -use Command).

loadobject -dumpelf [regexp]

Show various ELF details of the load object (see loadobject -dumpelf Command).

loadobject -exclude ex_regexp

Don't automatically load load objects matching ex_regexp (see loadobject -exclude Command).

loadobject exclude -clear

Clear the exclude list of patterns (see loadobject -exclude Command).

where:

regexp is a regular expression. If it is not specified the command applies to all load objects.

ex_regexp is not optional, it must be specified.

This command has a default alias lo.

loadobject -dumpelf Command

The loadobject -dumpelf command shows various ELF details of the load object. It is valid only in native mode.

Syntax

loadobject -dumpelf [regexp]

where:

regexp is a regular expression. If it is not specified the command applies to all load objects.

This command dumps out information related to the ELF structure of the load object file on disk. The details of this output are highly subject to change. If you want to parse this output, use the Solaris OS commands dump or elfdump.

loadobject -exclude Command

The loadobject -exclude command tells dbx not to automatically load load objects matching the specified regular expression.

Syntax

loadobject -exclude ex_regexp [-clear]

where:

ex_regexp is a regular expression.

This command prevents dbx from automatically loading symbols for load objects that match the specified regular expression. Unlike regexp in other loadobject subcommands, if ex_regexp is not specified, it does not default to all. If you do not specify ex_regexp, the command lists the excluded patterns that have been specified by previous loadobject -exclude commands.

If you specify -clear, the list of excluded patterns is deleted.

Currently this functionality cannot be used to prevent loading of the main program, or the runtime linker. Also, using it to prevent loading of C++ runtime libraries could cause the failure of some C++ functionality.

This option should not be used with runtime checking (RTC).

loadobject -hide Command

The loadobject -hide command removes loadobjects from dbx’s search algorithm.

Syntax

loadobject -hide [regexp]

where:

regexp is a regular expression. If it is not specified the command applies to all load objects.

This command removes a load object from the program scope, and hides its functions and symbols from dbx. This command also resets the ’preload’ bit

loadobject -list Command

The loadobject -list command shows currently loaded loadobjects. It is valid only in native mode.

Syntax

loadobject -list [regexp] [-a]

where:

regexp is a regular expression. If it is not specified the command applies to all load objects.

The full path name for each load object is shown along with letters in the margin to show status. Load objects that are hidden are listed only if you specify the -a option.

h

This letter means “hidden” (the symbols are not found by symbolic queries like whatis or stop in).

u

If there is an active process, u means “unmapped.”

p

This letter indicates a load object that is preloaded, that is, the result of a loadobject -load command or a dlopen event in the program.

For example:

(dbx) lo -list libm
/usr/lib/64/libm.so.1
/usr/lib/64/libmp.so.2
(dbx) lo -list ld.so
h  /usr/lib/sparcv9/ld.so.1 (rtld)

This last example shows that the symbols for the runtime linker are hidden by default. To use those symbols in dbxcommands, see loadobject -use Command.

loadobject -load Command

The loadobject -load command loads symbols for specified load objects. It is valid only in native mode.

Syntax

loadobject -load loadobject

where:

loadobject can be a full path name or a library in /usr/lib, /usr/lib/sparcv9, or /usr/lib/amd64. If there is a program being debugged, then only the proper ABI library directory will be searched.

loadobject -unload Command

The loadobject -unload command unloads specified load objects. It is valid only in native mode.

Syntax

loadobject -unload [regexp]

where:

regexp is a regular expression. If it is not specified the command applies to all load objects.

This command unloads the symbols for any load objects matching the regexp supplied on the command line. The main program loaded with the debug command cannot be unloaded. dbx may also refuse to unload other load objects that might be currently in use, or critical to the proper functioning of dbx.

loadobject -use Command

The loadobject -use command adds load objects from dbx’s search algorithm. It is valid only in native mode.

Syntax

loadobject -use [regexp]

where:

regexp is a regular expression. If it is not specified the command applies to all load objects.