4.9.2. Attaching a macro to a breakpoint

You can attach a predefined macro, or a macro you have created yourself, to a breakpoint. If you want to attach a macro you have created yourself, you must first load the macro definition into the debugger as described in Defining a user-created macro as a symbol.

To attach a macro to a breakpoint:

  1. Display the Set Address/Data Breakpoint dialog box using one of the methods described in Displaying the Set Address/Data Breakpoint dialog box.

  2. Enter the location of the breakpoint, for example 0x8704.

  3. Click the New button in the Qualifiers group to display the New Qualifiers menu.

  4. Select the option User Macro... to display the data entry prompt, shown in Figure 4.21.

    Figure 4.21. Breakpoint macro entry prompt

    Breakpoint macro entry prompt
  5. Enter the macro name and arguments, if any.

    The predefined macro shown in Figure 4.21 displays a message box to halt execution if the Yes key is pressed.

  6. Click Set to confirm your entry.

  7. The Set Address/Data Breakpoint dialog box now contains the macro in the Qualifiers group for the conditional breakpoint, shown in Figure 4.22.

    Figure 4.22. Set breakpoint with macro attached

    Set breakpoint with macro attached
  8. Click OK to confirm the breakpoint settings and close the dialog box.

  9. Click Run to execute the program and trigger the breakpoint.

Copyright © 2002-2005 ARM Limited. All rights reserved.ARM DUI 0153G
Non-Confidential