<break_strings_v2>.bp-trace-console-string <breakpoint>.bp-break-memory
Simics Reference Manual  /  3 Commands  /  3.2 Command List  / 

<break_strings_v2>.bp-wait-for-console-string

Synopsis

<break_strings_v2>.bp-wait-for-console-string "string" [-regexp] [-reverse] [-always] [timeout] [timeout-rt]

Description

Wait for the output of the text string on the console. This command can only be run from a script branch where it suspends the branch until the string has been found in the output.

Example of waiting for a typical shell prompt on console object $con:

bp.console_string.wait-for $con "~ $"

If -regexp is specified, the breakpoint string will be interpreted as a regular expression (regexp). The regexp syntax follows the common Perl style, as interpreted by the Hyperscan library https://hyperscan.io.

Note that the string is a Simics CLI string, and thus \ has to be escaped as \\ when writing the regexp.

Examples:

For more information about regular expression syntax, see https://perldoc.perl.org/re.html.

If timeout is a positive number, the command will run for at most that many seconds of virtual time.

If timeout-rt is a positive number, the command will run for at most that many seconds of real time.

A time-out will be signaled by throwing a CLI exception, which can be captured using try/except in order to take specific action, or to let it pass unhandled.

The command will by default only wait for events that occur when the simulation is running forward. To wait for events in the reverse direction use the -reverse flag. Similarly, the -always flag tells the command to wait for events in both simulation directions.

Provided By

bp-manager
<break_strings_v2>.bp-trace-console-string <breakpoint>.bp-break-memory