| |||
Home > Using Macros for Debugging > Viewing a macro |
View the contents of a macro by:
Opening the script file defining the macro in RealView Debugger.
Opening the script file in an external text editor.
Using the Add/Edit Macros dialog box after the macro is loaded:
Load the macro.
Select Add/Edit Debugger Macros... from the Tools menu to display the Add/Edit Macros dialog box. The Existing Macros display list shows any macro you have previously loaded.
Select the required macro in the Existing Macros list.
Click Show to see the contents of the macro.
When viewing the macro contents in the Add/Edit Macros dialog box, the Macro Entry Area in the dialog box does not show the macro DEFINE command or the terminator (a period used as the first and only character on the last line).
Using the SHOW command after the macro is loaded:
Load the macro.
Specify the macro as an argument to the SHOW command. For example:
> show tutorial
def int tutorial(var1,var2,var3)
int var1;
int var2;
int var3;
{
$printf "value of var1=%d",var1$;
$printf "value of var2=%d",var2$;
$printf "value of var3=%d",var3$;
return var1+var2+var3;
}
When viewing a macro with the SHOW command, the terminator is not displayed.
You cannot use the SHOW command to view predefined macro definitions.
See also:
the following in the RealView Debugger Command Line Reference Guide:
Alphabetical command reference for details of the SHOW command.