Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)
3. You can use the following commands for debugging inline functions in Integrity systems:
step
next
list
backtrace
frame <n>
info locals
info args
breakpoint
The following commands are not available for debugging inline functions in Integrity systems:
info frame
disassembly
Debugging Macros
HP WDB 5.7 and later versions of the debugger enable you to display and evaluate macro
definitions for programs running on Integrity systems. This feature is available only for compiler
versions A.06.15 and later.
Viewing and Evaluating Macro Definitions
HP WDB 5.7 and later versions of the debugger provide the following support for de- bugging
macros:
• Displaying Macro Definitions
Displaying Macro Definitions HP WDB provides the following commands to display macro
definitions:
- macro show [macro-name] or info macro [macro-name]
Displays the macro definition, source file name, and the line number. For example:
(gdb) info macro VAR2
Defined at scope.c:21
#define VAR2 201
- 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.
For example:
#define YY 6
#define MAC (67 + YY)
...
$ gdb
...
(gdb) macro expand MAC
expands to: (67 + 6)
• Evaluating Macros
HP WDB 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.
Debugging Macros 109