5.4. Locating the line of code using a symbol in the source view

You can locate a line of code for a symbol in the source that you are currently viewing in the Code window. For example, you might want to locate the definition of a called function.

To locate a line of code:

  1. Connect to your target.

  2. Load an image, for example dhrystone.axf.

  3. Click the Locate PC button on the Debug toolbar to view the source. In this example, the PC is at the entry point at line 78 of file dhry_1.c, marked with yellow arrow and a red box.

  4. Locate the line of code containing the symbol you want to locate:

    1. Scroll down to line 149 in the source file dhry_1.c.

    2. Right-click on the symbol to display the context menu. For example, right-click on Proc_5.

    3. Select Locate Line... from the context menu to open the Prompt dialog box. The chosen symbol is inserted in the field.

    4. Click Set to display the code view from the specified line. A blue bordered arrow identifies the line. Figure 5.5 shows an example:

      Figure 5.5. Located line of source

      Located line of source

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