| |||
| Home > RealView Debugger Commands > Alphabetical command reference > VMACRO | |||
The VMACRO command attaches the output of a macro to a window or file.
VMACRO {windowid | fileid}
[,macro_name(args)]
where:
windowid | fileidSpecifies the window of file to be associated with
the macro. This must be a user-defined or windowid.
See Window and file numbers for details.fileid
macro_nameSpecifies the name and call arguments of the macro that is to send its output to the specified window or file. This happens whenever the macro runs, either directly from the CLI or a command script, or by a breakpoint being hit to which the macro is attached.
The VMACRO command attaches a specified macro to a specified window or file. The window or file is updated whenever the macro is called. You can use the following to write data to the window or file:
If you do not supply a macro name, the window or file is disassociated from any macro. The VMACRO command runs asynchronously.
The following examples show how to use VMACRO:
vmacro 50,showmyvars()Use the macro showmyvars() to
write formatted variables to window 50.
vmacro 50Unbind all macros from user window 50.
fopen 100,’c:\myfiles\messages.txt’
vmacro 100,showmyvars() showmyvars() vmacro 100 vclose 100Use the macro showmyvars() to
write formatted variables to the file messages.txt,
unbind the macro from the file, and finally close the file.
The following commands provide similar or related functionality:
The following macros provide similar or related functionality: