The commands described in this section might make modifications to your program.
The assign command assigns the value of expression to variable. Using it in dbx permanently alters the value of variable.
assign variable = expression
The pop command pops a frame or frames from the stack:
Pop current frame.
Pop number frames.
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.
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 your program. dbx makes the call as if you had written it into your program source.
For more information, see call Command.
To print the value of the expressions, type:
print expression, ...
If an expression has a function call, printing the expression causes the call command to execute. Therefore, the same considerations apply as with the call Command. With C++, you should also be careful of unexpected side effects caused by overloaded operators.
For more information, see print Command.
The general syntax of the when command is as follows:
when event-specification [modifier] {command; ... }
When the event occurs, the commands are executed. Depending upon which command is issued, this action could alter your program state.
For more information, see when 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.
Note that the fix and continue feature isn't supported on Intel Linux or SPARC Linux. Make sure to check for other restrictions for fix and continue. See Memory Leak (mel) Error.
For more information, see fix Command.
The cont at command alters the order in which the program runs. Execution is continued at line line. The ID is required if the program is multithreaded.
cont at line [ ID ]
This command could change the outcome of the program.