|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris Studio 12.3: Debugging a Program With dbx Oracle Solaris Studio 12.3 Information Library|
Macro expansion is applied to both the variable and the expression in an assign command (see assign Command).
In the call command (see call Command), macro expansion is applied to the name of the function being called as well as to the parameters being passed.
The macro command (see macro Command) takes any expression and macro and expands the macro. For example:
(dbx) macro D(1, 2) Expansion of: D(1, 2) is: d(1,2)
If you give the whatis command (see whatis Command) a macro, it shows the macro's definition. For example:
(dbx) whatis B #define B(x) b(x)
If you give the which command (see which Command) a macro, it shows where the macro that is currently active in the scope is defined. For example:
(dbx) which B2 `a.out`macro_wh.c`B2 # defined at defs2.h:3 # included from defs1.h:3 # included from macro_wh.c:23
If you give the whereis command (see whereis Command) a macro, it shows all of the places where the macro has been defined. The list is limited to modules for which dbx has already read debugging information. For example:
(dbx) whereis U macro: U # defined at macro_wh.c:21 macro: U # undefined at defs1.h:5
In general, the +m option in dbx commands causes the commands to bypass macro expansion. The -m option forces macro expansion even if the dbx environment variable macro_expand is set to off. An exception is the -m option within the $ construct, where -m only causes macros to be expanded, with no evaluation taking place. This exception facilitates macro expansion in shell scripts.