![HP 68000 Series Скачать руководство пользователя страница 211](http://html.mh-extra.com/html/hp/68000-series/68000-series_user-manual_157001211.webp)
Macro arguments
You can use formal macro arguments throughout the macro definition. They
are replaced at execution time by the actual parameters present in the macro
call. The actual parameter is coerced to the corresponding formal parameter
type. If coercion is not possible, an error occurs.
You must list the macro’s arguments (if any), along with their associated types,
when you define the macro. For example, the following listing defines
arguments for the built-in macro strcpy():
Debugger Macro Add int strcpy(target, source)
char *target;
char *source;
Macro variables
Variables that are local to the macro may be created within the macro. The
definition of local variables follows the rules of C, with the exception that you
cannot define variables with initializers. Variables may be defined to have a
simple type, or they may be of type array or pointer. Derived types (such as
structures and unions), enumerated types, and typedefs are not legal within
macros.
The macro processor does not recognize the C keywords extern, auto, static,
and register. The macro processor reports an error if these C keywords are
used. Static variables are not scoped within a macro. However, symbols
created with the Symbol Add command (debugger symbols) are globally
scoped, and can be accessed from within a macro. R egister variables (such as
@PC) may also be accessed from within a macro.
Target program symbols can also be accessed from within a macro. Variables
which are globally scoped within the target program can be accessed directly.
File static, function static, and automatic variables can be accessed directly
only if the current context of the debugger is the module or function in which
they are scoped. Otherwise, they require a module or function name as a
qualifier before they can be accessed. For example, assume the following
definition exists in your target program, in a file called init.c:
...
static int i; /* file static */
...
foo(int parm)
{
static int j; /* function static */
auto int k; /* function local */
...
Chapter 6: Using Macros and Command Files
Using Macros
189
Содержание 68000 Series
Страница 1: ...User s Guide HP B1466 68000 Series Debugger Simulator ...
Страница 22: ...Contents xxii ...
Страница 23: ...Part 1 Quick Start Guide ...
Страница 24: ...Part 1 2 ...
Страница 25: ...1 Getting Started with the Graphical Interface How to get started using the debugger s graphical interface 3 ...
Страница 57: ...Part 2 User s Guide ...
Страница 58: ...Part 2 36 ...
Страница 59: ...2 Entering Debugger Commands How to enter debugger commands using the mouse or the keyboard 37 ...
Страница 93: ...3 Loading and Executing Programs How to load a program into the debugger and control its execution 71 ...
Страница 140: ...Chapter 3 Loading and Executing Programs Using the Debugger with the Branch Validator 118 ...
Страница 141: ...4 Viewing Code and Data How to find and display source code and memory contents Chapter 4 Viewing Code and Data 119 ...
Страница 207: ...6 Using Macros and Command Files How to use macros and command files to make debugging easier 185 ...
Страница 234: ...Chapter 6 Using Macros and Command Files Using Command Files 212 ...
Страница 253: ...Window Delete 55 Window Delete 73 Chapter 7 Configuring the Debugger Modifying Display Area Windows 231 ...
Страница 266: ...Chapter 7 Configuring the Debugger Setting X Resources 244 ...
Страница 267: ...Part 3 Concept Guide ...
Страница 268: ...Part 3 246 ...
Страница 269: ...8 X Resources and the Graphical Interface An introduction to X resources 247 ...
Страница 281: ...Part 4 Reference ...
Страница 282: ...Part 4 260 ...
Страница 283: ...9 Debugger Commands Detailed descriptions of command line commands 261 ...
Страница 436: ...Chapter 9 Debugger Commands Window Toggle_View 414 ...
Страница 466: ...Chapter 10 Expressions and Symbols in Debugger Commands Symbolic Referencing 444 ...
Страница 467: ...11 Predefined Macros 445 ...
Страница 504: ...Chapter 11 Predefined Macros write 482 ...
Страница 505: ...12 Debugger Error Messages A list of the error messages generated by the debugger 483 ...
Страница 524: ...Chapter 12 Debugger Error Messages 502 ...
Страница 525: ...13 Debugger Versions Information about how this version of the debugger differs from previous versions 503 ...
Страница 531: ...Part 5 Installation Guide ...
Страница 532: ...Part 5 510 ...
Страница 533: ...14 Installation How to install the debugger software on your computer 511 ...
Страница 584: ...Index 562 ...