Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace 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
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
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
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
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
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
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
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
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
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
grpc
third_party
bloaty
third_party
capstone
suite
cstest
include
capstone_test.h
Go to the documentation of this file.
1
/* Capstone testing regression */
2
/* By Do Minh Tuan <tuanit96@gmail.com>, 02-2019 */
3
4
5
#ifndef CAPSTONE_TEST_H
6
#define CAPSTONE_TEST_H
7
8
#include <stdarg.h>
9
#include <stddef.h>
10
#include <setjmp.h>
11
#include <cmocka.h>
12
#include <stdlib.h>
13
#include <
string.h
>
14
#include <
capstone/capstone.h
>
15
#include "
helper.h
"
16
#include "
factory.h
"
17
18
#define cs_assert_err(expect, err) \
19
do { \
20
cs_err __err = err; \
21
if (__err != expect) { \
22
fail_msg("%s",cs_strerror(__err)); \
23
} \
24
} while (0)
25
26
27
#define cs_assert_success(err) cs_assert_err(CS_ERR_OK, err)
28
29
30
#define cs_assert_fail(err) \
31
do { \
32
cs_err __err = err; \
33
if (__err == CS_ERR_OK) { \
34
fail_msg("%s",cs_strerror(__err)); \
35
} \
36
} while (0)
37
38
#define NUMARCH 9
39
#define NUMMODE 33
40
#define NUMOPTION 41
41
#define MAXMEM 1024
42
43
typedef
struct
{
44
const
char
*
str
;
45
unsigned
int
value
;
46
}
single_dict
;
47
48
typedef
struct
{
49
const
char
*
str
;
50
unsigned
int
first_value
;
51
unsigned
int
second_value
;
52
}
double_dict
;
53
54
extern
single_dict
arches
[];
55
extern
single_dict
modes
[];
56
extern
double_dict
options
[];
57
extern
char
*(*function)(
csh
*,
cs_mode
, cs_insn*);
58
59
int
get_index
(
double_dict
d
[],
unsigned
size
,
const
char
*
str
);
60
int
get_value
(
single_dict
d
[],
unsigned
size
,
const
char
*
str
);
61
void
test_single_MC
(
csh
*
handle
,
int
mc_mode
,
char
*
line
);
62
void
test_single_issue
(
csh
*
handle
,
cs_mode
mode
,
char
*
line
,
int
detail
);
63
int
set_function
(
int
arch
);
64
65
#endif
/* CAPSTONE_TEST_H */
xds_interop_client.str
str
Definition:
xds_interop_client.py:487
test_single_issue
void test_single_issue(csh *handle, cs_mode mode, char *line, int detail)
Definition:
capstone_test.c:276
single_dict::value
unsigned int value
Definition:
capstone_test.h:45
factory.h
string.h
options
double_dict options[]
Definition:
capstone_test.c:55
double_dict::second_value
unsigned int second_value
Definition:
capstone_test.h:51
helper.h
mode
const char int mode
Definition:
bloaty/third_party/zlib/contrib/minizip/ioapi.h:135
detail
Definition:
test_winkernel.cpp:39
set_function
int set_function(int arch)
Definition:
capstone_test.c:228
double_dict::first_value
unsigned int first_value
Definition:
capstone_test.h:50
double_dict::str
const char * str
Definition:
capstone_test.h:49
cs_mode
cs_mode
Mode type.
Definition:
capstone.h:103
capstone.h
arches
single_dict arches[]
Definition:
capstone_test.c:7
arch
cs_arch arch
Definition:
cstool.c:13
d
static const fe d
Definition:
curve25519_tables.h:19
double_dict
Definition:
capstone_test.h:48
modes
single_dict modes[]
Definition:
capstone_test.c:19
csh
size_t csh
Definition:
capstone.h:71
mc_mode
static int mc_mode
Definition:
bloaty/third_party/capstone/suite/cstest/src/main.c:15
get_index
int get_index(double_dict d[], unsigned size, const char *str)
get_value
int get_value(single_dict d[], unsigned size, const char *str)
regen-readme.line
line
Definition:
regen-readme.py:30
single_dict::str
const char * str
Definition:
capstone_test.h:44
handle
static csh handle
Definition:
test_arm_regression.c:16
test_single_MC
void test_single_MC(csh *handle, int mc_mode, char *line)
Definition:
capstone_test.c:101
size
voidpf void uLong size
Definition:
bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
single_dict
Definition:
capstone_test.h:43
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:43