Predefined macros

There are a number of predefined macros available in RealView Debugger for performing commonly used functions.

You can use the predefined macros in expressions on the command line, or you can call them from any of your user-defined macros. The following list gives a brief description of the predefined macros supported by RealView Debugger. For more details, click on the macro name.

image\inform.gif There are more examples of the predefined macros in the RealView Debugger v1.8 Command Line Reference Guide.

byte Returns a byte value from the specified address

call Calls a function in the image that is loaded on the current connection

dword Returns a long value from the specified address

error Processes an error message returned from the macro

fgetc Returns a byte from file or window

fopen Opens a file for reading, writing, or both.

fputc Writes a byte to a file

fread Reads a file into a buffer

fwrite Writes a buffer to a file

getsym Takes an address and returns a local string

isalive Verifies that a symbol is currently active

memchr Searches for a character in memory

memclr Clears memory values

memcpy Copies characters from memory

memset Sets the value of characters in memory

prompt_file Displays a dialog containing message text. The user choice is entered into the buffer (local or target).

prompt_list Displays a dialog containing message text and a list of choices.

This returns:
0=Cancel
1=first list index
2=second list index

prompt_text Displays a dialog containing message text. The user choice is entered into the buffer (local or target).

prompt_yesno Displays a dialog containing question text and buttons (Yes and No).

This returns:
0=Yes
2=No

prompt_yesno_cancel Displays a dialog containing question text and buttons (Yes, No and Cancel).

 This returns:
0=Yes
1=Cancel
2=No

reg_str Takes a register name from a string and returns the value

strcat Concatenates two strings

strchr Locates the first occurrence of a character in a string

strcmp Compares two strings

strcpy Copies a string

stricmp Performs string comparison without case distinction

strlen Returns string length

strncmp Performs limited comparison of two strings

until Breaks when an expression evaluates to True

when Breaks when an expression evaluates to True

word Returns a word value at the specified address