The callback is called before the read or write has taken place, but may not intervene. If one or more breakpoint callbacks stop the simulation, the current instruction is completed before the stop takes effect. If more than one breakpoint is triggered by the same read or write, the implementation may call their callbacks in any order.
On x86, the Virtual_Breakpoint_Flag_Linear
flag causes the
breakpoint to use linear rather than virtual addresses. (Adding a
breakpoint with unsupported flags is illegal.)
typedef enum { Virtual_Breakpoint_Flag_Linear = 1 } virtual_breakpoint_flags_t;
SIM_INTERFACE(virtual_data_breakpoint) { virtual_data_bp_handle_t *NOTNULL (*add_read)( conf_object_t *NOTNULL obj, generic_address_t first, generic_address_t last, void (*NOTNULL callback)( cbdata_call_t data, conf_object_t *NOTNULL initiator, generic_address_t address, unsigned size), cbdata_register_t data, uint32 flags); virtual_data_bp_handle_t *NOTNULL (*add_write)( conf_object_t *NOTNULL obj, generic_address_t first, generic_address_t last, void (*NOTNULL callback)( cbdata_call_t data, conf_object_t *NOTNULL initiator, generic_address_t address, bytes_t value), cbdata_register_t data, uint32 flags); void (*remove)(conf_object_t *NOTNULL obj, virtual_data_bp_handle_t *NOTNULL bp_handle); }; #define VIRTUAL_DATA_BREAKPOINT_INTERFACE "virtual_data_breakpoint"