<bp-manager.memory>.unbreak <bp-manager.notify>.break
Simics Reference Manual  /  3 Commands  /  3.2 Command List  / 

<bp-manager.memory>.wait-for

Synopsis

<bp-manager.memory>.wait-for [object] address [length] [-r] [-w] [-x] ["prefix"] ["substr"] ["pattern"] ["mask"] [-reverse] [-always] [timeout] [timeout-rt]

Description

Postpones execution of a script branch the specified break condition is true.

The break condition is specified as (read, write, or execute) on address for and object implementing the breakpoint interface. This is typically a memory space object such as physical memory. Accesses intersecting the given range will trigger the break. By default the break will only trigger for instruction execution, but any subset of read, write, and execute accesses can be set to trigger using combinations of -r, -w, and -x.

length is the interval length in bytes (default is 1).

For convenience the break condition is on memory connected to the current frontend processor (see pselect). Default is to break on virtual address accesses (in the current context). By prefixing the address with p: it is possible to break on physical accesses as well.

Use prefix to define the break condition on instructions with this prefix. For example, a prefix "add" will wait for an instruction that begins with "add". The text to compare the prefix with for an instruction is the one which the instruction is disassembled to. The comparison is case insensitive.

Use substr to wait for instructions with a certain syntax substring. For example, specifying a substring "r31" will wait for an instruction containing the substring "r31". The match is case insensitive.

Use pattern to wait for an instruction with a certain bit-pattern. First the mask will be applied to the instruction and then the result will be compared with the pattern. For example, a pattern "0x0100" and mask "0x0101" will wait for an instruction whose first byte has the lowest bit set and the second not.

Note that pattern and mask are supplied as strings with string byte order (low address first).

The command returns the initiator object of the memory transaction that resulted in 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.

If object is provided, then the breakpoint functionality is added on that object.

Provided By

bp-manager
<bp-manager.memory>.unbreak <bp-manager.notify>.break