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

debug Command

The debug command lists or changes the program being debugged. In native mode, it loads the specified application and begins debugging the application. In Java mode, it loads the specified Java application, checks for the existence of the class file, and begins debugging the application.

Native Mode Syntax

debug

Print the name and arguments of the program being debugged.

debug program_name

Begin debugging program_name with no process or core.

debug -c core program_name

Begin debugging program_name with core file core.

debug -p process_id program_name

Begin debugging program_name with process ID process_id.

debug program_name core

Begin debugging program with core file core. program_name may be -. dbx will attempt to extract the name of the executable from the core file. For details, see Debugging a Core File.

debug program_name process_id

Begin debugging program_name with process ID process_id. program_name may be -; dbx finds it using /proc.

debug -f ...

Force loading of a core file, even if it doesn’t match.

debug -r ...

The -r option causes dbx to retain all display, trace, when, and stop commands. With no -r option, an implicit delete all andundisplay O are performed.

debug -clone ...

The -clone option causes another dbx process to begin execution, permitting debugging of more than one process at a time. Valid only if running in the Oracle Solaris Studio IDE.

debug -clone

Starts another dbx process debugging nothing. Valid only if running in the Oracle Solaris Studio IDE.

debug [options] -- program_name

Start debugging program_name, even if program_name begins with a dash.

where:

core is the name of a core file.

options are the options listed inOptions.

pid is the process ID of a running process.

program_name is the path name of the program.

Leaks checking and access checking are turned off when a program is loaded with the debug command. You can enable them with the check command (see check Command).

Java Mode Syntax

debug

Print the name and arguments of the program being debugged.

debug program_name [.class | .jar]

Begin debugging program_name with no process.

debug -p process_id program_name [.class | .jar]

Begin debugging program_name with process ID process_id.

debug program_name [.class | .jar] process_id

Begin debugging program_name with process ID process_id. program_name may be -; dbx finds it using /proc

debug -r

The -r option causes dbx to retain all watch commands, display commands, trace commands, when commands, andstop commands. With no -r option, an implicitdelete all command and undisplay 0 command are performed.

debug -clone ...

The -clone option causes another dbx process to begin execution, permitting debugging of more than one process at a time. Valid only if running in the Oracle Solaris Studio IDE.

debug -clone

Starts another dbx process debugging nothing. Valid only if running in the Oracle Solaris Studio IDE.

debug [options] -- program_name{.class | .jar}

Start debugging program_name, even if program_name begins with a dash.

where:

file_name is the name of a file.

options are the options listed inOptions.

process_id is the process ID of a running process.

program_name is the path name of the program.

Options

-c commands

Execute commands before prompting for input.

-d

Used with -s, removes

-e

Echo input commands.

-I directory_name

Add directory_name to pathmap set (see pathmap Command.

-k

Save and restore keyboard translation state.

-q

Suppress messages about reading stabs.

-r

Run program; if program exits normally, then exit.

-R

Print the readme file for dbx.

-s file

Use file instead of current_directory/.dbxrc or $HOME/.dbxrc as the startup file

-S

Suppress reading of initialization file /installation_directory/lib/dbxrc.

-V

Print the version of dbx.

-w n

Skip n frames on where command.

--

Marks the end of the option list; use this if the program name starts with a dash.