dr_register_client_ex

Function dr_register_client_ex 

Source
pub unsafe extern "C" fn dr_register_client_ex(
    process_name: *const c_char,
    pid: process_id_t,
    global: bool_,
    dr_platform: dr_platform_t,
    client: *mut dr_config_client_t,
) -> dr_config_status_t
Expand description

Register a client for a particular process. Note that the process must first be registered via dr_register_process() before calling this routine. The #dr_config_client_t structure allows specifying additional options beyond what dr_register_client() supports, such as an alternate bitwidth client. For an alternate bitwidth client, the main client must first be registered by an earlier call. Unregistering a client with dr_unregister_client() will also unregister the alternate bitwidth client.

\param[in] process_name A NULL-terminated string specifying the name of the target process. The string should identify the base name of the process, not the full path of the executable (e.g., calc.exe).

\param[in] pid A process id of a target process, typically just created and suspended via dr_inject_process_exit(). If pid != 0, the one-time configuration for that pid will be modified. If pid == 0, the general configuration for process_name will be modified.

\param[in] global Whether to use global or user-local config files. On Windows, global config files are stored in a dir pointed at by the DYNAMORIO_HOME registry key. On Linux, they are in /etc/dynamorio. Administrative privileges may be needed if global is true. Note that DynamoRIO gives local config files precedence when both exist. The caller must separately create the global directory.

\param[in] dr_platform Configurations are kept separate for 32-bit processes and 64-bit processes. This parameter allows selecting which of those configurations to set.

\param[in] client Defines the attributes of the client to be registered.

\return A dr_config_status_t code indicating the result of registration.