pub unsafe extern "C" fn dr_fprintf(
f: file_t,
fmt: *const c_char,
...
) -> isizeExpand description
Printing to a file 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 STDOUT or STDERR in 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 On Linux this routine does not check for errors like EINTR. Use dr_write_file() if that is a concern. \note When printing floating-point values, 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. On success, the number of bytes written is returned. On error, -1 is returned.