dr_register_post_attach_event

Function dr_register_post_attach_event 

Source
pub unsafe extern "C" fn dr_register_post_attach_event(
    func: Option<unsafe extern "C" fn()>,
) -> bool_
Expand description

Registers a function which is called after all other threads have been taken over during a process attach event, whether externally triggered or internally triggered (via dr_app_start() or related functions). If this process instance was not initiated by an attach or takeover methodology where multiple application threads may exist at the time of takeover (such as a process newly created on Linux), this registration function returns false.

The attach methodology operates in a staggered fashion, with each thread being taken over and executed under DR control in turn. If the application has many threads, threads taken over early in this process may execute substantial amounts of instrumented code before the threads taken over last start executing instrumented code. The purpose of this event is to provide a single control point where all threads are known to be under DR control and running instrumented code.