pub unsafe extern "C" fn drmgr_register_opcode_instrumentation_event(
func: drmgr_opcode_insertion_cb_t,
opcode: c_int,
priority: *mut drmgr_priority_t,
user_data: *mut c_void,
) -> bool_Expand description
Registers callback functions for the third instrumentation stage: instrumentation insertion. drmgr will call \p func for each instruction with the specific opcode \p opcode.
More than one callback function can be mapped to the same opcode. Their execution sequence is determined by their priority \p priority (if set). Ordering based on priority is also taken into account with respect to insert per instr events.
Since this callback is triggered during instrumentation insertion, same usage rules apply. The callback is allowed to insert meta instructions only immediately prior to the passed-in instruction. New non-meta instructions cannot be inserted.
\return false upon failure.
@param[in] func The opcode insertion callback to be called for the third stage for a specific opcode instruction. Cannot be NULL. @param[in] opcode The opcode to associate with the insertion callback. @param[in] priority Specifies the relative ordering of both callbacks. Can be NULL, in which case a default priority is used. @param[in] user_data User data made available when triggering the callback \p func. Can be NULL.
\note It is possible that this callback will be triggered for meta instructions. Therefore, we recommend that the callback check for meta instructions (and ignore them, typically).