Skip to main content

instr_disassemble_to_buffer

Function instr_disassemble_to_buffer 

Source
pub unsafe extern "C" fn instr_disassemble_to_buffer(
    drcontext: *mut c_void,
    instr: *mut instr_t,
    buf: *mut c_char,
    bufsz: usize,
) -> usize
Expand description

Prints the instruction \p instr to the buffer \p buf. Always null-terminates, and will not print more than \p bufsz characters, which includes the final null character. Returns the number of characters printed, not including the final null.

Does not print address-size or data-size prefixes for other than just-decoded instrs, and does not check that the instruction has a valid encoding. Prints each operand with leading zeros indicating the size. The default is to use DR’s custom syntax (see disassemble_set_syntax()).