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


1.  Getting Started With dbx

2.  Starting dbx

3.  Customizing dbx

Using the dbx Initialization File

Creating a .dbxrc File

Initialization File Sample

Setting dbx Environment Variables

The dbx Environment Variables and the Korn Shell

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


Using the dbx Initialization File

The dbx initialization file stores dbx commands that are executed each time you start dbx. Typically, the file contains commands that customize your debugging environment, but you can place any dbx commands in the file. If you customize dbx from the command line while you are debugging, those settings apply only to the current debugging session.

Note - A . dbxrc file should not contain commands that execute your code. However, you can put such commands in a file, and then use the dbx source command to execute the commands in that file.

During startup, the search order is:

  1. Installation directory (unless you specify the -S option to the dbx command) /installation_directory/lib/dbxrc (the default installation_directory is /opt/solstudio12.2 on Solaris platforms and /opt/oracle/solstudio12.2 on Linux platform). If your Oracle Solaris Studio software is not installed in the default installation_directory, dbx derives the path to the dbxrc file from the path to the dbx executable.

  2. Current directory ./.dbxrc

  3. Home directory $HOME/.dbxrc

Creating a .dbxrc File

To create a .dbxrc file that contains common customizations and aliases, type:

(dbx) help .dbxrc>$HOME/.dbxrc

You can then customize the resulting file by using your text editor to uncomment the entries you want to have executed.

Initialization File Sample

Here is a sample .dbxrc file:

dbxenv input_case_sensitive false
catch FPE

The first line changes the default setting for the case sensitivity control:

The next line is a debugging command, catch, which adds a system signal, FPE, to the default list of signals to which dbx responds, stopping the program.