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

list Command

The list command displays lines of a source file. It has identical syntax and identical functionality in native mode and in Java mode.

The default number of lines listed, N, is controlled by the dbx output_list_size environment variable.

Syntax

list

List N lines.

list number

List line number number.

list +

List next N lines.

list +n

List next n lines.

list -

List previous N lines.

list

List previous n lines.

list n1, n2

List lines from n1 to n2.

list n1, +

List from n1 to n1 + N.

list n1, +n2

List from n1 to n1 + n2.

list n1, -

List from n1-N to n1.

list n1, -n2

List from n1-n2 to n1.

list function

List the start of the source for function. list function changes the current scope. See Program Scope for more information.

list file_name

List the start of the file file_name.

list file_name:n

List file filename from line n.

where:

file_name is the file name of a source code file.

function is the name of a function to display.

number is the number of a line in the source file.

n is a number of lines to display.

n1 is the number of the first line to display.

n2 is the number of the last line to display. Where appropriate, the line number can be ”$” which denotes the last line of the file. Comma is optional.

Options
-i or -instr

Intermix source lines and assembly code.

-w or -wn

List N (or n) lines (window) around line or function. This option is not allowed in combination with the ”+” or ”-” syntax or when two line numbers are specified.

-a

When used with a function name, lists the entire function. When used without parameters, lists the remains of the current visiting function, if any.

Examples
list                      // list N lines starting at current line
list +5                      // list next 5 lines starting at current line
list -                    // list previous N lines
list -20                  // list previous 20 lines
list 1000                 // list line 1000
list 1000,$               // list from line 1000 to last line
list 2737 +24             // list line 2737 and next 24 lines
list 1000 -20             // list line 980 to 1000
list test.cc:33           // list source line 33 in file test.cc
list -w                   // list N lines around current line
list -w8 ”test.cc”func1   // list 8 lines around function func1
list -i 500 +10                // list source and assembly code for line
                500 to line 510