Function simics::api::simulator::breakpoints::_breakpoint
source · fn _breakpoint(
obj: *mut ConfObject,
kind: BreakpointKind,
access: Access,
address: u64,
length: u64,
flags: BreakpointFlag,
) -> BreakpointId
Expand description
Add breakpoint on an object implementing the breakpoint interface. This is typically a memory space object such as physical memory.
The default action for a triggered breakpoint is to return to the frontend (this can be changed by using haps). On execution breakpoints Simics will return to the frontend before the instructions is executed, while instructions triggering read or write breakpoints will complete before control is returned to the frontend.
Several breakpoints can be set on the same address and Simics will break on them in turn. If hap handlers 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.
Several attributes can be set for a breakpoint for breaking only when some conditions are true. See the breakpoints attribute in the sim class.
This function returns the breakpoint id which is used for further reference to the breakpoin
§Arguments
kind
: The kind argument sets what type of address to break onaccess
: The access argument is a bit-field setting the type of access. Any combination of the three alternatives can be given (added together).address
: The address is the start of the breakpoint rangelength
is its length in bytes. This range will be truncated as necessary to fit in the address space. An access intersecting the given range will trigger the breakpoint. If length is zero, the breakpoint range will be the entire address space.flags
: If the Sim_Breakpoint_Temporary bit is set, the breakpoint is automatically disabled when triggered the first time. If the Sim_Breakpoint_Simulation bit is set, the breakpoint will not show up in the.list command, nor can it be removed by the .delete command. Also, there will be no message printed on the Simics console when this breakpoint is triggered. This bit should be set when using breakpoints to simulate the target system; it will prevent Simics from temporarily disabling the breakpoint as an optimization measure. This could otherwise happen during certain reverse execution operations. If the Sim_Breakpoint_Private bit is set, the breakpoint will not show up in the .list command, nor can it be removed by the .delete command.
§Exceptions
- SimExc_General Thrown if the type or access arguments are illegal. Also thrown if obj cannot handle breakpoints of the given kind.
§Context
Cell Context