| |||
| Home > Working with Macros > About macros | |||
Macros are interpreted C code running on the host with access to target memory and symbols, user-defined debugger symbols (in host or target memory), and debugger functions. Macros can access debugger variables, external windows and programs, and can be attached to breakpoints, aliases, and windows.
A macro can contain:
a sequence of expressions
string formatting controls
statements
calls to other macros
predefined macros
target functions
debugger commands.
You can define and use macros at any time during a debugging session to use the commands or statements contained in the macro. You call the macro with a single command using the name. The macro definition might contain parameters that you change each time the macro is called.
When a macro is defined, you can use it as:
a complex command or in an expression
an attachment to a breakpoint to create breakpoint condition testing
an attachment to a window or file where the macro can send information.
After a macro has been loaded into RealView Debugger, the definition is stored in the symbol table. If the symbol table is recreated, for example when an image is loaded with symbols, any macros are automatically deleted. Disconnecting also clears any macros.
This section gives an overview of macros in RealView Debugger. It includes the following sections: