aboutsummaryrefslogtreecommitdiffstats
path: root/capstone/bindings/python/pyx/ccapstone.pxd
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /capstone/bindings/python/pyx/ccapstone.pxd
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'capstone/bindings/python/pyx/ccapstone.pxd')
-rw-r--r--capstone/bindings/python/pyx/ccapstone.pxd72
1 files changed, 72 insertions, 0 deletions
diff --git a/capstone/bindings/python/pyx/ccapstone.pxd b/capstone/bindings/python/pyx/ccapstone.pxd
new file mode 100644
index 000000000..8b163f2f6
--- /dev/null
+++ b/capstone/bindings/python/pyx/ccapstone.pxd
@@ -0,0 +1,72 @@
+# By Dang Hoang Vu <danghvu@gmail.com>, 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 enum cs_mode:
+ pass
+
+ ctypedef enum cs_arch:
+ pass
+
+ ctypedef struct cs_detail:
+ pass
+
+ ctypedef struct cs_insn:
+ unsigned int id
+ uint64_t address
+ uint16_t size
+ uint8_t bytes[24]
+ char mnemonic[32]
+ char op_str[160]
+ cs_detail *detail
+
+ ctypedef enum cs_err:
+ pass
+
+ ctypedef enum cs_opt_type:
+ pass
+
+ unsigned int cs_version(int *major, int *minor)
+
+ bool cs_support(int arch)
+
+ cs_err cs_open(cs_arch arch, cs_mode mode, csh *handle)
+
+ cs_err cs_close(csh *handle)
+
+ cs_err cs_errno(csh handle)
+
+ size_t cs_disasm(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)
+
+ void cs_free(cs_insn *insn, size_t count)
+
+ 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_group_name(csh handle, 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_write(csh handle, cs_insn *insn, unsigned int reg_id)
+
+ int cs_op_count(csh handle, cs_insn *insn, unsigned int op_type)
+
+ cs_err cs_regs_access(csh handle, cs_insn *insn, uint16_t *regs_read, uint8_t *read_count, uint16_t *regs_write, uint8_t *write_count)
+
+ int cs_op_index(csh handle, cs_insn *insn, unsigned int op_type,
+ unsigned int position)
+