Classes | Macros | Functions | Variables
capstone_test.h File Reference
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdlib.h>
#include <string.h>
#include <capstone/capstone.h>
#include "helper.h"
#include "factory.h"
Include dependency graph for capstone_test.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  double_dict
 
struct  single_dict
 

Macros

#define cs_assert_err(expect, err)
 
#define cs_assert_fail(err)
 
#define cs_assert_success(err)   cs_assert_err(CS_ERR_OK, err)
 
#define MAXMEM   1024
 
#define NUMARCH   9
 
#define NUMMODE   33
 
#define NUMOPTION   41
 

Functions

int get_index (double_dict d[], unsigned size, const char *str)
 
int get_value (single_dict d[], unsigned size, const char *str)
 
int set_function (int arch)
 
void test_single_issue (csh *handle, cs_mode mode, char *line, int detail)
 
void test_single_MC (csh *handle, int mc_mode, char *line)
 

Variables

single_dict arches []
 
char *(* function )(csh *, cs_mode, cs_insn *)
 
single_dict modes []
 
double_dict options []
 

Macro Definition Documentation

◆ cs_assert_err

#define cs_assert_err (   expect,
  err 
)
Value:
do { \
cs_err __err = err; \
if (__err != expect) { \
fail_msg("%s",cs_strerror(__err)); \
} \
} while (0)

Definition at line 18 of file capstone_test.h.

◆ cs_assert_fail

#define cs_assert_fail (   err)
Value:
do { \
cs_err __err = err; \
if (__err == CS_ERR_OK) { \
fail_msg("%s",cs_strerror(__err)); \
} \
} while (0)

Definition at line 30 of file capstone_test.h.

◆ cs_assert_success

#define cs_assert_success (   err)    cs_assert_err(CS_ERR_OK, err)

Definition at line 27 of file capstone_test.h.

◆ MAXMEM

#define MAXMEM   1024

Definition at line 41 of file capstone_test.h.

◆ NUMARCH

#define NUMARCH   9

Definition at line 38 of file capstone_test.h.

◆ NUMMODE

#define NUMMODE   33

Definition at line 39 of file capstone_test.h.

◆ NUMOPTION

#define NUMOPTION   41

Definition at line 40 of file capstone_test.h.

Function Documentation

◆ 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 
)

◆ set_function()

int set_function ( int  arch)

Definition at line 228 of file capstone_test.c.

◆ test_single_issue()

void test_single_issue ( csh handle,
cs_mode  mode,
char *  line,
int  detail 
)

Definition at line 276 of file capstone_test.c.

◆ test_single_MC()

void test_single_MC ( csh handle,
int  mc_mode,
char *  line 
)

Definition at line 101 of file capstone_test.c.

Variable Documentation

◆ arches

single_dict arches[]

Definition at line 7 of file capstone_test.c.

◆ function

char*(* function) (csh *, cs_mode, cs_insn *)

Definition at line 250 of file grpc_tool.cc.

◆ modes

single_dict modes[]

Definition at line 19 of file capstone_test.c.

◆ options

double_dict options[]

Definition at line 55 of file capstone_test.c.

error_ref_leak.err
err
Definition: error_ref_leak.py:35
capstone.CS_ERR_OK
CS_ERR_OK
Definition: third_party/bloaty/third_party/capstone/bindings/python/capstone/__init__.py:237
cs_strerror
const CAPSTONE_EXPORT char *CAPSTONE_API cs_strerror(cs_err code)
Definition: cs.c:435


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:05