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

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

Impacts of Running a Program Under dbx

Commands That Alter the State of the Program

assign Command

pop Command

call Command

print Command

when Command

fix Command

cont at Command

B.  Event Management

C.  Macros

D.  Command Reference


Commands That Alter the State of the Program

The following commands might make modifications to your program:

assign Command

The assign command assigns the value of the expression to variable. Using it in dbx permanently alters the value of variable.

assign variable = expression

pop Command

The pop command pops a frame or frames from the stack:


Pop current frame.

pop number

Pop number frames.

pop -f number

Pop frames until specified frame number.

Any calls popped are re-executed upon resumption, which might result in unwanted program changes. pop also calls destructors for objects local to the popped functions.

For more information, see pop Command.

call Command

When you use the call command in dbx, you call a procedure and the procedure performs as specified:

call proc([params])

The procedure could modify something in your program. dbx is making the call as if you had written it into your program source.

For more information, see call Command.

print Command

To print the value of the expressions, type:

print expression, ...

If an expression has a function call, the same considerations apply as with the call Command command. With C++, you should also be careful of unexpected side effects caused by overloaded operators.

For more information, see print Command.

when Command

The when command has a general syntax as follows:

when event-specification [modifier] {command; ... }

When the event occurs, the commands are executed.

When you get to a line or to a procedure, a command is performed. Depending upon which command is issued, this could alter your program state.

For more information, see when Command.

fix Command

You can use the fix command to make immediate changes to your program:


Although it is a very useful tool, the fix command recompiles modified source files and dynamically links the modified functions into the application.

Make sure to check the restrictions for fix and continue. See Memory Leak (mel) Error.

For more information, see fix Command.

cont at Command

The cont at command alters the order in which the program runs. Execution is continued at line line. id is required if the program is multithreaded.

cont at line [ id ]

This could change the outcome of the program.