phys_mem0.break 0xff3800
. Accesses intersecting the given range will trigger the breakpoint. By default the breakpoint 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).
When an execution breakpoint is triggered, Simics will stop the simulation before the instructions is executed, while instructions triggering read or write breakpoints will complete before the simulation is stopped.
To break on a virtual address, use a context object:
cpu0_context.break 0x1ff00
Several breakpoints can be set on the same address and Simics will break on them in turn. If hap handlers (callback functions) are connected to the breakpoints they will also be executed in turn. Hap handlers are called before the access is performed, allowing the user to read a memory value that may be overwritten by the access. See the Simics Reference Manual for a description of hap handlers.
Each breakpoint is associated with an id (printed when the breakpoint is set or by the list
command) which is used for further references to the breakpoint.
For convenience the break
sets a breakpoint 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 (cf. phys_mem0.break
); e.g., break p:0xffc0
.
Use prefix to only break on instructions with this prefix. For example, a prefix "add" will cause the breakpoint to only stop if the instruction 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 only break on instructions with a certain syntax substring. For example, specifying a substring "r31" will cause the breakpoint to stop only if the instruction contains the substring "r31". The match is case insensitive.
Use pattern to only break on instructions 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 cause the breakpoint to stop only on instructions 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).
Breakpoints can be removed using delete
.
The -once flag causes the breakpoint to automatically be removed after it has triggered.