To Call A Macro - HP 68000 Series User Manual

Debugger/simulator
Table of Contents

Advertisement

Chapter 6: Using Macros and Command Files
Using Macros
If you need to access local program variables in a macro, pass them to the
macro as parameters.

To call a macro

• Select Breakpoints→Edit/Call Macro ...→Call.
Or:
• Using the command line, enter:
Debugger Macro Call
Enter the name of the macro to be called, and press the < Return> key.
When a macro is called with the Debugger Macro Call command, its return
value is ignored. Macros are typically called in this manner for the side effects
they generate.
Example
If you have the following macro definition:
Debugger Macro Add void stackchk()
{
}
.
the command:
Debugger Macro Call stackchk()
displays, in the journal window, the amount of stack used and the amount of
stack left.
196
/* The symbols 'stack' and 'TopOfStack' exist in the compiler's */
/* environment library, and are addresses which indicate the
/* bottom and the top of the system stack.
/* debugger reserved symbol which contains the current value of */
/* the processor's stack pointer.
$Expression Printf "%d bytes of stack used", TopOfStack - @sp$;
$Expression Printf "%d bytes of stack available", @sp - stack$;
*/
The symbol @sp is a */
*/

Advertisement

Table of Contents
loading

This manual is also suitable for:

B1466

Table of Contents