11.15.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 point 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 Create Breakpoint... from the context menu to display the Create Breakpoint dialog box.

  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:

binstr,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 Func_1 sets a breakpoint at 0x00009044, the first address in the function

  • specifying Func_1\@entry sets a breakpoint at 0x0000904C, which is the first line of executable code of the function (line 122 in dhry_2.c).

Copyright © 2002-2009 ARM Limited. All rights reserved.ARM DUI 0153K
Non-Confidential