8.3.2. Running to the start of a function using the source view

To run the image to the start of a function using the source view:

  1. Locate a call to the required function in your source code.

  2. Right-click on the function name, to display the context menu. For example, at line 149 of dhry_1.c, right-click on Proc_5.

  3. Select Locate Line... from the context menu to display the Prompt dialog box containing the function name Proc_5.

  4. Click Set. The dialog box closes and the start of the function (Proc_5 in this case) is displayed. A blue outlined arrow also shows the located line, shown in Figure 8.3.

    Note

    If the function is defined in a different source file, then RealView Debugger opens the source file.

    Figure 8.3. Located line in the source code

    Located line in the source code

  5. Right-click in the margin next to the line indicated by the arrow, to display the context menu.

  6. Select Run To Here from the context menu to start execution.

    Where appropriate, enter the required input to any prompts displayed by the image. Your image runs until the start address of the chosen function is reached.

    If the function is not defined in your source code, then there might be more than one level of call stack between the function and the code for which source is available. Therefore, the source that contains the nearest calling function is displayed, and execution appears to stop at the line of source for that function.You might have to click the Disassembly tab to see the address where the function is defined.

    For example, if you choose the call to malloc at line 92 of dhry_1.c, then execution appears to stop at line 91. Click the Disassembly tab to see the address of the function code.

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