8 #include "../include/rz_analysis.h"
9 #include "../include/rz_util/rz_graph.h"
27 return rz_str_newf(
"attr.%s.%s", class_name, attr_type);
30 static char *
key_attr_content(
const char *class_name,
const char *attr_type,
const char *attr_id) {
31 return rz_str_newf(
"attr.%s.%s.%s", class_name, attr_type, attr_id);
35 return rz_str_newf(
"attr.%s.%s.%s.specific", class_name, attr_type, attr_id);
63 rz_list_foreach (
classes, iter_class,
class) {
69 RzList *methods =
class->methods;
81 if (!name_sanitized) {
82 return RZ_ANALYSIS_CLASS_ERR_OTHER;
84 RzAnalysisClassErr
err = RZ_ANALYSIS_CLASS_ERR_SUCCESS;
91 err = RZ_ANALYSIS_CLASS_ERR_CLASH;
100 if (!class_name_sanitized) {
109 free(class_name_sanitized);
115 free(class_name_sanitized);
149 free(attr_type_array);
160 free(class_name_sanitized);
169 if (!class_name_sanitized) {
173 free(class_name_sanitized);
185 static bool rename_key(
Sdb *sdb,
const char *key_old,
const char *key_new) {
186 char *content =
sdb_get(sdb, key_old, 0);
191 sdb_set(sdb, key_new, content, 0);
198 return RZ_ANALYSIS_CLASS_ERR_CLASH;
202 if (!old_name_sanitized) {
203 return RZ_ANALYSIS_CLASS_ERR_OTHER;
206 if (!new_name_sanitized) {
207 free(old_name_sanitized);
208 return RZ_ANALYSIS_CLASS_ERR_OTHER;
211 RzAnalysisClassErr
err = RZ_ANALYSIS_CLASS_ERR_SUCCESS;
218 err = RZ_ANALYSIS_CLASS_ERR_NONEXISTENT_CLASS;
238 if (
key && new_key) {
248 if (
key && new_key) {
258 if (
key && new_key) {
266 .name_new = new_name_sanitized
271 free(old_name_sanitized);
272 free(new_name_sanitized);
293 if (!class_name_sanitized) {
297 if (!attr_id_sanitized) {
298 free(class_name_sanitized);
304 free(class_name_sanitized);
305 free(attr_id_sanitized);
315 return RZ_ANALYSIS_CLASS_ERR_NONEXISTENT_CLASS;
337 .attr_type = attr_type,
338 .attr_id = attr_id },
343 return RZ_ANALYSIS_CLASS_ERR_SUCCESS;
349 if (!class_name_sanitized) {
350 return RZ_ANALYSIS_CLASS_ERR_OTHER;
354 if (!attr_id_sanitized) {
355 free(class_name_sanitized);
356 return RZ_ANALYSIS_CLASS_ERR_OTHER;
361 free(class_name_sanitized);
362 free(attr_id_sanitized);
392 .attr_type = attr_type,
397 return RZ_ANALYSIS_CLASS_ERR_SUCCESS;
402 if (!class_name_sanitized) {
403 return RZ_ANALYSIS_CLASS_ERR_OTHER;
407 if (!attr_id_sanitized) {
408 free(class_name_sanitized);
409 return RZ_ANALYSIS_CLASS_ERR_OTHER;
414 free(class_name_sanitized);
415 free(attr_id_sanitized);
423 return RZ_ANALYSIS_CLASS_ERR_OTHER;
428 return RZ_ANALYSIS_CLASS_ERR_CLASH;
433 return RZ_ANALYSIS_CLASS_ERR_NONEXISTENT_ATTR;
466 .attr_type = attr_type,
467 .attr_id = attr_id_old },
468 .attr_id_new = attr_id_new
472 return RZ_ANALYSIS_CLASS_ERR_SUCCESS;
477 if (!class_name_sanitized) {
478 return RZ_ANALYSIS_CLASS_ERR_OTHER;
481 if (!attr_id_old_sanitized) {
482 free(class_name_sanitized);
483 return RZ_ANALYSIS_CLASS_ERR_OTHER;
486 if (!attr_id_new_sanitized) {
487 free(class_name_sanitized);
488 free(attr_id_old_sanitized);
489 return RZ_ANALYSIS_CLASS_ERR_OTHER;
492 free(class_name_sanitized);
493 free(attr_id_old_sanitized);
494 free(attr_id_new_sanitized);
511 static char *
flagname_attr(
const char *attr_type,
const char *class_name,
const char *attr_id) {
513 if (!class_name_sanitized) {
517 if (!attr_id_sanitized) {
518 free(class_name_sanitized);
521 char *
r =
rz_str_newf(
"%s.%s.%s", attr_type, class_name, attr_id);
522 free(class_name_sanitized);
523 free(attr_id_sanitized);
561 if (
err != RZ_ANALYSIS_CLASS_ERR_SUCCESS) {
566 rz_str_ncpy(attr_id_out, attr_id, attr_id_out_size);
569 return RZ_ANALYSIS_CLASS_ERR_SUCCESS;
574 if (!class_name_sanitized) {
575 return RZ_ANALYSIS_CLASS_ERR_OTHER;
580 free(class_name_sanitized);
590 if (
a->vaddr >
b->vaddr) {
593 if (
a->vaddr <
b->vaddr) {
608 free(meth->real_name);
615 rz_list_foreach (methods, iter_method, sym) {
619 RzAnalysisMethod method;
620 method.addr = sym->
vaddr;
621 method.vtable_offset = -1;
626 method.real_name = method_name;
627 method.method_type = RZ_ANALYSIS_CLASS_METHOD_DEFAULT;
648 RzAnalysisMethod *meth;
650 if (meth->addr ==
addr) {
662 return RZ_ANALYSIS_CLASS_ERR_OTHER;
664 RzAnalysisMethod *meth;
666 if (meth->addr ==
addr) {
668 method->addr = meth->addr;
669 method->method_type = meth->method_type;
670 method->vtable_offset = meth->vtable_offset;
671 method->real_name =
rz_str_new(meth->real_name);
673 return RZ_ANALYSIS_CLASS_ERR_SUCCESS;
677 return RZ_ANALYSIS_CLASS_ERR_OTHER;
685 return RZ_ANALYSIS_CLASS_ERR_NONEXISTENT_ATTR;
697 return RZ_ANALYSIS_CLASS_ERR_OTHER;
700 meth->vtable_offset = atoll(cur);
705 return RZ_ANALYSIS_CLASS_ERR_OTHER;
713 return RZ_ANALYSIS_CLASS_ERR_OTHER;
723 return RZ_ANALYSIS_CLASS_ERR_OTHER;
726 return RZ_ANALYSIS_CLASS_ERR_SUCCESS;
731 RzAnalysisMethod *meth =
e;
742 if (!class_name_sanitized) {
749 free(class_name_sanitized);
754 free(class_name_sanitized);
759 RzAnalysisMethod meth;
773 return RZ_ANALYSIS_CLASS_ERR_OTHER;
777 if (
err != RZ_ANALYSIS_CLASS_ERR_SUCCESS) {
785 return RZ_ANALYSIS_CLASS_ERR_SUCCESS;
789 RzAnalysisMethod meth;
797 if (
err != RZ_ANALYSIS_CLASS_ERR_SUCCESS) {
802 if (old_fn && new_fn) {
807 return RZ_ANALYSIS_CLASS_ERR_SUCCESS;
824 if (old_fn && new_fn) {
857 if (!class_name_sanitized) {
858 return RZ_ANALYSIS_CLASS_ERR_OTHER;
861 if (!meth_name_sanitized) {
862 free(class_name_sanitized);
863 return RZ_ANALYSIS_CLASS_ERR_OTHER;
866 if (
err == RZ_ANALYSIS_CLASS_ERR_SUCCESS) {
873 free(class_name_sanitized);
874 free(meth_name_sanitized);
882 free(base->class_name);
888 return RZ_ANALYSIS_CLASS_ERR_NONEXISTENT_ATTR;
895 base->class_name =
strdup(cur);
896 if (!base->class_name) {
898 return RZ_ANALYSIS_CLASS_ERR_OTHER;
904 free(base->class_name);
905 return RZ_ANALYSIS_CLASS_ERR_OTHER;
915 free(base->class_name);
916 return RZ_ANALYSIS_CLASS_ERR_OTHER;
919 return RZ_ANALYSIS_CLASS_ERR_SUCCESS;
924 RzAnalysisBaseClass *base =
e;
935 if (!class_name_sanitized) {
942 free(class_name_sanitized);
947 free(class_name_sanitized);
952 RzAnalysisBaseClass base;
966 return RZ_ANALYSIS_CLASS_ERR_OTHER;
968 RzAnalysisClassErr
err;
976 err = RZ_ANALYSIS_CLASS_ERR_OTHER;
985 if (!base_class_name_sanitized) {
986 return RZ_ANALYSIS_CLASS_ERR_OTHER;
990 free(base_class_name_sanitized);
991 return RZ_ANALYSIS_CLASS_ERR_NONEXISTENT_CLASS;
995 RzAnalysisBaseClass *existing_base;
997 if (!strcmp(existing_base->class_name, base->class_name)) {
998 free(base_class_name_sanitized);
1000 return RZ_ANALYSIS_CLASS_ERR_OTHER;
1005 free(base_class_name_sanitized);
1023 RzAnalysisBaseClass *base;
1025 if (base->class_name && strcmp(base->class_name,
ctx->class_name) == 0) {
1048 RzAnalysisBaseClass *base;
1050 if (base->class_name && strcmp(base->class_name,
ctx->class_name_old) == 0) {
1076 return RZ_ANALYSIS_CLASS_ERR_NONEXISTENT_ATTR;
1079 char *cur = content;
1088 return RZ_ANALYSIS_CLASS_ERR_OTHER;
1106 return RZ_ANALYSIS_CLASS_ERR_OTHER;
1109 return RZ_ANALYSIS_CLASS_ERR_SUCCESS;
1114 RzAnalysisVTable *vtable =
e;
1125 if (!class_name_sanitized) {
1132 free(class_name_sanitized);
1137 free(class_name_sanitized);
1142 RzAnalysisVTable vtable;
1157 RzAnalysisVTable *existing_vtable;
1159 if (vtable->addr == existing_vtable->addr) {
1161 return RZ_ANALYSIS_CLASS_ERR_OTHER;
1169 return RZ_ANALYSIS_CLASS_ERR_OTHER;
1180 return RZ_ANALYSIS_CLASS_ERR_OTHER;
1184 if (
err != RZ_ANALYSIS_CLASS_ERR_SUCCESS) {
1190 return RZ_ANALYSIS_CLASS_ERR_SUCCESS;
1207 if (old_fn && new_fn) {
1237 if (!class_name_sanitized) {
1238 return RZ_ANALYSIS_CLASS_ERR_OTHER;
1241 if (!vtable_id_sanitized) {
1242 free(class_name_sanitized);
1243 return RZ_ANALYSIS_CLASS_ERR_OTHER;
1246 if (
err == RZ_ANALYSIS_CLASS_ERR_SUCCESS) {
1249 free(class_name_sanitized);
1250 free(vtable_id_sanitized);
1272 HtPP *hashmap = ht_pp_new0();
1290 ht_pp_insert(hashmap,
name, curr_node);
1294 RzAnalysisBaseClass *base;
1296 bool base_found =
false;
1297 RzGraphNode *base_node = ht_pp_find(hashmap, base->class_name, &base_found);
1304 ht_pp_insert(hashmap, base->class_name, base_node);
1311 ht_pp_free(hashmap);
1316 ht_pp_free(hashmap);
RZ_API RzAnalysisFunction * rz_analysis_get_function_at(RzAnalysis *analysis, ut64 addr)
static RzILOpEffect * cls(cs_insn *insn)
RZ_API int sdb_array_add(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API int sdb_array_remove(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API bool sdb_array_contains(Sdb *s, const char *key, const char *val, ut32 *cas)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_classes(RZ_NONNULL RzBin *bin)
static RzList * classes(RzBinFile *bf)
const lzma_allocator const uint8_t size_t uint8_t * out
static bool rz_analysis_class_exists_raw(RzAnalysis *analysis, const char *name)
static const char * key_class(const char *name)
static RzAnalysisClassErr rz_analysis_class_rename_attr(RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id_old, const char *attr_id_new)
static char * flagname_vtable(const char *class_name, const char *vtable_id)
static char * rz_analysis_class_get_attr(RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id, bool specific)
RZ_API RzVector * rz_analysis_class_base_get_all(RzAnalysis *analysis, const char *class_name)
RZ_API void rz_analysis_class_method_recover(RzAnalysis *analysis, RzBinClass *cls, RzList *methods)
RZ_API bool rz_analysis_class_method_exists_by_addr(RzAnalysis *analysis, const char *class_name, ut64 addr)
static void rz_analysis_class_base_delete_class(RzAnalysis *analysis, const char *class_name)
RZ_API RzAnalysisClassErr rz_analysis_class_vtable_delete(RzAnalysis *analysis, const char *class_name, const char *vtable_id)
static void rz_analysis_class_base_fini_proxy(void *e, void *user)
RZ_API RzAnalysisClassErr rz_analysis_class_method_rename(RzAnalysis *analysis, const char *class_name, const char *old_meth_name, const char *new_meth_name)
RZ_API RzAnalysisClassErr rz_analysis_class_base_set(RzAnalysis *analysis, const char *class_name, RzAnalysisBaseClass *base)
static bool rename_key(Sdb *sdb, const char *key_old, const char *key_new)
RZ_API RzVector * rz_analysis_class_method_get_all(RzAnalysis *analysis, const char *class_name)
static RzAnalysisClassErr rz_analysis_class_set_attr_raw(RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id, const char *content)
static RzAnalysisClassErr rz_analysis_class_delete_attr(RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id)
RZ_API void rz_analysis_class_base_fini(RzAnalysisBaseClass *base)
RZ_API bool rz_analysis_class_exists(RzAnalysis *analysis, const char *name)
static void rz_analysis_class_unique_attr_id_raw(RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, char *out, size_t out_size)
static RzAnalysisClassErr rz_analysis_class_add_attr_unique(RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *content, char *attr_id_out, size_t attr_id_out_size)
static bool rz_analysis_class_base_delete_class_cb(void *user, const char *k, const char *v)
RZ_API void rz_analysis_class_recover_all(RzAnalysis *analysis)
static void rz_analysis_class_rename_flag(RzAnalysis *analysis, const char *old_name, const char *new_name)
static void rz_analysis_class_set_flag(RzAnalysis *analysis, const char *name, ut64 addr, ut32 size)
RZ_API void rz_analysis_class_vtable_fini(RzAnalysisVTable *vtable)
static RzAnalysisClassErr rz_analysis_class_delete_attr_raw(RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id)
RZ_API RzAnalysisClassErr rz_analysis_class_rename(RzAnalysis *analysis, const char *old_name, const char *new_name)
static char * flagname_attr(const char *attr_type, const char *class_name, const char *attr_id)
RZ_API RzAnalysisClassErr rz_analysis_class_method_delete(RzAnalysis *analysis, const char *class_name, const char *meth_name)
static void rz_analysis_class_method_delete_class(RzAnalysis *analysis, const char *class_name)
RZ_API RzAnalysisClassErr rz_analysis_class_base_delete(RzAnalysis *analysis, const char *class_name, const char *base_id)
RZ_API RzAnalysisClassErr rz_analysis_class_method_get(RzAnalysis *analysis, const char *class_name, const char *meth_name, RzAnalysisMethod *meth)
static RzAnalysisClassErr rz_analysis_class_add_attr_unique_raw(RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *content, char *attr_id_out, size_t attr_id_out_size)
static void rz_analysis_class_base_rename_class(RzAnalysis *analysis, const char *class_name_old, const char *class_name_new)
static char * key_attr_type_attrs(const char *class_name, const char *attr_type)
static void rz_analysis_class_vtable_delete_class(RzAnalysis *analysis, const char *class_name)
static char * flagname_method(const char *class_name, const char *meth_name)
static void rz_analysis_class_method_fini_proxy(void *e, void *user)
static void rz_analysis_class_unset_flag(RzAnalysis *analysis, const char *name)
RZ_API void rz_analysis_class_recover_from_rzbin(RzAnalysis *analysis)
static const char * attr_type_id(RzAnalysisClassAttrType attr_type)
static RzAnalysisClassErr rz_analysis_class_rename_attr_raw(RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id_old, const char *attr_id_new)
RZ_API RzGraph * rz_analysis_class_get_inheritance_graph(RzAnalysis *analysis)
Creates RzGraph from class inheritance information where each node has RzGraphNodeInfo as generic dat...
RZ_API RzAnalysisClassErr rz_analysis_class_vtable_set(RzAnalysis *analysis, const char *class_name, RzAnalysisVTable *vtable)
RZ_API RzAnalysisClassErr rz_analysis_class_method_set(RzAnalysis *analysis, const char *class_name, RzAnalysisMethod *meth)
RZ_API SdbList * rz_analysis_class_get_all(RzAnalysis *analysis, bool sorted)
RZ_API void rz_analysis_class_method_fini(RzAnalysisMethod *meth)
RZ_API RzVector * rz_analysis_class_vtable_get_all(RzAnalysis *analysis, const char *class_name)
RZ_API void rz_analysis_class_foreach(RzAnalysis *analysis, SdbForeachCallback cb, void *user)
RZ_API RzAnalysisClassErr rz_analysis_class_create(RzAnalysis *analysis, const char *name)
static void rz_analysis_class_vtable_rename_class(RzAnalysis *analysis, const char *old_class_name, const char *new_class_name)
RZ_API bool rz_analysis_class_method_exists(RzAnalysis *analysis, const char *class_name, const char *meth_name)
static void rz_analysis_class_vtable_fini_proxy(void *e, void *user)
RZ_API RzAnalysisClassErr rz_analysis_class_base_get(RzAnalysis *analysis, const char *class_name, const char *base_id, RzAnalysisBaseClass *base)
RZ_API RzAnalysisClassErr rz_analysis_class_method_get_by_addr(RzAnalysis *analysis, const char *class_name, ut64 addr, RzAnalysisMethod *method)
static char * key_attr_content_specific(const char *class_name, const char *attr_type, const char *attr_id)
static bool rz_analysis_class_base_rename_class_cb(void *user, const char *k, const char *v)
static char * rz_analysis_class_get_attr_raw(RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id, bool specific)
static char * key_attr_content(const char *class_name, const char *attr_type, const char *attr_id)
static RzAnalysisClassErr rz_analysis_class_base_set_raw(RzAnalysis *analysis, const char *class_name, RzAnalysisBaseClass *base, const char *base_class_name_sanitized)
static char * key_attr_types(const char *name)
RZ_API void rz_analysis_class_delete(RzAnalysis *analysis, const char *name)
RZ_API RzAnalysisClassErr rz_analysis_class_vtable_get(RzAnalysis *analysis, const char *class_name, const char *vtable_id, RzAnalysisVTable *vtable)
static void rz_analysis_class_method_rename_class(RzAnalysis *analysis, const char *old_class_name, const char *new_class_name)
static int symbol_method_sort_by_addr(const void *x, const void *y)
static RzAnalysisClassErr rz_analysis_class_set_attr(RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id, const char *content)
@ RZ_ANALYSIS_CLASS_ATTR_TYPE_METHOD
@ RZ_ANALYSIS_CLASS_ATTR_TYPE_BASE
@ RZ_ANALYSIS_CLASS_ATTR_TYPE_VTABLE
RZ_API void rz_cons_break_pop(void)
RZ_API void rz_cons_break_push(RzConsBreak cb, void *user)
RZ_API bool rz_cons_is_breaked(void)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len key
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API void rz_list_sort(RZ_NONNULL RzList *list, RZ_NONNULL RzListComparator cmp)
Sorts via merge sort or via insertion sort a list.
void * malloc(size_t size)
static const char struct stat static buf struct stat static buf static idle const char static path static fd const char static len const void static prot const char struct module static image struct kernel_sym static table unsigned char static buf static fsuid unsigned struct dirent unsigned static count const struct iovec static count static pid const void static len static flags const struct sched_param static p static pid static policy struct timespec static tp static suid unsigned fn
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
RZ_API void ls_free(SdbList *list)
#define ls_foreach(list, it, pos)
RZ_API void rz_analysis_rtti_recover_all(RzAnalysis *analysis)
#define rz_return_val_if_fail(expr, val)
RZ_API void rz_event_send(RzEvent *ev, int type, void *data)
@ RZ_EVENT_CLASS_ATTR_SET
@ RZ_EVENT_CLASS_ATTR_DEL
@ RZ_EVENT_CLASS_ATTR_RENAME
RZ_API RzGraph * rz_graph_new(void)
RZ_API void rz_graph_add_edge(RzGraph *g, RzGraphNode *from, RzGraphNode *to)
RZ_API void rz_graph_free(RzGraph *g)
RZ_API RzGraphNode * rz_graph_add_node_info(RzGraph *graph, const char *title, const char *body, ut64 offset)
RZ_API ut64 rz_num_get(RzNum *num, const char *str)
RZ_API ut64 rz_num_math(RzNum *num, const char *str)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API char * rz_str_sanitize_sdb_key(const char *s)
RZ_API char * rz_str_new(const char *str)
RZ_API size_t rz_str_ncpy(char *dst, const char *src, size_t n)
Secure string copy with null terminator.
RZ_API bool rz_str_startswith(RZ_NONNULL const char *str, RZ_NONNULL const char *needle)
Checks if a string starts with a specifc sequence of characters (case sensitive)
RZ_API size_t rz_str_split(char *str, char ch)
Split string str in place by using ch as a delimiter.
RZ_API void * rz_vector_reserve(RzVector *vec, size_t capacity)
RZ_API void * rz_vector_push(RzVector *vec, void *x)
#define rz_vector_foreach(vec, it)
RZ_API void rz_vector_free(RzVector *vec)
RZ_API RzVector * rz_vector_new(size_t elem_size, RzVectorFree free, void *free_user)
RZ_API int sdb_set(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API char * sdb_get(Sdb *s, const char *key, ut32 *cas)
RZ_API bool sdb_remove(Sdb *s, const char *key, ut32 cas)
RZ_API bool sdb_foreach(Sdb *s, SdbForeachCallback cb, void *user)
RZ_API SdbList * sdb_foreach_list(Sdb *s, bool sorted)
RZ_API bool sdb_exists(Sdb *s, const char *key)
RZ_API char * sdb_anext(char *str, char **next)
bool(* SdbForeachCallback)(void *user, const char *k, const char *v)
RZ_API int sdb_alen(const char *str)
#define sdb_aforeach_next(x)
#define sdb_aforeach(x, y)
static char * sdbkv_key(const SdbKv *kv)
const char * class_name_new
const char * class_name_old
RzFlagUnsetName unset_name
ut64(WINAPI *w32_GetEnabledXStateFeatures)()