| |||
| Home > Working with Breakpoints > Breakpoints in RealView Debugger > Specifying the entry point to a function | |||
You can set a breakpoint at the entry point of a function
with the @entry symbol. This enables you to set
a breakpoint on a function without having to open the source file containing
that function, and without having to scroll down the Dsm tab to
find it.
To set a breakpoint on the entry to a function, specify .
This identifies the first location in the function after the code
that sets up the function parameters. In general, function\@entry refers
to either:function\@entry
the first executable line of code in that function
the first auto local that is initialized in that 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 triggers only when the argument value has
a specific value on entry to the function:
bi,when:{value==2} func_1\@entry
This is different to specifying a function name without the @entry qualifier.
For example, in the dhrystone.axf example 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).