Rizin
unix-like reverse engineering framework and cli tools
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
b
d
e
h
i
k
n
p
r
s
w
Properties
Events
Related Functions
Files
File List
File Members
All
$
.
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
.
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Events
Friends
Macros
Modules
Pages
mips.py
Go to the documentation of this file.
1
# Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com>
2
3
import
ctypes
4
from
.
import
copy_ctypes_list
5
from
.mips_const
import
*
6
7
# define the API
8
class
MipsOpMem
(ctypes.Structure):
9
_fields_ = (
10
(
'base'
, ctypes.c_uint),
11
(
'disp'
, ctypes.c_int64),
12
)
13
14
class
MipsOpValue
(ctypes.Union):
15
_fields_ = (
16
(
'reg'
, ctypes.c_uint),
17
(
'imm'
, ctypes.c_int64),
18
(
'mem'
, MipsOpMem),
19
)
20
21
class
MipsOp
(ctypes.Structure):
22
_fields_ = (
23
(
'type'
, ctypes.c_uint),
24
(
'value'
, MipsOpValue),
25
)
26
27
@property
28
def
imm
(self):
29
return
self.value.imm
30
31
@property
32
def
reg
(self):
33
return
self.value.reg
34
35
@property
36
def
mem
(self):
37
return
self.value.mem
38
39
40
class
CsMips
(ctypes.Structure):
41
_fields_ = (
42
(
'op_count'
, ctypes.c_uint8),
43
(
'operands'
, MipsOp * 10),
44
)
45
46
def
get_arch_info
(a):
47
return
copy_ctypes_list
(a.operands[:a.op_count])
48
capstone.mips.CsMips
Definition:
mips.py:40
capstone.mips.MipsOpMem
Definition:
mips.py:8
capstone.mips.MipsOpValue
Definition:
mips.py:14
capstone.mips.MipsOp
Definition:
mips.py:21
capstone.mips.MipsOp.mem
def mem(self)
Definition:
mips.py:36
capstone.mips.MipsOp.reg
def reg(self)
Definition:
mips.py:32
capstone.mips.MipsOp.imm
def imm(self)
Definition:
mips.py:28
capstone.mips.get_arch_info
def get_arch_info(a)
Definition:
mips.py:46
capstone.copy_ctypes_list
def copy_ctypes_list(src)
Definition:
__init__.py:326
subprojects
capstone-bundled
bindings
python
capstone
mips.py
Generated by
1.9.1