10.13.2. Setting a breakpoint at the entry point to a function

You can set a breakpoint at the entry point of a function by qualifying the function name with the @entry symbol. This identifies the first location in the function after the code that sets up the function parameters. In general, function\@entry refers to either:

To set a breakpoint on the entry to a function:

  1. Locate a source line containing a call to the function.

    For example locate line 156 in dhry_1.c.

  2. Right-click on the function name, for example, Func_2, to display the context menu.

  3. Select Set Break... from the context menu.

    The Create Breakpoint dialog box is displayed.

  4. Enter function\@entry for the breakpoint Location.

    In this example, enter Func_2\@entry.

  5. Click OK.

    The breakpoint is set in the body of the function.

If no lines exist that set up any parameters for the function (for example, an embedded assembler function), then the following error message is displayed:


Error: E0039: Line number not found.

As an example, if you have a function func_1(value) you might want to set a breakpoint that activates only when the argument value has a specific value on entry to the function:


bi,when:{value==2} func_1\@entry

Note

This is different to specifying a function name without the @entry qualifier. For example, in the dhrystone.axf image:

  • specifying main sets a breakpoint at 0x000083D0, the first address in the function (line 78 in dhry_1.c)

  • specifying main\@entry sets a breakpoint at 0x000083D8, which is the first line of executable code (line 91 in dhry_1.c).

Copyright © 2002-2006 ARM Limited. All rights reserved.ARM DUI 0153H
Non-Confidential