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

Macro Expansion

Macro Definitions

Compiler and Compiler Options

Tradeoffs in Functionality

Limitations

Skimming Errors

Using the pathmap Command To Improve Skimming

D.  Command Reference

Index

Macro Definitions

dbx can recognize macro definitions in two ways:

Which one of the two methods dbx uses to recognize macro definitions is controlled by the dbx environment variable macro_source (seeTable 3-1 in Chapter 3, Customizing dbx).

There are several factors to take into account in choosing which method you want dbx to use.

Compiler and Compiler Options

One factor is the availability of various types of information that depend on which compiler and compiler options you used to build your code. The following table shows which methods you can choose depending on the compiler and debugging information options.

Table C-1 Macro Definition Methods Available for Various Build Options

Compiler
-g option
Debug Information Format
Methods That Work
Oracle Solaris Studio
-g
DWARF
Skimming
Oracle Solaris Studio
-g
stabs
Skimming
Oracle Solaris Studio
-g3
DWARF
Skimming and from compiler
Oracle Solaris Studio
-g3
stabs
Skimming (-g3 option with -xdebugformat=stabs option is not supported)
gnu
-g
DWARF
Neither
gnu
-g
stabs
N/A
gnu
-g3
DWARF
From compiler
gmu
-g3
stabs
N/A

Tradeoffs in Functionality

Another factor to take into account is the tradeoffs in functionality depending on which method you choose:

Limitations