pub unsafe extern "C" fn dr_register_module_load_event(
func: Option<unsafe extern "C" fn(drcontext: *mut c_void, info: *const module_data_t, loaded: bool_)>,
)Expand description
Registers a callback function for the module load event. DR calls \p func whenever the application loads a module (typically a library but this term includes the executable). The \p loaded parameter indicates whether the module is fully initialized by the loader or in the process of being loaded. This parameter is present only for backward compatibility: current versions of DR always pass true, and the client can assume that relocating, rebinding, and (on Linux) segment remapping have already occurred.
\note The module_data_t \p info passed to the callback routine is valid only for the duration of the callback and should not be freed; a persistent copy can be made with dr_copy_module_data().
\note Registration cannot be done during the basic block event: it should be done at initialization time.