2013-11-27 12:11:31 +08:00
|
|
|
/* Capstone Disassembler Engine */
|
|
|
|
/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013> */
|
|
|
|
|
2014-01-02 12:44:20 +08:00
|
|
|
#ifndef CS_X86_MAP_H
|
|
|
|
#define CS_X86_MAP_H
|
2013-11-27 12:11:31 +08:00
|
|
|
|
|
|
|
#include "../../include/capstone.h"
|
|
|
|
#include "../../include/x86.h"
|
|
|
|
|
|
|
|
// map sib_base to x86_reg
|
|
|
|
x86_reg x86_map_sib_base(int r);
|
|
|
|
|
|
|
|
// map sib_index to x86_reg
|
|
|
|
x86_reg x86_map_sib_index(int r);
|
|
|
|
|
|
|
|
// map seg_override to x86_reg
|
|
|
|
x86_reg x86_map_segment(int r);
|
|
|
|
|
|
|
|
// map register name to x86_reg
|
2013-12-12 05:14:42 +08:00
|
|
|
x86_reg x86_map_regname(const char *reg);
|
2013-11-27 12:11:31 +08:00
|
|
|
|
|
|
|
// return name of regiser in friendly string
|
2013-12-12 05:14:42 +08:00
|
|
|
const char *X86_reg_name(csh handle, unsigned int reg);
|
2013-11-27 12:11:31 +08:00
|
|
|
|
|
|
|
// given internal insn id, return public instruction info
|
2013-12-14 10:45:09 +08:00
|
|
|
void X86_get_insn_id(cs_insn *insn, unsigned int id, int detail);
|
2013-11-27 12:11:31 +08:00
|
|
|
|
|
|
|
// return insn name, given insn id
|
2013-12-12 05:14:42 +08:00
|
|
|
const char *X86_insn_name(csh handle, unsigned int id);
|
2013-11-27 12:11:31 +08:00
|
|
|
|
|
|
|
// return insn id, given insn mnemonic
|
2013-12-12 05:14:42 +08:00
|
|
|
x86_reg X86_map_insn(const char *mnem);
|
2013-11-27 12:11:31 +08:00
|
|
|
|
|
|
|
// given public insn id, return internal insn id
|
|
|
|
unsigned int X86_get_insn_id2(unsigned int insn_id);
|
|
|
|
|
2013-12-12 15:54:30 +08:00
|
|
|
// post printer for X86.
|
2013-12-14 10:45:09 +08:00
|
|
|
void X86_post_printer(csh handle, cs_insn *pub_insn, char *insn_asm);
|
2013-12-12 15:54:30 +08:00
|
|
|
|
2014-01-03 17:08:58 +08:00
|
|
|
// free insn cache
|
|
|
|
void X86_free_cache(void);
|
|
|
|
|
2013-11-27 12:11:31 +08:00
|
|
|
#endif
|