Query: x86_init
OS: debian
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
x86_init(3) libdisasm x86_init(3)NAMEx86_init, x86_cleanup - initialize and cleanup libdisasmSYNOPSIS#include <libdis.h> typedef void (*DISASM_REPORTER)( enum x86_report_codes code, void * data, void * arg ); int x86_init( enum x86_options options, DISASM_REPORTER reporter, void * arg); int x86_cleanup(void);DESCRIPTIONenum x86_options { opt_none= 0, opt_ignore_nulls=1, /* ignore sequences of > 4 NULL bytes */ opt_16_bit=2, /* 16-bit/DOS disassembly */ opt_unknown }; enum x86_report_codes { report_disasm_bounds, report_insn_bounds, report_invalid_insn, report_unknown };EXAMPLESThe following provides a skeleton for initializing and terminating libdisasm: void reporter( enum x86_report_codes code, void *data, void *arg ) { char * str = NULL; FILE *stream = (FILE *) arg; if (! stream ) stream = stderr; /* here would could examine the error and do something useful; * instead we just print that an error occurred */ switch ( code ) { case report_disasm_bounds: str = "Attempt to disassemble RVA " "beyond end of buffer"; break; case report_insn_bounds: str = "Instruction at RVA extends " "beyond buffer"; break; case report_invalid_insn: str = "Invalid opcode at RVA"; break; case report_unknown: str = "Unknown Error"; break; } fprintf(stream, "ERROR '%s:' %p0, str, data); } int main( int argc, char **argv ) { x86_init(opt_none, reporter, stderr); /* disassembler code goes here */ x86_cleanup(); }SEE ALSOlibdisasm(7), x86_disasm(3), x86_format_insn(3), x86dis(1) mammon_ 0.21 x86_init(3)
Related Man Pages |
---|
envz_remove(3) - redhat |
envz_merge(3) - redhat |
x86dis(1) - debian |
x86_init(3) - debian |
msgfmt_get_error_code(3) - php |
Similar Topics in the Unix Linux Community |
---|
awk or sed - Convert 2 lines to 1 line |
Introduction |
Detecting unused variables... |
One instance of comparing grep and awk |
Weird 'find' results |