23 #define RZ_ASM_ARCH_NONE RZ_SYS_ARCH_NONE
24 #define RZ_ASM_ARCH_X86 RZ_SYS_ARCH_X86
25 #define RZ_ASM_ARCH_ARM RZ_SYS_ARCH_ARM
26 #define RZ_ASM_ARCH_PPC RZ_SYS_ARCH_PPC
27 #define RZ_ASM_ARCH_M68K RZ_SYS_ARCH_M68K
28 #define RZ_ASM_ARCH_JAVA RZ_SYS_ARCH_JAVA
29 #define RZ_ASM_ARCH_LM32 RZ_SYS_ARCH_LM32
30 #define RZ_ASM_ARCH_MIPS RZ_SYS_ARCH_MIPS
31 #define RZ_ASM_ARCH_SPARC RZ_SYS_ARCH_SPARC
32 #define RZ_ASM_ARCH_XAP RZ_SYS_ARCH_XAP
33 #define RZ_ASM_ARCH_MSIL RZ_SYS_ARCH_MSIL
34 #define RZ_ASM_ARCH_OBJD RZ_SYS_ARCH_OBJD
35 #define RZ_ASM_ARCH_BF RZ_SYS_ARCH_BF
36 #define RZ_ASM_ARCH_SH RZ_SYS_ARCH_SH
37 #define RZ_ASM_ARCH_Z80 RZ_SYS_ARCH_Z80
38 #define RZ_ASM_ARCH_I8080 RZ_SYS_ARCH_I8080
39 #define RZ_ASM_ARCH_ARC RZ_SYS_ARCH_ARC
40 #define RZ_ASM_ARCH_HPPA RZ_SYS_ARCH_HPPA
42 #define RZ_ASM_GET_OFFSET(x, y, z) \
43 (x && x->binb.bin && x->binb.get_offset) ? x->binb.get_offset(x->binb.bin, y, z) : -1
45 #define RZ_ASM_GET_NAME(x, y, z) \
46 (x && x->binb.bin && x->binb.get_name) ? x->binb.get_name(x->binb.bin, y, z) : NULL
97 #define _RzAsmPlugin struct rz_asm_plugin_t
RZ_API void * rz_asm_code_free(RzAsmCode *acode)
RZ_API bool rz_asm_code_set_equ(RzAsmCode *code, const char *key, const char *value)
RZ_API void rz_asm_equ_item_free(RzAsmEqu *equ)
RZ_API RzAsmCode * rz_asm_code_new(void)
RZ_API char * rz_asm_code_get_hex(RzAsmCode *acode)
RZ_API char * rz_asm_code_equ_replace(RzAsmCode *code, char *str)
RZ_API int rz_asm_op_get_size(RzAsmOp *op)
RZ_API void rz_asm_op_fini(RzAsmOp *op)
RZ_API void rz_asm_op_set_buf(RzAsmOp *op, const ut8 *buf, int len)
RZ_API void rz_asm_op_init(RzAsmOp *op)
RZ_API int rz_asm_op_set_hexbuf(RzAsmOp *op, const ut8 *buf, int len)
RZ_API RzAsmOp * rz_asm_op_new(void)
RZ_API ut8 * rz_asm_op_get_buf(RzAsmOp *op)
RZ_API char * rz_asm_op_get_hex(RzAsmOp *op)
RZ_API void rz_asm_op_free(RzAsmOp *op)
RZ_API int rz_asm_op_set_hex(RzAsmOp *op, const char *str)
RZ_API void rz_asm_op_set_asm(RzAsmOp *op, const char *str)
RZ_API char * rz_asm_op_get_asm(RzAsmOp *op)
RZ_API int rz_asm_mnemonics_byname(RzAsm *a, const char *name)
RZ_API char * rz_asm_to_string(RzAsm *a, ut64 addr, const ut8 *b, int l)
RZ_API RzAsmCode * rz_asm_mdisassemble(RzAsm *a, const ut8 *buf, int len)
RZ_API RZ_OWN RzAsmTokenString * rz_asm_tokenize_asm_regex(RZ_BORROW RzStrBuf *asm_str, RzPVector *patterns)
Splits an asm string into tokens by using the given regex patterns.
RZ_API bool rz_asm_add(RzAsm *a, RzAsmPlugin *p)
RZ_API void rz_asm_list_directives(void)
RZ_API void rz_asm_free(RzAsm *a)
RZ_API int rz_asm_syntax_from_string(const char *name)
RZ_API bool rz_asm_set_big_endian(RzAsm *a, bool b)
RZ_API bool rz_asm_is_valid(RzAsm *a, const char *name)
RZ_API RzAsm * rz_asm_new(void)
RZ_API void rz_asm_token_pattern_free(void *p)
RZ_DEPRECATE RZ_API int rz_asm_set_bits(RzAsm *a, int bits)
RZ_API RZ_OWN RzAsmParseParam * rz_asm_get_parse_param(RZ_NULLABLE const RzReg *reg, ut32 ana_op_type)
Does all kinds of NULL checks on the parameters and returns an initialized RzAsmParseParam or NULL on...
RZ_API bool rz_asm_setup(RzAsm *a, const char *arch, int bits, int big_endian)
RZ_API char * rz_asm_describe(RzAsm *a, const char *str)
RZ_API int rz_asm_assemble(RzAsm *a, RzAsmOp *op, const char *buf)
RZ_API RzAsmCode * rz_asm_rasm_assemble(RzAsm *a, const char *buf, bool use_spp)
RZ_API bool rz_asm_set_syntax(RzAsm *a, int syntax)
RZ_DEPRECATE RZ_API RZ_OWN RzStrBuf * rz_asm_colorize_asm_str(RZ_BORROW RzStrBuf *asm_str, RZ_BORROW RzPrint *p, RZ_NULLABLE const RzAsmParseParam *param, RZ_NULLABLE const RzAsmTokenString *toks)
Colors a given asm string and returns it. If toks is not NULL it uses the tokens to color the asm str...
RZ_API char * rz_asm_mnemonics(RzAsm *a, int id, bool json)
RZ_DEPRECATE RZ_API void rz_asm_set_cpu(RzAsm *a, const char *cpu)
RZ_API int rz_asm_set_pc(RzAsm *a, ut64 pc)
RZ_API RZ_OWN RzAsmTokenString * rz_asm_token_string_new(const char *asm_str)
RZ_API RzAsmCode * rz_asm_massemble(RzAsm *a, const char *assembly)
RZ_API bool rz_asm_use(RzAsm *a, const char *name)
Puts an Asm plugin in use and disables the previous one.
RZ_API bool rz_asm_set_arch(RzAsm *a, const char *name, int bits)
RZ_API RzAsmCode * rz_asm_mdisassemble_hexstr(RzAsm *a, RzParse *p, const char *hexstr)
RZ_API int rz_asm_sub_names_input(RzAsm *a, const char *f)
RZ_API RzList * rz_asm_get_plugins(RzAsm *a)
RZ_DEPRECATE RZ_API RZ_OWN RzAsmTokenString * rz_asm_tokenize_asm_string(RZ_BORROW RzStrBuf *asm_str, RZ_NULLABLE const RzAsmParseParam *param)
Parses an asm string generically. It parses the string like: <mnemmonic> <op>, <op>....
RZ_API int rz_asm_disassemble(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len)
RZ_API RZ_OWN RzAsmTokenString * rz_asm_token_string_clone(RZ_OWN RZ_NONNULL RzAsmTokenString *toks)
RZ_API bool rz_asm_use_assembler(RzAsm *a, const char *name)
RZ_API int rz_asm_sub_names_output(RzAsm *a, const char *f)
RZ_API ut8 * rz_asm_from_string(RzAsm *a, ut64 addr, const char *b, int *l)
RZ_API void rz_asm_token_string_free(RZ_OWN RzAsmTokenString *toks)
RzAsmPlugin rz_asm_plugin_6502
RzAsmPlugin rz_asm_plugin_8051
RzAsmPlugin rz_asm_plugin_amd29k
RzAsmPlugin rz_asm_plugin_arc
RzAsmPlugin rz_asm_plugin_arm_as
RzAsmPlugin rz_asm_plugin_arm_cs
RzAsmPlugin rz_asm_plugin_avr
RzAsmPlugin rz_asm_plugin_bf
RzAsmPlugin rz_asm_plugin_chip8
RzAsmPlugin rz_asm_plugin_cil
RzAsmPlugin rz_asm_plugin_cr16
RzAsmPlugin rz_asm_plugin_cris_gnu
RzAsmPlugin rz_asm_plugin_dalvik
RzAsmPlugin rz_asm_plugin_dcpu16
RzAsmPlugin rz_asm_plugin_ebc
RzAsmPlugin rz_asm_plugin_gb
RzAsmPlugin rz_asm_plugin_h8300
RzAsmPlugin rz_asm_plugin_hppa_gnu
RzAsmPlugin rz_asm_plugin_i4004
RzAsmPlugin rz_asm_plugin_i8080
RzAsmPlugin rz_asm_plugin_java
RzAsmPlugin rz_asm_plugin_lanai_gnu
RzAsmPlugin rz_asm_plugin_lh5801
RzAsmPlugin rz_asm_plugin_lm32
RzAsmPlugin rz_asm_plugin_luac
RzAsmPlugin rz_asm_plugin_m680x_cs
RzAsmPlugin rz_asm_plugin_m68k_cs
RzAsmPlugin rz_asm_plugin_malbolge
RzAsmPlugin rz_asm_plugin_mcore
RzAsmPlugin rz_asm_plugin_mcs96
RzAsmPlugin rz_asm_plugin_mips_cs
RzAsmPlugin rz_asm_plugin_mips_gnu
RzAsmPlugin rz_asm_plugin_msp430
RzAsmPlugin rz_asm_plugin_nios2
RzAsmPlugin rz_asm_plugin_null
RzAsmPlugin rz_asm_plugin_or1k
RzAsmPlugin rz_asm_plugin_pic
RzAsmPlugin rz_asm_plugin_ppc_as
RzAsmPlugin rz_asm_plugin_ppc_cs
RzAsmPlugin rz_asm_plugin_propeller
RzAsmPlugin rz_asm_plugin_pyc
RzAsmPlugin rz_asm_plugin_riscv
RzAsmPlugin rz_asm_plugin_riscv_cs
RzAsmPlugin rz_asm_plugin_rsp
RzAsmPlugin rz_asm_plugin_sh
RzAsmPlugin rz_asm_plugin_snes
RzAsmPlugin rz_asm_plugin_sparc_cs
RzAsmPlugin rz_asm_plugin_sparc_gnu
RzAsmPlugin rz_asm_plugin_spc700
RzAsmPlugin rz_asm_plugin_sysz
RzAsmPlugin rz_asm_plugin_tms320
RzAsmPlugin rz_asm_plugin_tms320c64x
RzAsmPlugin rz_asm_plugin_tricore
RzAsmPlugin rz_asm_plugin_v810
RzAsmPlugin rz_asm_plugin_v850
RzAsmPlugin rz_asm_plugin_vax
RzAsmPlugin rz_asm_plugin_wasm
RzAsmPlugin rz_asm_plugin_x86_as
RzAsmPlugin rz_asm_plugin_x86_cs
RzAsmPlugin rz_asm_plugin_x86_nasm
RzAsmPlugin rz_asm_plugin_x86_nz
RzAsmPlugin rz_asm_plugin_xap
RzAsmPlugin rz_asm_plugin_xcore_cs
RzAsmPlugin rz_asm_plugin_xtensa
RzAsmPlugin rz_asm_plugin_z80
int bits(struct state *s, int need)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len key
struct rz_asm_op_t RzAsmOp
struct rz_asm_plugin_t RzAsmPlugin
RZ_LIB_VERSION_HEADER(rz_asm)
struct rz_asm_code_t RzAsmCode
RzAsmTokenString * asm_toks
Tokenized asm string.
bool(* init)(void **user)
int(* assemble)(RzAsm *a, RzAsmOp *op, const char *buf)
int(* disassemble)(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()