HP WDB 5.7 Release Notes
HP WDB 5.7 provides the following support for debugging macros:
• Displaying Macro Definitions
HP WDB 5.7 provides the following commands to display macro definitions:
— show macro <macro-name> or info macro <macro-name>
Displays the macro definition, source file name, and the line number.
— macro expand <macro-name>
Expands the macro and the parameters in the macro. If there are any parameters in the
macro, they are substituted in the macro definition when the definition is displayed.
• Evaluating Macros
HP WDB 5.7 enables you to evaluate a macro and display the output. You can evaluate the
macro by using the commonly used gdb commands for evaluating and displaying
expressions, such as print.
HP WDB supports the evaluation of macros with variables, constants, complex algebraic
expressions involving variables, nested macros, and function calls.
HP WDB does not support the evaluation of macros with multiple statements in the macro
definitions, or the evaluation of macros with stringifying and pasting tokens in the macro
definitions.
Compiler Options to Enable Macro Debugging
To enable macro debugging, the program must be compiled with the
+macro_debug=[all|none|ref] compiler option and with one of the -g options (-g, -g0,
or -g1) to enable macro debugging.
For example:
cc -g +macro_debug=all -o sample sample.c
The following options are available for the +macro_debug compiler option:
• all
To view and evaluate all the macro expressions in the program, you must compile the
program with +macro_debug=all. This option can cause a significant increase in object
file size.
• ref
To view and evaluate only the reference macros in the program, you must compile the
program with +macro_debug=ref. This is the default for -g, -g1, or -g0.
• none
To disable macro debugging, you must compile the program with +macro_debug=none.
The macro debugging features are supported for +objdebug and +noobjdebug compiler
options.
Printing the Execution Path Entries for the Current Frame or Thread
HP WDB 5.7 enables you to print the execution path entries in the current frame, or the current
thread for programs running on Integrity systems. This feature is supported only for compiler
versions A.06.15 and later. This feature enables the display of the execution path taken across
branched modules. The first instruction in each block associated with the executed branch is
displayed.
What Is New in This Version 9