forward-search (gdb mode only)

Search forward in the source for a string or repeat last search.

Syntax

forward-search [string]

Parameters

string

The character string to search for.

Description

This command searches forward, starting at the current position, in the current source file for the specified character string. If you do not specify string, the debugger uses the string of the most recent search.

For example, if you search for the string ptr using the command forward-search ptr, and then enter forward-search without specifying a string, the debugger searches for the string ptr.

The debugger interprets the rest of the line to be the search string, so you do not need to quote the string. The debugger executes alias expansion on whatever precedes this command on the same line, possibly changing the search string.

When the debugger finds a match, it lists the line number and the line. That line becomes the starting point for any further searches, or for a list command.

Example

(idb) forward-search _firstNode
69 NODETYPE* _firstNode;

In the following example, the second forward-search also searches for the next existence of 'ptr' on source file.

(idb) forward-search ptr
(idb) forward-search

See Also


Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.