Name

macro

macro expand expression
macro expand-once expression
macro define macro body
macro define macro(args) body
macro undefine macro

Work with C preprocessor macros. As of GDB 6.3, not all of these are implemented.

macro expand expression

Display the result of macro expanding expression. The results are not evaluated, thus they don’t need to be syntactically valid. expand may be abbreviated exp.

macro expand-once expression

Expand only those macros whose names appear in expression instead of fully expanding all macros. expand-once may be abbreviated exp1. Not implemented as of GDB 6.3.

macro define macro bodymacro define macro(args) body

Define a macro named macro with replacement text body. As in C and C++, the first form defines a symbolic constant, while the second form defines a macro that accepts arguments. Not implemented as of GDB 6.3.

macro undefine macro

Remove the definition of the macro named macro. This works only for macros defined with macro define; you cannot undefine a macro in the debuggee. Not implemented as of GDB 6.3.

Get GDB Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.