Classes | Macros | Typedefs | Functions
utils.h File Reference
#include <stddef.h>
#include "include/capstone/capstone.h"
#include "cs_priv.h"
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  insn_map
 
struct  name_map
 

Macros

#define ARR_SIZE(a)   (sizeof(a)/sizeof(a[0]))
 
#define CS_AC_IGNORE   (1 << 7)
 
#define HEX_THRESHOLD   9
 
#define MATRIX_SIZE(a)   (sizeof(a[0])/sizeof(a[0][0]))
 
#define MIN(x, y)   ((x) < (y) ? (x) : (y))
 

Typedefs

typedef struct insn_map insn_map
 
typedef struct name_map name_map
 

Functions

bool arr_exist (uint16_t *arr, unsigned char max, unsigned int id)
 
bool arr_exist8 (unsigned char *arr, unsigned char max, unsigned int id)
 
unsigned int count_positive (const uint16_t *list)
 
unsigned int count_positive8 (const unsigned char *list)
 
int cs_snprintf (char *buffer, size_t size, const char *fmt,...)
 
char * cs_strdup (const char *str)
 
const char * id2name (const name_map *map, int max, const unsigned int id)
 
unsigned short insn_find (const insn_map *m, unsigned int max, unsigned int id, unsigned short **cache)
 
int name2id (const name_map *map, int max, const char *name)
 

Macro Definition Documentation

◆ ARR_SIZE

#define ARR_SIZE (   a)    (sizeof(a)/sizeof(a[0]))

Definition at line 54 of file utils.h.

◆ CS_AC_IGNORE

#define CS_AC_IGNORE   (1 << 7)

Definition at line 64 of file utils.h.

◆ HEX_THRESHOLD

#define HEX_THRESHOLD   9

Definition at line 16 of file utils.h.

◆ MATRIX_SIZE

#define MATRIX_SIZE (   a)    (sizeof(a[0])/sizeof(a[0][0]))

Definition at line 55 of file utils.h.

◆ MIN

#define MIN (   x,
  y 
)    ((x) < (y) ? (x) : (y))

Definition at line 59 of file utils.h.

Typedef Documentation

◆ insn_map

typedef struct insn_map insn_map

◆ name_map

typedef struct name_map name_map

Function Documentation

◆ arr_exist()

bool arr_exist ( uint16_t arr,
unsigned char  max,
unsigned int  id 
)

Definition at line 128 of file utils.c.

◆ arr_exist8()

bool arr_exist8 ( unsigned char *  arr,
unsigned char  max,
unsigned int  id 
)

Definition at line 116 of file utils.c.

◆ count_positive()

unsigned int count_positive ( const uint16_t list)

Definition at line 72 of file utils.c.

◆ count_positive8()

unsigned int count_positive8 ( const unsigned char *  list)

Definition at line 83 of file utils.c.

◆ cs_snprintf()

int cs_snprintf ( char *  buffer,
size_t  size,
const char *  fmt,
  ... 
)

Definition at line 104 of file utils.c.

◆ cs_strdup()

char* cs_strdup ( const char *  str)

Definition at line 92 of file utils.c.

◆ id2name()

const char* id2name ( const name_map map,
int  max,
const unsigned int  id 
)

Definition at line 56 of file utils.c.

◆ insn_find()

unsigned short insn_find ( const insn_map m,
unsigned int  max,
unsigned int  id,
unsigned short **  cache 
)

Definition at line 31 of file utils.c.

◆ name2id()

int name2id ( const name_map map,
int  max,
const char *  name 
)

Definition at line 42 of file utils.c.



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