<bp-manager.log>.trace <bp-manager.magic>.break
Simics Reference Manual  /  3 Commands  /  3.2 Command List  / 

<bp-manager.log>.wait-for

Synopsis

<bp-manager.log>.wait-for [object] [-regexp] [-re] ["substr"] ["substring"] [type] [-recursive] [-reverse] [-always] [timeout] [timeout-rt]

Description

Postpones execution of a script branch until a specified log message is emitted. The type, and substr arguments can be used to wait for log messages matching certain conditions. The object argument of the command can be used to wait for a log message on a certain object. The substr argument is a string to wait for. It is interpreted as a regular expression, as defined by the re module in Python, if the -regexp flag is specified.

When used in an expression, the commands returns a list with the following information: [<clock-object>, <seconds>, <cycles>, <log-level>, <log-type>, <log-group>, <object>, <message>]. The first three entries form a time stamp for when the log entry was generated.

Note that the log level must be set high enough for the message to be generated or it cannot be waited on. If -recursive is used, not only the object, but the objects hierarchically below the object will be considered when adding the breakpoint. 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
<bp-manager.log>.trace <bp-manager.magic>.break