forked from capstone-engine/capstone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python: indentation for cython code. also added author credits to the…
…se new files
- Loading branch information
Showing
2 changed files
with
192 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,67 @@ | ||
# By Dang Hoang Vu <[email protected]>, 2014 | ||
|
||
from libcpp cimport bool | ||
from libc.stdint cimport uint8_t, uint64_t, uint16_t | ||
|
||
cdef extern from "<capstone/capstone.h>": | ||
|
||
ctypedef size_t csh | ||
ctypedef size_t csh | ||
|
||
ctypedef enum cs_mode: | ||
pass | ||
ctypedef enum cs_mode: | ||
pass | ||
|
||
ctypedef enum cs_arch: | ||
pass | ||
ctypedef enum cs_arch: | ||
pass | ||
|
||
ctypedef struct cs_detail: | ||
pass | ||
ctypedef struct cs_detail: | ||
pass | ||
|
||
ctypedef struct cs_insn: | ||
unsigned int id | ||
uint64_t address | ||
uint16_t size | ||
uint8_t bytes[16] | ||
char mnemonic[32] | ||
char op_str[96] | ||
cs_detail *detail | ||
ctypedef struct cs_insn: | ||
unsigned int id | ||
uint64_t address | ||
uint16_t size | ||
uint8_t bytes[16] | ||
char mnemonic[32] | ||
char op_str[96] | ||
cs_detail *detail | ||
|
||
ctypedef enum cs_err: | ||
pass | ||
ctypedef enum cs_err: | ||
pass | ||
|
||
ctypedef enum cs_opt_type: | ||
pass | ||
ctypedef enum cs_opt_type: | ||
pass | ||
|
||
unsigned int cs_version(int *major, int *minor) | ||
unsigned int cs_version(int *major, int *minor) | ||
|
||
bool cs_support(int arch) | ||
bool cs_support(int arch) | ||
|
||
cs_err cs_open(cs_arch arch, cs_mode mode, csh *handle) | ||
cs_err cs_open(cs_arch arch, cs_mode mode, csh *handle) | ||
|
||
cs_err cs_close(csh handle) | ||
cs_err cs_close(csh handle) | ||
|
||
cs_err cs_errno(csh handle) | ||
cs_err cs_errno(csh handle) | ||
|
||
size_t cs_disasm_ex(csh handle, | ||
const uint8_t *code, size_t code_size, | ||
uint64_t address, | ||
size_t count, | ||
cs_insn **insn) | ||
size_t cs_disasm_ex(csh handle, | ||
const uint8_t *code, size_t code_size, | ||
uint64_t address, | ||
size_t count, | ||
cs_insn **insn) | ||
|
||
cs_err cs_option(csh handle, cs_opt_type type, size_t value) | ||
cs_err cs_option(csh handle, cs_opt_type type, size_t value) | ||
|
||
void cs_free(cs_insn *insn, size_t count) | ||
void cs_free(cs_insn *insn, size_t count) | ||
|
||
const char *cs_reg_name(csh handle, unsigned int reg_id) | ||
const char *cs_reg_name(csh handle, unsigned int reg_id) | ||
|
||
const char *cs_insn_name(csh handle, unsigned int insn_id) | ||
const char *cs_insn_name(csh handle, unsigned int insn_id) | ||
|
||
bool cs_insn_group(csh handle, cs_insn *insn, unsigned int group_id) | ||
bool cs_insn_group(csh handle, cs_insn *insn, unsigned int group_id) | ||
|
||
bool cs_reg_read(csh handle, cs_insn *insn, unsigned int reg_id) | ||
bool cs_reg_read(csh handle, cs_insn *insn, unsigned int reg_id) | ||
|
||
bool cs_reg_write(csh handle, cs_insn *insn, unsigned int reg_id) | ||
bool cs_reg_write(csh handle, cs_insn *insn, unsigned int reg_id) | ||
|
||
int cs_op_count(csh handle, cs_insn *insn, unsigned int op_type) | ||
int cs_op_count(csh handle, cs_insn *insn, unsigned int op_type) | ||
|
||
int cs_op_index(csh handle, cs_insn *insn, unsigned int op_type, | ||
unsigned int position) | ||
int cs_op_index(csh handle, cs_insn *insn, unsigned int op_type, | ||
unsigned int position) |
Oops, something went wrong.