5.7.1. Locating a function using the source code view

To locate the start of a function:

  1. Connect to your target.

  2. Load the required image, for example dhrystone.axf.

  3. Click the Locate PC button on the Debug toolbar to view the source file that contains the PC scope (dhry_1.c in this example).

  4. Locate a line in your source where the function is called.

    For the dhrystone.axf image, Figure 5.8 shows a call to the Proc_8() function at line 167 in dhry_1.c.

    Figure 5.8. Call to Proc_8() function

    Call to Proc_8() function

  5. Right-click on the Proc_8 function name to display the context menu.

  6. Select Locate Line... from the context menu to open the Prompt dialog box together with the chosen function name.

  7. Click Set. The source view changes to show the location of the chosen function, at line 93 in dhry_2.c, as shown in Figure 5.9. Because the function is defined in dhry_2.c, the file is opened if it is not already open.

    Figure 5.9. Proc_8() function located in source view

    Proc_8() function located in source view

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0153N
Non-ConfidentialID052111