dr_printf

Function dr_printf 

Source
pub unsafe extern "C" fn dr_printf(fmt: *const c_char, ...)
Expand description

Stdout printing that won’t interfere with the application’s own printing. It is not buffered, which means that it should not be used for very frequent, small print amounts: for that the client should either do its own buffering or it should use printf from the C library via DR’s private loader. \note On Windows 7 and earlier, this routine is not able to print to the \p cmd window unless dr_enable_console_printing() is called ahead of time, and even then there are limitations: see dr_enable_console_printing(). \note This routine supports printing wide characters via the ls or S format specifiers. On Windows, they are assumed to be UTF-16, and are converted to UTF-8. On Linux, they are converted by simply dropping the high-order bytes. \note If the data to be printed is large it will be truncated to an internal buffer size. Use dr_snprintf() and dr_write_file() for large output. \note When printing floating-point values on x86, the caller’s code should use proc_save_fpstate() or be inside a clean call that has requested to preserve the floating-point state, unless it can prove that its compiler will not use x87 operations.