breakpoint
interface
typically also implement the breakpoint_trigger
interface. Processors call the trigger_breakpoint
function to signal that a memory access intersects a
breakpoint. The trigger_breakpoint function will raise
the appropriate haps and the currently scheduled execute object may
receive a stop call during the call to
trigger_breakpoint.
The obj argument is the object that holds the breakpoint, typically a memory space or a context object. initiator_obj is the source of the memory operation that triggers the breakpoint. The handle argument identifies the breakpoint to trigger. A value of BREAKPOINT_HANDLE_ANY can be passed as handle, in which case all the breakpoints that match the given address, size, and access will be triggered. The address, size, and access arguments specify information about the access that triggers the breakpoint. The data argument points to a buffer where the data for the access is kept.
If a stop is received during a call to trigger_breakpoint, then it is recommended that any software visible actions carried out after the breakpoint are logged. That could for example be to notify the user if the entire instruction that triggers a breakpoint will complete, and that the instruction will then not be re-executed when the simulation restarts.
SIM_INTERFACE(breakpoint_trigger) { void (*trigger_breakpoint)(conf_object_t *obj, conf_object_t *initiator_obj, breakpoint_handle_t handle, generic_address_t address, generic_address_t size, access_t access, uint8 *data); }; #define BREAKPOINT_TRIGGER_INTERFACE "breakpoint_trigger"