12.2.1. Searching for text

To quickly find a text string in the current source file displayed in the File Editor pane:

  1. Enter the required text string into the Find data field above the window.

  2. Press the Enter key to find the first occurrence.

  3. Press Enter again to find the next occurrence.

As you enter a search string, RealView Debugger copies the string to the clipboard. This means that the most-recently used string is available when you next display the Find, or Find and Replace, dialog box.

To find a text string in the current source file using the Find dialog box:

  1. Position the cursor in the current file.

  2. Select Edit → Find... to display the Find dialog box, shown in Figure 12.1.

    Figure 12.1. Find dialog box

    Find dialog box
  3. Enter the required text string into the Find field in the dialog box.

    The last search string used might already be displayed if available from the clipboard.

  4. Click the Find button.

  5. When a match is highlighted either:

    • click the Find button again to search for the next occurrence of the text string

    • replace the current selection, see Searching and replacing text.

Table 12.1 describes the options available from the Find dialog box.

Table 12.1. Setting temporary search settings 

Option

Usage

Search Backwards

By default, a file is searched forwards, that is from the current cursor position to the end of the file. Set this option if you want to reverse the search direction. This might be useful if you miss a previous match and want to retrace your steps to verify the occurrence or to make a replacement.

Reg-expression

By default, the File Editor assumes that the string in the Find field is a text string. Set this option to force the editor to interpret the string as a regular expression.

Stop at Top/Bottom

By default, any search operation cycles through the current file and returns to the starting point. Set this option to force the search to stop when it reaches the top or the bottom of a file.

Insensitive Searches

By default, any search is case sensitive. That is uppercase and lowercase are distinct so searching for ARM does not find Arm or arm. Setting this option means that uppercase and lowercase are treated as identical.

When the first match is found, you can move the focus to the File Editor pane and press F3 to find the next occurrence of the text string. It is not necessary to close the Find dialog box.

Note

See Configuring searches in the workspace for details on how to configure the Search settings in your workspace.

Searching multiple tabs

If you display two or more file tabs in the current Code window then the search is restricted only to the file tab that is currently visible. However, you can select another file tab without closing the Find dialog box to continue the search.

Copyright © 2005, 2006 ARM Limited. All rights reserved.ARM DUI 0291C
Non-Confidential