Fix annotation inconsistencies

This commit is contained in:
wingdeans 2022-08-01 05:21:39 +00:00 committed by Dean
parent d44b5748eb
commit a6a7a5f530
124 changed files with 457 additions and 462 deletions

View file

@ -389,7 +389,7 @@ RZ_API void rz_analysis_trace_bb(RzAnalysis *analysis, ut64 addr) {
}
}
RZ_API RzList *rz_analysis_get_fcns(RzAnalysis *analysis) {
RZ_API RzList /*<RzAnalysisFunction *>*/ *rz_analysis_get_fcns(RzAnalysis *analysis) {
// avoid received to free this thing
analysis->fcns->free = NULL;
return analysis->fcns;
@ -666,7 +666,7 @@ RZ_API void rz_analysis_bind(RzAnalysis *analysis, RzAnalysisBind *b) {
}
}
RZ_API RzList *rz_analysis_preludes(RzAnalysis *analysis) {
RZ_API RzList /*<RzSearchKeyword *>*/ *rz_analysis_preludes(RzAnalysis *analysis) {
if (analysis->cur && analysis->cur->preludes) {
return analysis->cur->preludes(analysis);
}

View file

@ -130,7 +130,7 @@ static bool block_list_cb(RzAnalysisBlock *block, void *user) {
return true;
}
RZ_API RzList *rz_analysis_get_blocks_in(RzAnalysis *analysis, ut64 addr) {
RZ_API RzList /*<RzAnalysisBlock *>*/ *rz_analysis_get_blocks_in(RzAnalysis *analysis, ut64 addr) {
RzList *list = rz_list_newf((RzListFree)rz_analysis_block_unref);
if (list) {
rz_analysis_blocks_foreach_in(analysis, addr, block_list_cb, list);
@ -162,7 +162,7 @@ RZ_API void rz_analysis_blocks_foreach_intersect(RzAnalysis *analysis, ut64 addr
all_intersect(unwrap(analysis->bb_tree), addr, size, cb, user);
}
RZ_API RzList *rz_analysis_get_blocks_intersect(RzAnalysis *analysis, ut64 addr, ut64 size) {
RZ_API RzList /*<RzAnalysisBlock *>*/ *rz_analysis_get_blocks_intersect(RzAnalysis *analysis, ut64 addr, ut64 size) {
RzList *list = rz_list_newf((RzListFree)rz_analysis_block_unref);
if (!list) {
return NULL;
@ -564,7 +564,7 @@ static bool recurse_list_cb(RzAnalysisBlock *block, void *user) {
return true;
}
RZ_API RzList *rz_analysis_block_recurse_list(RzAnalysisBlock *block) {
RZ_API RzList /*<RzAnalysisBlock *>*/ *rz_analysis_block_recurse_list(RzAnalysisBlock *block) {
RzList *ret = rz_list_newf((RzListFree)rz_analysis_block_unref);
if (ret) {
rz_analysis_block_recurse(block, recurse_list_cb, ret);

View file

@ -1258,7 +1258,7 @@ RZ_API RzAnalysisClassErr rz_analysis_class_vtable_delete(RzAnalysis *analysis,
* @param analysis
* @return RzGraph* NULL if failure
*/
RZ_API RzGraph *rz_analysis_class_get_inheritance_graph(RzAnalysis *analysis) {
RZ_API RzGraph /*<RzGraphNodeInfo *>*/ *rz_analysis_class_get_inheritance_graph(RzAnalysis *analysis) {
rz_return_val_if_fail(analysis, NULL);
RzGraph *class_graph = rz_graph_new();
if (!class_graph) {

View file

@ -173,7 +173,7 @@ RZ_API bool rz_analysis_diff_bb(RzAnalysis *analysis, RzAnalysisFunction *fcn, R
return true;
}
RZ_API int rz_analysis_diff_fcn(RzAnalysis *analysis, RzList *fcns1, RzList *fcns2) {
RZ_API int rz_analysis_diff_fcn(RzAnalysis *analysis, RzList /*<RzAnalysisFunction *>*/ *fcns1, RzList /*<RzAnalysisFunction *>*/ *fcns2) {
RzAnalysisFunction *fcn, *fcn2, *mfcn, *mfcn2;
RzListIter *iter, *iter2;
double t, ot, sizes_div;

View file

@ -1217,7 +1217,7 @@ static VariableLocation *parse_dwarf_location(Context *ctx, const RzBinDwarfAttr
return location;
}
static st32 parse_function_args_and_vars(Context *ctx, ut64 idx, RzStrBuf *args, RzList /*<Variable*>*/ *variables) {
static st32 parse_function_args_and_vars(Context *ctx, ut64 idx, RzStrBuf *args, RzList /*<Variable *>*/ *variables) {
const RzBinDwarfDie *die = &ctx->all_dies[idx++];
if (die->has_children) {
@ -1305,7 +1305,7 @@ static st32 parse_function_args_and_vars(Context *ctx, ut64 idx, RzStrBuf *args,
return 0;
}
static void sdb_save_dwarf_function(Function *dwarf_fcn, RzList /*<Variable*>*/ *variables, Sdb *sdb) {
static void sdb_save_dwarf_function(Function *dwarf_fcn, RzList /*<Variable *>*/ *variables, Sdb *sdb) {
char *sname = rz_str_sanitize_sdb_key(dwarf_fcn->name);
sdb_set(sdb, sname, "fcn", 0);

View file

@ -1485,7 +1485,7 @@ beach:
* \param block Pointer to RzAnalysisBlock in which analysis will be performed on. If null, analysis will take care of block creation.
* \param address Address where analysis will start from
*/
RZ_API bool rz_analysis_task_item_new(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzVector *tasks, RZ_NONNULL RzAnalysisFunction *fcn, RZ_NULLABLE RzAnalysisBlock *block, ut64 address) {
RZ_API bool rz_analysis_task_item_new(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzVector /*<RzAnalysisTaskItem>*/ *tasks, RZ_NONNULL RzAnalysisFunction *fcn, RZ_NULLABLE RzAnalysisBlock *block, ut64 address) {
rz_return_val_if_fail(analysis && tasks && fcn, false);
RzAnalysisTaskItem item = { fcn, block, fcn->stack, address };
RzAnalysisTaskItem *it;
@ -1506,7 +1506,7 @@ RZ_API bool rz_analysis_task_item_new(RZ_NONNULL RzAnalysis *analysis, RZ_NONNUL
*
* \param tasks Pointer to RzVector of RzAnalysisTaskItem to be performed analysis on.
*/
RZ_API int rz_analysis_run_tasks(RZ_NONNULL RzVector *tasks) {
RZ_API int rz_analysis_run_tasks(RZ_NONNULL RzVector /*<RzAnalysisTaskItem>*/ *tasks) {
rz_return_val_if_fail(tasks, RZ_ANALYSIS_RET_ERROR);
int ret = RZ_ANALYSIS_RET_ERROR;
while (!rz_vector_empty(tasks)) {
@ -1684,7 +1684,7 @@ RZ_API int rz_analysis_fcn_del(RzAnalysis *a, ut64 addr) {
return true;
}
RZ_API RzAnalysisFunction *rz_analysis_get_fcn_in(RzAnalysis *analysis, ut64 addr, int type) {
RZ_DEPRECATE RZ_API RzAnalysisFunction *rz_analysis_get_fcn_in(RzAnalysis *analysis, ut64 addr, int type) {
RzList *list = rz_analysis_get_functions_in(analysis, addr);
RzAnalysisFunction *ret = NULL;
if (list && !rz_list_empty(list)) {
@ -1705,7 +1705,7 @@ RZ_API RzAnalysisFunction *rz_analysis_get_fcn_in(RzAnalysis *analysis, ut64 add
return ret;
}
RZ_API RzAnalysisFunction *rz_analysis_get_fcn_in_bounds(RzAnalysis *analysis, ut64 addr, int type) {
RZ_DEPRECATE RZ_API RzAnalysisFunction *rz_analysis_get_fcn_in_bounds(RzAnalysis *analysis, ut64 addr, int type) {
RzAnalysisFunction *fcn, *ret = NULL;
RzListIter *iter;
if (type == RZ_ANALYSIS_FCN_TYPE_ROOT) {
@ -2478,7 +2478,7 @@ RZ_API size_t rz_analysis_function_arg_count(RzAnalysis *a, RzAnalysisFunction *
* \param a RzAnalysis instance
* \param f Function
*/
RZ_API RZ_OWN RzPVector *rz_analysis_function_args(RzAnalysis *a, RzAnalysisFunction *fcn) {
RZ_API RZ_OWN RzPVector /*<RzAnalysisVar *>*/ *rz_analysis_function_args(RzAnalysis *a, RzAnalysisFunction *fcn) {
if (!a || !fcn) {
return NULL;
}

View file

@ -17,7 +17,7 @@ static bool get_functions_block_cb(RzAnalysisBlock *block, void *user) {
return true;
}
RZ_API RzList *rz_analysis_get_functions_in(RzAnalysis *analysis, ut64 addr) {
RZ_API RzList /*<RzAnalysisFunction *>*/ *rz_analysis_get_functions_in(RzAnalysis *analysis, ut64 addr) {
RzList *list = rz_list_new();
if (!list) {
return NULL;
@ -375,7 +375,7 @@ RZ_API bool rz_analysis_function_was_modified(RzAnalysisFunction *fcn) {
return false;
}
RZ_API RZ_BORROW RzList *rz_analysis_function_list(RzAnalysis *analysis) {
RZ_API RZ_BORROW RzList /*<RzAnalysisFunction *>*/ *rz_analysis_function_list(RzAnalysis *analysis) {
rz_return_val_if_fail(analysis, NULL);
return analysis->fcns;
}

View file

@ -276,7 +276,7 @@ RZ_API void rz_analysis_hint_set_val(RzAnalysis *a, ut64 addr, ut64 v) {
SET_HINT(RZ_ANALYSIS_ADDR_HINT_TYPE_VAL, r->val = v;);
}
RZ_API void rz_analysis_hint_set_arch(RzAnalysis *a, ut64 addr, const char *arch) {
RZ_API void rz_analysis_hint_set_arch(RzAnalysis *a, ut64 addr, RZ_NULLABLE const char *arch) {
RzAnalysisArchHintRecord *record = (RzAnalysisArchHintRecord *)ensure_ranged_hint_record(&a->arch_hints, addr, sizeof(RzAnalysisArchHintRecord));
if (!record) {
return;

View file

@ -220,11 +220,11 @@ RZ_API RzPVector /*<RzIntervalNode<RMetaItem> *>*/ *rz_meta_get_all_at(RzAnalysi
return collect_nodes_at(a, RZ_META_TYPE_ANY, rz_spaces_current(&a->meta_spaces), at);
}
RZ_API RzPVector *rz_meta_get_all_in(RzAnalysis *a, ut64 at, RzAnalysisMetaType type) {
RZ_API RzPVector /*<RzIntervalNode<RMetaItem> *>*/ *rz_meta_get_all_in(RzAnalysis *a, ut64 at, RzAnalysisMetaType type) {
return collect_nodes_in(a, type, rz_spaces_current(&a->meta_spaces), at);
}
RZ_API RzPVector *rz_meta_get_all_intersect(RzAnalysis *a, ut64 start, ut64 size, RzAnalysisMetaType type) {
RZ_API RzPVector /*<RzIntervalNode<RMetaItem> *>*/ *rz_meta_get_all_intersect(RzAnalysis *a, ut64 start, ut64 size, RzAnalysisMetaType type) {
rz_return_val_if_fail(size, NULL);
ut64 end = start + size - 1;
if (end < start) {

View file

@ -12,7 +12,7 @@ RZ_API RzAnalysisOp *rz_analysis_op_new(void) {
return op;
}
RZ_API RzList *rz_analysis_op_list_new(void) {
RZ_API RzList /*<RzAnalysisOp *>*/ *rz_analysis_op_list_new(void) {
RzList *list = rz_list_new();
if (list) {
list->free = &rz_analysis_op_free;

View file

@ -79,7 +79,7 @@ RZ_API void rz_analysis_reflines_free(RzAnalysisRefline *rl) {
* nlines - max number of lines of code to consider
* linesout - true if you want to display lines that go outside of the scope [addr;addr+len)
* linescall - true if you want to display call lines */
RZ_API RzList *rz_analysis_reflines_get(RzAnalysis *analysis, ut64 addr, const ut8 *buf, ut64 len, int nlines, int linesout, int linescall) {
RZ_API RzList /*<RzAnalysisRefline *>*/ *rz_analysis_reflines_get(RzAnalysis *analysis, ut64 addr, const ut8 *buf, ut64 len, int nlines, int linesout, int linescall) {
RzList *list, *sten;
RzListIter *iter;
RzAnalysisOp op;

View file

@ -857,7 +857,7 @@ static void detect_constructor_destructor(RzAnalysis *analysis, class_type_info
rz_vector_free(vec);
}
RZ_API void rz_analysis_rtti_itanium_recover_all(RVTableContext *context, RzList *vtables) {
RZ_API void rz_analysis_rtti_itanium_recover_all(RVTableContext *context, RzList /*<RVTableInfo *>*/ *vtables) {
RzList /*<class_type_info>*/ *rtti_list = rz_list_new();
rtti_list->free = rtti_itanium_type_info_free;
// to escape multiple same infos from multiple inheritance

View file

@ -93,7 +93,7 @@ static bool type_collect_cb(void *user, ut64 k, const void *v) {
*
* \param analysis RzAnalysis instance
*/
RZ_API RZ_OWN RzList /* RzType */ *rz_analysis_type_links(RzAnalysis *analysis) {
RZ_API RZ_OWN RzList /*<RzType *>*/ *rz_analysis_type_links(RzAnalysis *analysis) {
rz_return_val_if_fail(analysis, NULL);
RzList *types = rz_list_new();
ht_up_foreach(analysis->type_links, type_collect_cb, types);
@ -139,7 +139,7 @@ static bool type_paths_collect_by_offset_cb(void *user, ut64 k, const void *v) {
* \param analysis RzAnalysis instance
* \param offset The offset of the member to match against
*/
RZ_API RZ_OWN RzList /* RzTypePath */ *rz_analysis_type_links_by_offset(RzAnalysis *analysis, ut64 offset) {
RZ_API RZ_OWN RzList /*<RzTypePath *>*/ *rz_analysis_type_links_by_offset(RzAnalysis *analysis, ut64 offset) {
rz_return_val_if_fail(analysis, NULL);
if (offset == UT64_MAX) {
return NULL;
@ -198,7 +198,7 @@ static bool type_paths_collect_by_address_cb(void *user, ut64 k, const void *v)
* \param analysis RzAnalysis instance
* \param addr The address to check against possible matches
*/
RZ_API RZ_OWN RzList /* RzTypePath */ *rz_analysis_type_paths_by_address(RzAnalysis *analysis, ut64 addr) {
RZ_API RZ_OWN RzList /*<RzTypePath *>*/ *rz_analysis_type_paths_by_address(RzAnalysis *analysis, ut64 addr) {
rz_return_val_if_fail(analysis, NULL);
if (addr == UT64_MAX) {
return NULL;

View file

@ -108,7 +108,7 @@ RZ_API void rz_analysis_var_resolve_overlaps(RzAnalysisVar *var) {
rz_pvector_free(cloned_vars);
}
RZ_API RzAnalysisVar *rz_analysis_function_set_var(RzAnalysisFunction *fcn, int delta, char kind, RZ_BORROW RZ_NULLABLE const RzType *type, int size, bool isarg, RZ_NONNULL const char *name) {
RZ_API RZ_BORROW RzAnalysisVar *rz_analysis_function_set_var(RzAnalysisFunction *fcn, int delta, char kind, RZ_BORROW RZ_NULLABLE const RzType *type, int size, bool isarg, RZ_NONNULL const char *name) {
rz_return_val_if_fail(fcn && name, NULL);
RzAnalysisVar *existing = rz_analysis_function_get_var_byname(fcn, name);
if (existing && (existing->kind != kind || existing->delta != delta)) {
@ -256,7 +256,7 @@ RZ_API RZ_BORROW RzAnalysisVar *rz_analysis_function_get_var_byname(RzAnalysisFu
return NULL;
}
RZ_API RzAnalysisVar *rz_analysis_function_get_var(RzAnalysisFunction *fcn, char kind, int delta) {
RZ_API RZ_BORROW RzAnalysisVar *rz_analysis_function_get_var(RzAnalysisFunction *fcn, char kind, int delta) {
void **it;
rz_pvector_foreach (&fcn->vars, it) {
RzAnalysisVar *var = *it;
@ -390,12 +390,12 @@ RZ_API int rz_analysis_var_get_argnum(RzAnalysisVar *var) {
return -1;
}
RZ_API RZ_BORROW RzPVector *rz_analysis_function_get_vars_used_at(RzAnalysisFunction *fcn, ut64 op_addr) {
RZ_API RZ_BORROW RzPVector /*<RzAnalysisVar *>*/ *rz_analysis_function_get_vars_used_at(RzAnalysisFunction *fcn, ut64 op_addr) {
rz_return_val_if_fail(fcn, NULL);
return ht_up_find(fcn->inst_vars, (st64)op_addr - (st64)fcn->addr, NULL);
}
RZ_API RZ_DEPRECATE RzAnalysisVar *rz_analysis_get_used_function_var(RzAnalysis *analysis, ut64 addr) {
RZ_DEPRECATE RZ_API RzAnalysisVar *rz_analysis_get_used_function_var(RzAnalysis *analysis, ut64 addr) {
RzList *fcns = rz_analysis_get_functions_in(analysis, addr);
if (!fcns) {
return NULL;
@ -1132,7 +1132,7 @@ static RzList *var_generate_list(RzAnalysis *a, RzAnalysisFunction *fcn, int kin
return list;
}
RZ_API RzList *rz_analysis_var_all_list(RzAnalysis *analysis, RzAnalysisFunction *fcn) {
RZ_DEPRECATE RZ_API RzList /*<RzAnalysisVar *>*/ *rz_analysis_var_all_list(RzAnalysis *analysis, RzAnalysisFunction *fcn) {
// rz_analysis_var_list if there are not vars with that kind returns a list with
// zero element.. which is an unnecessary loss of cpu time
RzList *list = rz_list_new();
@ -1151,7 +1151,7 @@ RZ_API RzList *rz_analysis_var_all_list(RzAnalysis *analysis, RzAnalysisFunction
return list;
}
RZ_API RzList *rz_analysis_var_list(RzAnalysis *a, RzAnalysisFunction *fcn, int kind) {
RZ_API RzList /*<RzAnalysisVar *>*/ *rz_analysis_var_list(RzAnalysis *a, RzAnalysisFunction *fcn, int kind) {
return var_generate_list(a, fcn, kind);
}
@ -1163,7 +1163,7 @@ static void var_field_free(RzAnalysisVarField *field) {
free(field);
}
RZ_API RzList *rz_analysis_function_get_var_fields(RzAnalysisFunction *fcn, int kind) {
RZ_DEPRECATE RZ_API RzList /*<RzAnalysisVarField *>*/ *rz_analysis_function_get_var_fields(RzAnalysisFunction *fcn, int kind) {
if (!fcn) {
return NULL;
}

View file

@ -256,7 +256,7 @@ static bool global_var_collect_cb(void *user, const void *k, const void *v) {
* \param analysis RzAnalysis
* \return RzList *
*/
RZ_API RZ_OWN RzList *rz_analysis_var_global_get_all(RzAnalysis *analysis) {
RZ_API RZ_OWN RzList /*<RzAnalysisVarGlobal *>*/ *rz_analysis_var_global_get_all(RzAnalysis *analysis) {
rz_return_val_if_fail(analysis, NULL);
RzList *globals = rz_list_new();
if (!globals) {

View file

@ -35,7 +35,7 @@ static void rz_analysis_xref_free(RzAnalysisXRef *xref) {
free(xref);
}
RZ_API RzList *rz_analysis_xref_list_new() {
RZ_API RzList /*<RzAnalysisXRef *>*/ *rz_analysis_xref_list_new() {
return rz_list_newf((RzListFree)free);
}
@ -170,7 +170,7 @@ RZ_API bool rz_analysis_xref_del(RzAnalysis *analysis, ut64 from, ut64 to) {
return res;
}
RZ_API RzList *rz_analysis_xrefs_get_to(RzAnalysis *analysis, ut64 addr) {
RZ_API RzList /*<RzAnalysisXRef *>*/ *rz_analysis_xrefs_get_to(RzAnalysis *analysis, ut64 addr) {
RzList *list = rz_analysis_xref_list_new();
if (!list) {
return NULL;
@ -184,7 +184,7 @@ RZ_API RzList *rz_analysis_xrefs_get_to(RzAnalysis *analysis, ut64 addr) {
return list;
}
RZ_API RzList *rz_analysis_xrefs_get_from(RzAnalysis *analysis, ut64 addr) {
RZ_API RzList /*<RzAnalysisXRef *>*/ *rz_analysis_xrefs_get_from(RzAnalysis *analysis, ut64 addr) {
RzList *list = rz_analysis_xref_list_new();
if (!list) {
return NULL;
@ -203,7 +203,7 @@ RZ_API RzList *rz_analysis_xrefs_get_from(RzAnalysis *analysis, ut64 addr) {
* \param analysis RzAnalysis instance
* \return RzList <RzAnalysisXRef *>
*/
RZ_API RZ_OWN RzList *rz_analysis_xrefs_list(RzAnalysis *analysis) {
RZ_API RZ_OWN RzList /*<RzAnalysisXRef *>*/ *rz_analysis_xrefs_list(RzAnalysis *analysis) {
rz_return_val_if_fail(analysis, NULL);
RzList *list = rz_analysis_xref_list_new();
if (list) {
@ -294,12 +294,12 @@ static RzList *fcn_get_refs(RzAnalysisFunction *fcn, HtUP *ht) {
return list;
}
RZ_API RzList *rz_analysis_function_get_xrefs_from(RzAnalysisFunction *fcn) {
RZ_API RzList /*<RzAnalysisXRef *>*/ *rz_analysis_function_get_xrefs_from(RzAnalysisFunction *fcn) {
rz_return_val_if_fail(fcn, NULL);
return fcn_get_refs(fcn, fcn->analysis->ht_xrefs_from);
}
RZ_API RzList *rz_analysis_function_get_xrefs_to(RzAnalysisFunction *fcn) {
RZ_API RzList /*<RzAnalysisXRef *>*/ *rz_analysis_function_get_xrefs_to(RzAnalysisFunction *fcn) {
rz_return_val_if_fail(fcn, NULL);
return fcn_get_refs(fcn, fcn->analysis->ht_xrefs_to);
}

View file

@ -250,6 +250,6 @@ typedef struct sh_opcode_t {
RZ_IPI RZ_OWN SHOp *sh_disassembler(ut16 opcode);
RZ_IPI RZ_OWN char *sh_op_param_to_str(SHParam param, SHScaling scaling, ut64 pc);
RZ_IPI RZ_OWN char *sh_op_to_str(const SHOp *op, ut64 pc);
RZ_IPI RZ_OWN char *sh_op_to_str(RZ_NONNULL const SHOp *op, ut64 pc);
#endif /* RZ_SH_DISASSEMBLER_H */

View file

@ -1399,7 +1399,7 @@ static void add_token(RZ_OUT RzAsmTokenString *toks, const size_t i, const size_
* \return true Overlaps with token from token vector.
* \return false Does not overap with other token.
*/
static bool overlaps_with_token(RZ_BORROW RzVector /* RzAsmTokenString */ *toks, const size_t s, const size_t e) {
static bool overlaps_with_token(RZ_BORROW RzVector /*<RzAsmTokenString>*/ *toks, const size_t s, const size_t e) {
rz_return_val_if_fail(toks, false);
size_t x, y; // Other tokens start/end
RzAsmToken *it;
@ -1469,7 +1469,7 @@ static void check_token_coverage(RzAsmTokenString *toks) {
* \param patterns RzList<RzAsmTokenPattern> with the regex patterns describing each token type.
* \return RzAsmTokenString* The tokens.
*/
RZ_API RZ_OWN RzAsmTokenString *rz_asm_tokenize_asm_regex(RZ_BORROW RzStrBuf *asm_str, RzPVector /* RzAsmTokenPattern* */ *patterns) {
RZ_API RZ_OWN RzAsmTokenString *rz_asm_tokenize_asm_regex(RZ_BORROW RzStrBuf *asm_str, RzPVector /*<RzAsmTokenPattern *>*/ *patterns) {
rz_return_val_if_fail(asm_str && patterns, NULL);
const char *str = rz_strbuf_get(asm_str);

View file

@ -185,7 +185,7 @@ RZ_API RzBinFile *rz_bin_file_find_by_arch_bits(RzBin *bin, const char *arch, in
return binfile;
}
RZ_IPI RzBinFile *rz_bin_file_find_by_id(RzBin *bin, ut32 bf_id) {
RZ_API RzBinFile *rz_bin_file_find_by_id(RzBin *bin, ut32 bf_id) {
RzBinFile *bf;
RzListIter *iter;
rz_list_foreach (bin->binfiles, iter, bf) {
@ -408,7 +408,7 @@ static ut64 buf_compute_hashes(const ut8 *buf, ut64 size, void *user) {
* Return a list of RzBinFileHash structures with the hashes md5, sha1, sha256, crc32 and entropy
* computed over the whole \p bf .
*/
RZ_API RZ_OWN RzList *rz_bin_file_compute_hashes(RzBin *bin, RzBinFile *bf, ut64 limit) {
RZ_API RZ_OWN RzList /*<RzBinFileHash *>*/ *rz_bin_file_compute_hashes(RzBin *bin, RzBinFile *bf, ut64 limit) {
rz_return_val_if_fail(bin && bf && bf->o, NULL);
RzBinObject *o = bf->o;
RzList *file_hashes = NULL;
@ -485,7 +485,7 @@ rz_bin_file_compute_hashes_bad:
* \brief Set \p file_hashes on current RzBinInfo
* \return RzList of previous file_hashes
*/
RZ_API RZ_OWN RzList *rz_bin_file_set_hashes(RzBin *bin, RZ_OWN RzList /*<RzBinFileHash *>*/ *new_hashes) {
RZ_API RZ_OWN RzList /*<RzBinFileHash *>*/ *rz_bin_file_set_hashes(RzBin *bin, RZ_OWN RzList /*<RzBinFileHash *>*/ *new_hashes) {
rz_return_val_if_fail(bin && bin->cur && bin->cur->o && bin->cur->o->info, NULL);
RzBinFile *bf = bin->cur;
RzBinInfo *info = bf->o->info;
@ -561,7 +561,7 @@ RZ_API RzBinSymbol *rz_bin_file_add_method(RzBinFile *bf, const char *klass, con
return sym;
}
RZ_API RzList *rz_bin_file_get_trycatch(RzBinFile *bf) {
RZ_API RzList /*<RzBinTrycatch *>*/ *rz_bin_file_get_trycatch(RZ_NONNULL RzBinFile *bf) {
rz_return_val_if_fail(bf && bf->o && bf->o->plugin, NULL);
if (bf->o->plugin->trycatch) {
return bf->o->plugin->trycatch(bf);
@ -569,7 +569,7 @@ RZ_API RzList *rz_bin_file_get_trycatch(RzBinFile *bf) {
return NULL;
}
RZ_API RzList *rz_bin_file_get_symbols(RzBinFile *bf) {
RZ_API RzList /*<RzBinSymbol *>*/ *rz_bin_file_get_symbols(RzBinFile *bf) {
rz_return_val_if_fail(bf, NULL);
RzBinObject *o = bf->o;
return o ? (RzList *)rz_bin_object_get_symbols(o) : NULL;

View file

@ -322,7 +322,7 @@ static void scan_cfstring_table(RzBinFile *bf, HtUP *strings_db, RzList *results
*
* \return On success returns RzList pointer, otherwise NULL
*/
RZ_API RZ_OWN RzList *rz_bin_file_strings(RZ_NONNULL RzBinFile *bf, size_t min_length, bool raw_strings) {
RZ_API RZ_OWN RzList /*<RzBinString *>*/ *rz_bin_file_strings(RZ_NONNULL RzBinFile *bf, size_t min_length, bool raw_strings) {
rz_return_val_if_fail(bf, NULL);
HtUP *strings_db = NULL;

View file

@ -564,37 +564,37 @@ RZ_API void rz_bin_set_baddr(RzBin *bin, ut64 baddr) {
}
// XXX: those accessors are redundant
RZ_DEPRECATE RZ_API RzList *rz_bin_get_entries(RzBin *bin) {
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinAddr *>*/ *rz_bin_get_entries(RZ_NONNULL RzBin *bin) {
rz_return_val_if_fail(bin, NULL);
RzBinObject *o = rz_bin_cur_object(bin);
return o ? (RzList *)rz_bin_object_get_entries(o) : NULL;
}
RZ_DEPRECATE RZ_API RzList *rz_bin_get_fields(RzBin *bin) {
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinField *>*/ *rz_bin_get_fields(RZ_NONNULL RzBin *bin) {
rz_return_val_if_fail(bin, NULL);
RzBinObject *o = rz_bin_cur_object(bin);
return o ? (RzList *)rz_bin_object_get_fields(o) : NULL;
}
RZ_DEPRECATE RZ_API RzList *rz_bin_get_imports(RzBin *bin) {
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinImport *>*/ *rz_bin_get_imports(RZ_NONNULL RzBin *bin) {
rz_return_val_if_fail(bin, NULL);
RzBinObject *o = rz_bin_cur_object(bin);
return o ? (RzList *)rz_bin_object_get_imports(o) : NULL;
}
RZ_DEPRECATE RZ_API RzBinInfo *rz_bin_get_info(RzBin *bin) {
RZ_DEPRECATE RZ_API RZ_BORROW RzBinInfo *rz_bin_get_info(RzBin *bin) {
rz_return_val_if_fail(bin, NULL);
RzBinObject *o = rz_bin_cur_object(bin);
return o ? (RzBinInfo *)rz_bin_object_get_info(o) : NULL;
}
RZ_DEPRECATE RZ_API RzList *rz_bin_get_libs(RzBin *bin) {
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<char *>*/ *rz_bin_get_libs(RZ_NONNULL RzBin *bin) {
rz_return_val_if_fail(bin, NULL);
RzBinObject *o = rz_bin_cur_object(bin);
return o ? (RzList *)rz_bin_object_get_libs(o) : NULL;
}
RZ_DEPRECATE RZ_API RzList *rz_bin_get_sections(RzBin *bin) {
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinSection *>*/ *rz_bin_get_sections(RZ_NONNULL RzBin *bin) {
rz_return_val_if_fail(bin, NULL);
RzBinObject *o = rz_bin_cur_object(bin);
return o ? (RzList *)rz_bin_object_get_sections_all(o) : NULL;
@ -608,7 +608,7 @@ RZ_DEPRECATE RZ_API RzList *rz_bin_get_sections(RzBin *bin) {
* \param va When 0 the offset \p off is considered a physical address, otherwise a virtual address
* \return Pointer to a \p RzBinSection containing the address
*/
RZ_API RzBinSection *rz_bin_get_section_at(RzBinObject *o, ut64 off, int va) {
RZ_API RZ_BORROW RzBinSection *rz_bin_get_section_at(RzBinObject *o, ut64 off, int va) {
RzBinSection *section;
RzListIter *iter;
ut64 from, to;
@ -640,7 +640,7 @@ RZ_API RzBinSection *rz_bin_get_section_at(RzBinObject *o, ut64 off, int va) {
* \param va When false the offset \p off is considered a physical address, otherwise a virtual address
* \return Pointer to a \p RzBinMap containing the address
*/
RZ_API RzBinMap *rz_bin_object_get_map_at(RzBinObject *o, ut64 off, bool va) {
RZ_API RZ_BORROW RzBinMap *rz_bin_object_get_map_at(RZ_NONNULL RzBinObject *o, ut64 off, bool va) {
rz_return_val_if_fail(o, NULL);
RzBinMap *map;
@ -665,7 +665,7 @@ RZ_API RzBinMap *rz_bin_object_get_map_at(RzBinObject *o, ut64 off, bool va) {
* \param va When false the offset \p off is considered a physical address, otherwise a virtual address
* \return Vector of \p RzBinMap pointers
*/
RZ_API RZ_OWN RzPVector *rz_bin_object_get_maps_at(RzBinObject *o, ut64 off, bool va) {
RZ_API RZ_OWN RzPVector /*<RzBinMap *>*/ *rz_bin_object_get_maps_at(RzBinObject *o, ut64 off, bool va) {
rz_return_val_if_fail(o, NULL);
RzBinMap *map;
@ -687,25 +687,25 @@ RZ_API RZ_OWN RzPVector *rz_bin_object_get_maps_at(RzBinObject *o, ut64 off, boo
return res;
}
RZ_DEPRECATE RZ_API RzList *rz_bin_get_strings(RzBin *bin) {
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinString *>*/ *rz_bin_get_strings(RZ_NONNULL RzBin *bin) {
rz_return_val_if_fail(bin, NULL);
RzBinObject *o = rz_bin_cur_object(bin);
return o ? (RzList *)rz_bin_object_get_strings(o) : NULL;
}
RZ_DEPRECATE RZ_API RzList *rz_bin_get_symbols(RzBin *bin) {
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinSymbol *>*/ *rz_bin_get_symbols(RZ_NONNULL RzBin *bin) {
rz_return_val_if_fail(bin, NULL);
RzBinObject *o = rz_bin_cur_object(bin);
return o ? (RzList *)rz_bin_object_get_symbols(o) : NULL;
}
RZ_DEPRECATE RZ_API RzList *rz_bin_get_mem(RzBin *bin) {
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinMem *>*/ *rz_bin_get_mem(RZ_NONNULL RzBin *bin) {
rz_return_val_if_fail(bin, NULL);
RzBinObject *o = rz_bin_cur_object(bin);
return o ? (RzList *)rz_bin_object_get_mem(o) : NULL;
}
RZ_DEPRECATE RZ_API int rz_bin_is_static(RzBin *bin) {
RZ_DEPRECATE RZ_API int rz_bin_is_static(RZ_NONNULL RzBin *bin) {
rz_return_val_if_fail(bin, false);
RzBinObject *o = rz_bin_cur_object(bin);
return o ? rz_bin_object_is_static(o) : false;
@ -880,7 +880,7 @@ RZ_API RzBuffer *rz_bin_create(RzBin *bin, const char *p,
return plugin->create(bin, code, codelen, data, datalen, opt);
}
RZ_API RzList * /*<RzBinClass>*/ rz_bin_get_classes(RzBin *bin) {
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinClass *>*/ *rz_bin_get_classes(RZ_NONNULL RzBin *bin) {
rz_return_val_if_fail(bin, NULL);
RzBinObject *o = rz_bin_cur_object(bin);
return o ? o->classes : NULL;
@ -1037,7 +1037,7 @@ RZ_API void rz_bin_map_free(RzBinMap *map) {
* but if it is, plugins can use this function as their maps callback,
* which will generate mappings for sections.
* */
RZ_API RZ_OWN RzList *rz_bin_maps_of_file_sections(RZ_NONNULL RzBinFile *binfile) {
RZ_API RZ_OWN RzList /*<RzBinMap *>*/ *rz_bin_maps_of_file_sections(RZ_NONNULL RzBinFile *binfile) {
rz_return_val_if_fail(binfile, NULL);
if (!binfile->o || !binfile->o->plugin || !binfile->o->plugin->sections) {
return NULL;
@ -1081,7 +1081,7 @@ hcf:
* See also rz_bin_maps_of_file_sections() for the inverse, when no additional
* sections should be added.
* */
RZ_API RzList *rz_bin_sections_of_maps(RzList /*<RzBinMap>*/ *maps) {
RZ_API RzList /*<RzBinSection *>*/ *rz_bin_sections_of_maps(RzList /*<RzBinMap *>*/ *maps) {
rz_return_val_if_fail(maps, NULL);
RzList *ret = rz_list_newf((RzListFree)rz_bin_section_free);
if (!ret) {
@ -1148,7 +1148,7 @@ RZ_API RZ_OWN char *rz_bin_section_type_to_string(RzBin *bin, int type) {
* \param bin RzBin instance
* \param flag A flag field of the RzBinSection (differs between formats)
* */
RZ_API RZ_OWN RzList *rz_bin_section_flag_to_list(RzBin *bin, ut64 flag) {
RZ_API RZ_OWN RzList /*<char *>*/ *rz_bin_section_flag_to_list(RzBin *bin, ut64 flag) {
RzBinFile *a = rz_bin_cur(bin);
RzBinPlugin *plugin = rz_bin_file_cur_plugin(a);
if (plugin && plugin->section_flag_to_rzlist) {
@ -1194,7 +1194,7 @@ RZ_API void rz_bin_trycatch_free(RzBinTrycatch *tc) {
/**
* \brief Get a RzBinPlugin by name
*/
RZ_API const RzBinPlugin *rz_bin_plugin_get(RzBin *bin, const char *name) {
RZ_API const RzBinPlugin *rz_bin_plugin_get(RZ_NONNULL RzBin *bin, RZ_NONNULL const char *name) {
rz_return_val_if_fail(bin && name, NULL);
RzListIter *iter;
@ -1211,7 +1211,7 @@ RZ_API const RzBinPlugin *rz_bin_plugin_get(RzBin *bin, const char *name) {
/**
* \brief Get a RzBinXtrPlugin by name
*/
RZ_API const RzBinXtrPlugin *rz_bin_xtrplugin_get(RzBin *bin, const char *name) {
RZ_API const RzBinXtrPlugin *rz_bin_xtrplugin_get(RZ_NONNULL RzBin *bin, RZ_NONNULL const char *name) {
rz_return_val_if_fail(bin && name, NULL);
RzListIter *iter;

View file

@ -102,7 +102,7 @@ static int reloc_target_cmp(const void *a, const void *b) {
#undef CMP_CHECK
RZ_API RzBinRelocStorage *rz_bin_reloc_storage_new(RZ_OWN RzList *relocs) {
RZ_API RzBinRelocStorage *rz_bin_reloc_storage_new(RZ_OWN RzList /*<RzBinReloc *>*/ *relocs) {
RzBinRelocStorage *ret = RZ_NEW0(RzBinRelocStorage);
if (!ret) {
return NULL;
@ -707,7 +707,7 @@ RZ_API const RzBinAddr *rz_bin_object_get_special_symbol(RzBinObject *o, RzBinSp
/**
* \brief Get list of \p RzBinAddr representing the entry points of the binary object.
*/
RZ_API const RzList *rz_bin_object_get_entries(RzBinObject *obj) {
RZ_API const RzList /*<RzBinAddr *>*/ *rz_bin_object_get_entries(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
return obj->entries;
}
@ -715,7 +715,7 @@ RZ_API const RzList *rz_bin_object_get_entries(RzBinObject *obj) {
/**
* \brief Get list of \p RzBinField representing the fields of the binary object.
*/
RZ_API const RzList *rz_bin_object_get_fields(RzBinObject *obj) {
RZ_API const RzList /*<RzBinField *>*/ *rz_bin_object_get_fields(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
return obj->fields;
}
@ -723,7 +723,7 @@ RZ_API const RzList *rz_bin_object_get_fields(RzBinObject *obj) {
/**
* \brief Get list of \p RzBinImport representing the imports of the binary object.
*/
RZ_API const RzList *rz_bin_object_get_imports(RzBinObject *obj) {
RZ_API const RzList /*<RzBinImport *>*/ *rz_bin_object_get_imports(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
return obj->imports;
}
@ -731,7 +731,7 @@ RZ_API const RzList *rz_bin_object_get_imports(RzBinObject *obj) {
/**
* \brief Get the \p RzBinInfo of the binary object.
*/
RZ_API const RzBinInfo *rz_bin_object_get_info(RzBinObject *obj) {
RZ_API const RzBinInfo *rz_bin_object_get_info(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
return obj->info;
}
@ -739,7 +739,7 @@ RZ_API const RzBinInfo *rz_bin_object_get_info(RzBinObject *obj) {
/**
* \brief Get list of \p char* representing the libraries used by the binary object.
*/
RZ_API const RzList *rz_bin_object_get_libs(RzBinObject *obj) {
RZ_API const RzList /*<char *>*/ *rz_bin_object_get_libs(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
return obj->libs;
}
@ -747,7 +747,7 @@ RZ_API const RzList *rz_bin_object_get_libs(RzBinObject *obj) {
/**
* \brief Get list of \p RzBinSection representing both the sections and the segments of the binary object.
*/
RZ_API const RzList *rz_bin_object_get_sections_all(RzBinObject *obj) {
RZ_API const RzList /*<RzBinSection *>*/ *rz_bin_object_get_sections_all(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
return obj->sections;
}
@ -771,7 +771,7 @@ static RzList *get_sections_or_segment(RzBinObject *obj, bool is_segment) {
/**
* \brief Get list of \p RzBinSection representing only the sections of the binary object.
*/
RZ_API RzList *rz_bin_object_get_sections(RzBinObject *obj) {
RZ_API RZ_OWN RzList /*<RzBinSection *>*/ *rz_bin_object_get_sections(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
return get_sections_or_segment(obj, false);
}
@ -779,7 +779,7 @@ RZ_API RzList *rz_bin_object_get_sections(RzBinObject *obj) {
/**
* \brief Get list of \p RzBinSection representing only the segments of the binary object.
*/
RZ_API RzList *rz_bin_object_get_segments(RzBinObject *obj) {
RZ_API RZ_OWN RzList /*<RzBinSection *>*/ *rz_bin_object_get_segments(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
return get_sections_or_segment(obj, true);
}
@ -787,7 +787,7 @@ RZ_API RzList *rz_bin_object_get_segments(RzBinObject *obj) {
/**
* \brief Get list of \p RzBinClass representing the classes (e.g. C++ classes) defined in the binary object.
*/
RZ_API const RzList *rz_bin_object_get_classes(RzBinObject *obj) {
RZ_API const RzList /*<RzBinClass *>*/ *rz_bin_object_get_classes(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
return obj->classes;
}
@ -795,7 +795,7 @@ RZ_API const RzList *rz_bin_object_get_classes(RzBinObject *obj) {
/**
* \brief Get list of \p RzBinString representing the strings identified in the binary object.
*/
RZ_API const RzList *rz_bin_object_get_strings(RzBinObject *obj) {
RZ_API const RzList /*<RzBinString *>*/ *rz_bin_object_get_strings(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
if (!obj->strings) {
return NULL;
@ -806,7 +806,7 @@ RZ_API const RzList *rz_bin_object_get_strings(RzBinObject *obj) {
/**
* \brief Get list of \p RzBinMem representing the memory regions identified in the binary object.
*/
RZ_API const RzList *rz_bin_object_get_mem(RzBinObject *obj) {
RZ_API const RzList /*<RzBinMem *>*/ *rz_bin_object_get_mem(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
return obj->mem;
}
@ -814,7 +814,7 @@ RZ_API const RzList *rz_bin_object_get_mem(RzBinObject *obj) {
/**
* \brief Get list of \p RzBinSymbol representing the symbols in the binary object.
*/
RZ_API const RzList *rz_bin_object_get_symbols(RzBinObject *obj) {
RZ_API const RzList /*<RzBinSymbol *>*/ *rz_bin_object_get_symbols(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
return obj->symbols;
}
@ -822,7 +822,7 @@ RZ_API const RzList *rz_bin_object_get_symbols(RzBinObject *obj) {
/**
* \brief Get a list of \p RzBinResource representing the resources in the binary object.
*/
RZ_API const RzList *rz_bin_object_get_resources(RzBinObject *obj) {
RZ_API const RzList /*<RzBinResource *>*/ *rz_bin_object_get_resources(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
return obj->resources;
}
@ -830,7 +830,7 @@ RZ_API const RzList *rz_bin_object_get_resources(RzBinObject *obj) {
/**
* \brief Remove all previously identified strings in the binary object and scan it again for strings.
*/
RZ_API bool rz_bin_object_reset_strings(RzBin *bin, RzBinFile *bf, RzBinObject *obj) {
RZ_API bool rz_bin_object_reset_strings(RZ_NONNULL RzBin *bin, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(bin && bf && obj, false);
RZ_FREE_CUSTOM(obj->strings, rz_bin_string_database_free);
@ -872,7 +872,7 @@ RZ_API RZ_BORROW RzBinString *rz_bin_object_get_string_at(RZ_NONNULL RzBinObject
/**
* \brief Return true if the binary object \p obj is big endian.
*/
RZ_API bool rz_bin_object_is_big_endian(RzBinObject *obj) {
RZ_API bool rz_bin_object_is_big_endian(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, false);
return obj->info ? obj->info->big_endian : false;
}
@ -880,7 +880,7 @@ RZ_API bool rz_bin_object_is_big_endian(RzBinObject *obj) {
/**
* \brief Return true if the binary object \p obj is detected as statically compiled.
*/
RZ_API bool rz_bin_object_is_static(RzBinObject *obj) {
RZ_API bool rz_bin_object_is_static(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, false);
if (obj->libs && rz_list_length(obj->libs) > 0) {
return RZ_BIN_DBG_STATIC & obj->info->dbg_info;
@ -899,7 +899,7 @@ static void bin_section_map_fini(void *e, void *user) {
*
* \return A RzVector* with RzBinSectionMap structure inside.
**/
RZ_API RZ_OWN RzVector *rz_bin_object_sections_mapping_list(RzBinObject *obj) {
RZ_API RZ_OWN RzVector /*<RzBinSectionMap>*/ *rz_bin_object_sections_mapping_list(RZ_NONNULL RzBinObject *obj) {
rz_return_val_if_fail(obj, NULL);
const RzList *all = rz_bin_object_get_sections_all(obj);
@ -967,7 +967,7 @@ static ut64 map_p2v(RzBinMap *m, ut64 paddr) {
* \param paddr Offset in the file
* \return Converted offset to virtual address or UT64_MAX if the conversion cannot be done
*/
RZ_API ut64 rz_bin_object_p2v(RzBinObject *obj, ut64 paddr) {
RZ_API ut64 rz_bin_object_p2v(RZ_NONNULL RzBinObject *obj, ut64 paddr) {
rz_return_val_if_fail(obj, UT64_MAX);
RzBinMap *m = rz_bin_object_get_map_at(obj, paddr, false);
if (!m) {
@ -984,7 +984,7 @@ RZ_API ut64 rz_bin_object_p2v(RzBinObject *obj, ut64 paddr) {
* \param paddr Offset in the file
* \return Vector containing \p ut64 values of all possible virtual addresses
*/
RZ_API RzVector *rz_bin_object_p2v_all(RzBinObject *obj, ut64 paddr) {
RZ_API RzVector /*<ut64>*/ *rz_bin_object_p2v_all(RZ_NONNULL RzBinObject *obj, ut64 paddr) {
rz_return_val_if_fail(obj, NULL);
RzPVector *maps = rz_bin_object_get_maps_at(obj, paddr, false);
if (!maps) {
@ -1012,7 +1012,7 @@ RZ_API RzVector *rz_bin_object_p2v_all(RzBinObject *obj, ut64 paddr) {
* \param paddr Virtual address
* \return Converted virtual address to offset in the file or UT64_MAX if the conversion cannot be done
*/
RZ_API ut64 rz_bin_object_v2p(RzBinObject *obj, ut64 vaddr) {
RZ_API ut64 rz_bin_object_v2p(RZ_NONNULL RzBinObject *obj, ut64 vaddr) {
rz_return_val_if_fail(obj, UT64_MAX);
RzBinMap *m = rz_bin_object_get_map_at(obj, vaddr, true);
if (!m) {
@ -1033,7 +1033,7 @@ RZ_API ut64 rz_bin_object_v2p(RzBinObject *obj, ut64 vaddr) {
*
* \return On success returns a valid pointer, otherwise NULL
*/
RZ_API RZ_OWN RzBinStrDb *rz_bin_string_database_new(RZ_NULLABLE RzList /*<RzBinString *>*/ *list) {
RZ_API RZ_OWN RzBinStrDb *rz_bin_string_database_new(RZ_NULLABLE RZ_OWN RzList /*<RzBinString *>*/ *list) {
RzBinStrDb *db = RZ_NEW0(RzBinStrDb);
if (!db) {
RZ_LOG_ERROR("rz_bin: Cannot allocate RzBinStrDb\n");
@ -1073,7 +1073,7 @@ fail:
*
* \param db The string database to free
*/
RZ_IPI void rz_bin_string_database_free(RZ_NULLABLE RzBinStrDb *db) {
RZ_API void rz_bin_string_database_free(RZ_NULLABLE RzBinStrDb *db) {
if (!db) {
return;
}

View file

@ -191,7 +191,7 @@ RZ_API const RzBinSourceLineSample *rz_bin_source_line_info_get_next(const RzBin
return next;
}
RZ_API bool rz_bin_addr2line(RzBin *bin, ut64 addr, char *file, int len, int *line) {
RZ_DEPRECATE RZ_API bool rz_bin_addr2line(RzBin *bin, ut64 addr, char *file, int len, int *line) {
rz_return_val_if_fail(bin, false);
if (!bin->cur || !bin->cur->o || !bin->cur->o->lines) {
return false;
@ -214,7 +214,7 @@ RZ_API bool rz_bin_addr2line(RzBin *bin, ut64 addr, char *file, int len, int *li
return false;
}
RZ_API char *rz_bin_addr2text(RzBin *bin, ut64 addr, int origin) {
RZ_DEPRECATE RZ_API char *rz_bin_addr2text(RzBin *bin, ut64 addr, int origin) {
rz_return_val_if_fail(bin, NULL);
if (!bin->cur || !bin->cur->o || !bin->cur->o->lines) {
return NULL;

View file

@ -1111,7 +1111,7 @@ RZ_API void rz_bin_dwarf_arange_set_free(RzBinDwarfARangeSet *set) {
free(set);
}
static RzList /*<RzBinDwarfARangeSet>*/ *parse_aranges_raw(const ut8 *obuf, size_t obuf_sz, bool big_endian) {
static RzList /*<RzBinDwarfARangeSet *>*/ *parse_aranges_raw(const ut8 *obuf, size_t obuf_sz, bool big_endian) {
rz_return_val_if_fail(obuf, NULL);
const ut8 *buf = obuf;
const ut8 *buf_end = buf + obuf_sz;
@ -2129,7 +2129,7 @@ RZ_API RzBinDwarfLineInfo *rz_bin_dwarf_parse_line(RzBinFile *binfile, RZ_NULLAB
return r;
}
RZ_API RzList /*<RzBinDwarfARangeSet>*/ *rz_bin_dwarf_parse_aranges(RzBinFile *binfile) {
RZ_API RzList /*<RzBinDwarfARangeSet *>*/ *rz_bin_dwarf_parse_aranges(RzBinFile *binfile) {
rz_return_val_if_fail(binfile, NULL);
size_t len;
ut8 *buf = get_section_bytes(binfile, "debug_aranges", &len);
@ -2256,7 +2256,7 @@ static HtUP *parse_loc_raw(HtUP /*<offset, List *<LocListEntry>*/ *loc_table, co
* @param addr_size machine address size used in executable (necessary for parsing)
* @return RZ_API*
*/
RZ_API HtUP /*<offset, RzBinDwarfLocList*/ *rz_bin_dwarf_parse_loc(RzBinFile *binfile, int addr_size) {
RZ_API HtUP /*<offset, RzBinDwarfLocList *>*/ *rz_bin_dwarf_parse_loc(RzBinFile *binfile, int addr_size) {
rz_return_val_if_fail(binfile, NULL);
/* The standarparse_loc_raw_frame, not sure why is that */
size_t len = 0;
@ -2280,7 +2280,7 @@ static void free_loc_table_entry(HtUPKv *kv) {
}
}
RZ_API void rz_bin_dwarf_loc_free(HtUP /*<offset, RzBinDwarfLocList*>*/ *loc_table) {
RZ_API void rz_bin_dwarf_loc_free(HtUP /*<offset, RzBinDwarfLocList *>*/ *loc_table) {
rz_return_if_fail(loc_table);
loc_table->opt.freefn = free_loc_table_entry;
ht_up_free(loc_table);

View file

@ -125,7 +125,7 @@ RZ_API void rz_bin_filter_sym(RzBinFile *bf, HtPP *ht, ut64 vaddr, RzBinSymbol *
}
}
RZ_API void rz_bin_filter_symbols(RzBinFile *bf, RzList *list) {
RZ_API void rz_bin_filter_symbols(RzBinFile *bf, RzList /*<RzBinSymbol *>*/ *list) {
HtPP *ht = ht_pp_new0();
if (!ht) {
return;
@ -141,7 +141,7 @@ RZ_API void rz_bin_filter_symbols(RzBinFile *bf, RzList *list) {
ht_pp_free(ht);
}
RZ_API void rz_bin_filter_sections(RzBinFile *bf, RzList *list) {
RZ_API void rz_bin_filter_sections(RzBinFile *bf, RzList /*<RzBinSection *>*/ *list) {
RzBinSection *sec;
HtPU *db = ht_pu_new0();
RzListIter *iter;

View file

@ -707,7 +707,7 @@ RZ_API RZ_OWN RzBinDex *rz_bin_dex_new(RZ_NONNULL RzBuffer *buf, ut64 base, RZ_N
return dex;
}
RZ_API char *rz_bin_dex_access_flags_readable(ut32 access_flags) {
RZ_API RZ_OWN char *rz_bin_dex_access_flags_readable(ut32 access_flags) {
RzStrBuf *sb = NULL;
for (ut32 i = 0; i < CLASS_ACCESS_FLAGS_SIZE; ++i) {
const DexAccessFlagsReadable *afr = &access_flags_list[i];
@ -732,7 +732,7 @@ RZ_API char *rz_bin_dex_access_flags_readable(ut32 access_flags) {
/**
* \brief Returns a RzList<RzBinString*> containing the dex strings
*/
RZ_API RZ_OWN RzList /*<RzBinString*>*/ *rz_bin_dex_strings(RZ_NONNULL RzBinDex *dex) {
RZ_API RZ_OWN RzList /*<RzBinString *>*/ *rz_bin_dex_strings(RZ_NONNULL RzBinDex *dex) {
rz_return_val_if_fail(dex, NULL);
DexString *string;
@ -936,7 +936,7 @@ static RzBinSymbol *dex_method_to_symbol(RzBinDex *dex, DexEncodedMethod *encode
return symbol;
}
static RzList /*<RzBinSymbol*>*/ *dex_resolve_methods_in_class(RzBinDex *dex, DexClassDef *class_def, ut8 *inserted) {
static RzList /*<RzBinSymbol *>*/ *dex_resolve_methods_in_class(RzBinDex *dex, DexClassDef *class_def, ut8 *inserted) {
RzList *methods = rz_list_newf((RzListFree)rz_bin_symbol_free);
if (!methods) {
return NULL;
@ -1005,7 +1005,7 @@ static RzBinField *dex_field_to_bin_field(RzBinDex *dex, DexEncodedField *encode
return field;
}
static RzList /*<RzBinField*>*/ *dex_resolve_fields_in_class(RzBinDex *dex, DexClassDef *class_def, ut8 *inserted) {
static RzList /*<RzBinField *>*/ *dex_resolve_fields_in_class(RzBinDex *dex, DexClassDef *class_def, ut8 *inserted) {
RzList *fields = rz_list_newf((RzListFree)rz_bin_field_free);
if (!fields) {
return NULL;
@ -1072,7 +1072,7 @@ static RzBinSymbol *dex_field_to_symbol(RzBinDex *dex, DexEncodedField *encoded_
return field;
}
static RzList /*<RzBinSymbol*>*/ *dex_resolve_fields_in_class_as_symbols(RzBinDex *dex, DexClassDef *class_def, ut8 *inserted) {
static RzList /*<RzBinSymbol *>*/ *dex_resolve_fields_in_class_as_symbols(RzBinDex *dex, DexClassDef *class_def, ut8 *inserted) {
RzList *fields = rz_list_newf((RzListFree)rz_bin_symbol_free);
if (!fields) {
return NULL;
@ -1128,7 +1128,7 @@ static void free_rz_bin_class(RzBinClass *bclass) {
/**
* \brief Returns a RzList<RzBinClass*> containing the dex classes
*/
RZ_API RZ_OWN RzList /*<RzBinClass*>*/ *rz_bin_dex_classes(RZ_NONNULL RzBinDex *dex) {
RZ_API RZ_OWN RzList /*<RzBinClass *>*/ *rz_bin_dex_classes(RZ_NONNULL RzBinDex *dex) {
rz_return_val_if_fail(dex, NULL);
DexClassDef *class_def;
@ -1197,7 +1197,7 @@ static RzBinSection *section_new(const char *name, ut32 perm, ut32 size, ut64 pa
/**
* \brief Returns a RzList<RzBinSection*> containing the dex sections
*/
RZ_API RZ_OWN RzList /*<RzBinSection*>*/ *rz_bin_dex_sections(RZ_NONNULL RzBinDex *dex) {
RZ_API RZ_OWN RzList /*<RzBinSection *>*/ *rz_bin_dex_sections(RZ_NONNULL RzBinDex *dex) {
rz_return_val_if_fail(dex, NULL);
RzBinSection *section;
@ -1229,7 +1229,7 @@ RZ_API RZ_OWN RzList /*<RzBinSection*>*/ *rz_bin_dex_sections(RZ_NONNULL RzBinDe
/**
* \brief Returns a RzList<RzBinField*> containing the dex fields
*/
RZ_API RZ_OWN RzList /*<RzBinField*>*/ *rz_bin_dex_fields(RZ_NONNULL RzBinDex *dex) {
RZ_API RZ_OWN RzList /*<RzBinField *>*/ *rz_bin_dex_fields(RZ_NONNULL RzBinDex *dex) {
rz_return_val_if_fail(dex, NULL);
DexClassDef *class_def;
@ -1264,7 +1264,7 @@ RZ_API RZ_OWN RzList /*<RzBinField*>*/ *rz_bin_dex_fields(RZ_NONNULL RzBinDex *d
/**
* \brief Returns a RzList<RzBinSymbol*> containing the dex symbols
*/
RZ_API RZ_OWN RzList /*<RzBinSymbol*>*/ *rz_bin_dex_symbols(RZ_NONNULL RzBinDex *dex) {
RZ_API RZ_OWN RzList /*<RzBinSymbol *>*/ *rz_bin_dex_symbols(RZ_NONNULL RzBinDex *dex) {
rz_return_val_if_fail(dex, NULL);
DexClassDef *class_def;
@ -1376,7 +1376,7 @@ RZ_API RZ_OWN RzList /*<RzBinSymbol*>*/ *rz_bin_dex_symbols(RZ_NONNULL RzBinDex
/**
* \brief Returns a RzList<RzBinImport*> containing the dex imports
*/
RZ_API RZ_OWN RzList /*<RzBinImport*>*/ *rz_bin_dex_imports(RZ_NONNULL RzBinDex *dex) {
RZ_API RZ_OWN RzList /*<RzBinImport *>*/ *rz_bin_dex_imports(RZ_NONNULL RzBinDex *dex) {
rz_return_val_if_fail(dex, NULL);
DexFieldId *field_id;
@ -1517,7 +1517,7 @@ static int compare_strings(const void *a, const void *b) {
/**
* \brief Returns a RzList<char*> containing the dex libraries
*/
RZ_API RZ_OWN RzList /*<char*>*/ *rz_bin_dex_libraries(RZ_NONNULL RzBinDex *dex) {
RZ_API RZ_OWN RzList /*<char *>*/ *rz_bin_dex_libraries(RZ_NONNULL RzBinDex *dex) {
rz_return_val_if_fail(dex, NULL);
DexMethodId *method_id;
@ -1690,7 +1690,7 @@ RZ_API RZ_OWN RzBinAddr *rz_bin_dex_resolve_symbol(RZ_NONNULL RzBinDex *dex, RzB
return ret;
}
static RzList /*<RzBinAddr*>*/ *dex_resolve_entrypoints_in_class(RzBinDex *dex, DexClassDef *class_def) {
static RzList /*<RzBinAddr *>*/ *dex_resolve_entrypoints_in_class(RzBinDex *dex, DexClassDef *class_def) {
RzListIter *it;
DexEncodedMethod *encoded_method = NULL;
RzList *entrypoints = NULL;
@ -1789,7 +1789,7 @@ static RzList /*<RzBinAddr*>*/ *dex_resolve_entrypoints_in_class(RzBinDex *dex,
/**
* \brief Returns a RzList<RzBinAddr*> containing the dex entripoints
*/
RZ_API RZ_OWN RzList /*<RzBinAddr*>*/ *rz_bin_dex_entrypoints(RZ_NONNULL RzBinDex *dex) {
RZ_API RZ_OWN RzList /*<RzBinAddr *>*/ *rz_bin_dex_entrypoints(RZ_NONNULL RzBinDex *dex) {
rz_return_val_if_fail(dex, NULL);
DexClassDef *class_def;

View file

@ -207,15 +207,15 @@ RZ_API void rz_bin_dex_free(RZ_NULLABLE RzBinDex *dex);
RZ_API RZ_OWN char *rz_bin_dex_version(RZ_NONNULL RzBinDex *dex);
RZ_API ut64 rz_bin_dex_debug_info(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<RzBinString*>*/ *rz_bin_dex_strings(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<RzBinClass*>*/ *rz_bin_dex_classes(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<RzBinField*>*/ *rz_bin_dex_fields(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<RzBinSection*>*/ *rz_bin_dex_sections(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<RzBinSymbol*>*/ *rz_bin_dex_symbols(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<RzBinSymbol*>*/ *rz_bin_dex_imports(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<char*>*/ *rz_bin_dex_libraries(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<RzBinString *>*/ *rz_bin_dex_strings(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<RzBinClass *>*/ *rz_bin_dex_classes(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<RzBinField *>*/ *rz_bin_dex_fields(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<RzBinSection *>*/ *rz_bin_dex_sections(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<RzBinSymbol *>*/ *rz_bin_dex_symbols(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<RzBinImport *>*/ *rz_bin_dex_imports(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<char *>*/ *rz_bin_dex_libraries(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzBinAddr *rz_bin_dex_resolve_symbol(RZ_NONNULL RzBinDex *dex, RzBinSpecialSymbol resolve);
RZ_API RZ_OWN RzList /*<RzBinAddr*>*/ *rz_bin_dex_entrypoints(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN RzList /*<RzBinAddr *>*/ *rz_bin_dex_entrypoints(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_BORROW RzBuffer *rz_bin_dex_relocations(RZ_NONNULL RzBinDex *dex);
RZ_API RZ_OWN char *rz_bin_dex_resolve_method_by_idx(RZ_NONNULL RzBinDex *dex, ut32 method_idx);

View file

@ -231,7 +231,7 @@ ut64 Elf_(rz_bin_elf_v2p)(RZ_NONNULL ELFOBJ *bin, ut64 vaddr);
bool Elf_(rz_bin_elf_is_arm_binary_supporting_thumb)(RZ_NONNULL ELFOBJ *bin);
bool Elf_(rz_bin_elf_is_thumb_addr)(ut64 addr);
void Elf_(rz_bin_elf_fix_arm_thumb_addr)(ut64 *addr);
void Elf_(rz_bin_elf_fix_arm_thumb_object)(ut64 *paddr, ut64 *vaddr, int *bits);
void Elf_(rz_bin_elf_fix_arm_thumb_object)(RZ_NONNULL ut64 *paddr, RZ_NONNULL ut64 *vaddr, RZ_NONNULL int *bits);
void Elf_(rz_bin_elf_fix_arm_thumb_symbol)(RZ_NONNULL RzBinSymbol *symbol);
// elf_corefile.c

View file

@ -375,7 +375,7 @@ RZ_API ut64 rz_bin_java_class_debug_info(RZ_NONNULL RzBinJavaClass *bin) {
return RZ_BIN_DBG_SYMS;
}
RZ_API RZ_OWN const char *rz_bin_java_class_language(RZ_NONNULL RzBinJavaClass *bin) {
RZ_API RZ_BORROW const char *rz_bin_java_class_language(RZ_NONNULL RzBinJavaClass *bin) {
rz_return_val_if_fail(bin, NULL);
const char *language = "java";
char *string = NULL;
@ -463,7 +463,7 @@ RZ_API RZ_OWN char *rz_bin_java_class_name(RZ_NONNULL RzBinJavaClass *bin) {
/**
* \brief Returns the class super name
*/
RZ_OWN RZ_OWN char *rz_bin_java_class_super(RZ_NONNULL RzBinJavaClass *bin) {
RZ_API RZ_OWN char *rz_bin_java_class_super(RZ_NONNULL RzBinJavaClass *bin) {
ut16 index;
rz_return_val_if_fail(bin, NULL);
const ConstPool *cpool = java_class_constant_pool_at(bin, bin->super_class);

View file

@ -60,7 +60,7 @@ static void rz_coresym_cache_element_line_info_fini(RzCoreSymCacheElementLineInf
}
}
void rz_coresym_cache_element_free(RzCoreSymCacheElement *element) {
RZ_API void rz_coresym_cache_element_free(RzCoreSymCacheElement *element) {
if (!element) {
return;
}
@ -101,7 +101,7 @@ void rz_coresym_cache_element_free(RzCoreSymCacheElement *element) {
free(element);
}
ut64 rz_coresym_cache_element_pa2va(RzCoreSymCacheElement *element, ut64 pa) {
RZ_API ut64 rz_coresym_cache_element_pa2va(RzCoreSymCacheElement *element, ut64 pa) {
size_t i;
for (i = 0; i < element->hdr->n_segments; i++) {
RzCoreSymCacheElementSegment *seg = &element->segments[i];
@ -136,7 +136,7 @@ static char *str_dup_safe_fixed(const ut8 *b, const ut8 *str, ut64 len, const ut
return NULL;
}
RzCoreSymCacheElement *rz_coresym_cache_element_new(RzBinFile *bf, RzBuffer *buf, ut64 off, int bits, char *file_name) {
RZ_API RzCoreSymCacheElement *rz_coresym_cache_element_new(RzBinFile *bf, RzBuffer *buf, ut64 off, int bits, RZ_OWN char *file_name) {
RzCoreSymCacheElement *result = NULL;
ut8 *b = NULL;
RzCoreSymCacheElementHdr *hdr = rz_coresym_cache_element_header_new(buf, off, bits);

View file

@ -244,7 +244,7 @@ static cache_accel_t *read_cache_accel(RzBuffer *cache_buf, cache_hdr_t *hdr, ca
return accel;
}
objc_cache_opt_info *rz_dyldcache_get_objc_opt_info(RzBinFile *bf, RzDyldCache *cache) {
RZ_API objc_cache_opt_info *rz_dyldcache_get_objc_opt_info(RzBinFile *bf, RzDyldCache *cache) {
objc_cache_opt_info *result = NULL;
RzListIter *iter;
RzDyldBinImage *bin;

View file

@ -1124,7 +1124,7 @@ static mach0_ut get_isa_value(void) {
return 0;
}
void MACH0_(get_class_t)(mach0_ut p, RzBinFile *bf, RzBuffer *buf, RzBinClass *klass, bool dupe, RzSkipList *relocs, objc_cache_opt_info *oi) {
RZ_API void MACH0_(get_class_t)(mach0_ut p, RzBinFile *bf, RzBuffer *buf, RzBinClass *klass, bool dupe, RzSkipList *relocs, objc_cache_opt_info *oi) {
struct MACH0_(SClass) c = { 0 };
const int size = sizeof(struct MACH0_(SClass));
mach0_ut r = 0;
@ -1240,7 +1240,7 @@ static RzList *parse_swift_classes(RzBinFile *bf) {
}
#endif
RzList *MACH0_(parse_classes)(RzBinFile *bf, objc_cache_opt_info *oi) {
RZ_API RzList *MACH0_(parse_classes)(RzBinFile *bf, objc_cache_opt_info *oi) {
RzList /*<RzBinClass>*/ *ret = NULL;
ut64 num_of_unnamed_class = 0;
RzBinClass *klass = NULL;
@ -1442,7 +1442,7 @@ error:
return NULL;
}
void MACH0_(get_category_t)(mach0_ut p, RzBinFile *bf, RzBuffer *buf, RzBinClass *klass, RzSkipList *relocs, objc_cache_opt_info *oi) {
RZ_API void MACH0_(get_category_t)(mach0_ut p, RzBinFile *bf, RzBuffer *buf, RzBinClass *klass, RzSkipList *relocs, objc_cache_opt_info *oi) {
rz_return_if_fail(bf && bf->o && bf->o->info);
struct MACH0_(SCategory) c = { 0 };

View file

@ -65,7 +65,7 @@ static void rz_cf_value_bool_print(RCFValueBool *bool_value);
static void rz_cf_value_free(RCFValue *value);
RCFValueDict *rz_cf_value_dict_parse(RzBuffer *file_buf, ut64 offset, ut64 size, int options) {
RZ_API RCFValueDict *rz_cf_value_dict_parse(RzBuffer *file_buf, ut64 offset, ut64 size, int options) {
RCFValueDict *result = NULL;
yxml_t x;
int i, depth = 0;
@ -349,7 +349,7 @@ static RCFValueDict *rz_cf_value_dict_new(void) {
return dict;
}
void rz_cf_value_dict_free(RCFValueDict *dict) {
RZ_API void rz_cf_value_dict_free(RCFValueDict *dict) {
rz_return_if_fail(dict);
if (dict->pairs) {
@ -610,7 +610,7 @@ static void rz_cf_value_free(RCFValue *value) {
}
}
void rz_cf_value_print(RCFValue *value) {
RZ_API void rz_cf_value_print(RCFValue *value) {
if (!value) {
return;
}

View file

@ -11,7 +11,6 @@
RZ_IPI RzBinFile *rz_bin_file_new(RzBin *bin, const char *file, ut64 file_sz, int fd, const char *xtrname, bool steal_ptr);
RZ_IPI RzBinObject *rz_bin_file_object_find_by_id(RzBinFile *binfile, ut32 binobj_id);
RZ_IPI RzBinFile *rz_bin_file_find_by_object_id(RzBin *bin, ut32 binobj_id);
RZ_IPI RzBinFile *rz_bin_file_find_by_id(RzBin *bin, ut32 binfile_id);
RZ_IPI bool rz_bin_file_set_obj(RzBin *bin, RzBinFile *bf, RzBinObject *obj);
RZ_IPI RzBinFile *rz_bin_file_xtr_load_bytes(RzBin *bin, RzBinXtrPlugin *xtr, const char *filename, const ut8 *bytes, ut64 sz, ut64 file_sz, ut64 baseaddr, ut64 loadaddr, int idx, int fd);
RZ_IPI bool rz_bin_file_set_bytes(RzBinFile *binfile, const ut8 *bytes, ut64 sz, bool steal_ptr);
@ -22,8 +21,6 @@ RZ_IPI RzBinPlugin *rz_bin_get_binplugin_by_name(RzBin *bin, const char *name);
RZ_IPI RzBinPlugin *rz_bin_get_binplugin_by_filename(RzBin *bin);
RZ_IPI RZ_OWN char *rz_bin_file_golang_compiler(RZ_NONNULL RzBinFile *binfile);
RZ_IPI void rz_bin_section_free(RzBinSection *bs);
RZ_IPI void rz_bin_object_free(RzBinObject *o);
RZ_IPI ut64 rz_bin_object_get_baddr(RzBinObject *o);
RZ_IPI RzBinObject *rz_bin_object_new(RzBinFile *binfile, RzBinPlugin *plugin, RzBinObjectLoadOptions *opts, ut64 offset, ut64 sz);

View file

@ -86,7 +86,7 @@ static int binary_search(unsigned int *A, int key, int imin, int imax) {
* \param address Where to remap
* \return int
*/
RZ_API int rz_bin_pdb_omap_remap(RzPdbOmapStream *omap_stream, int address) {
RZ_API int rz_bin_pdb_omap_remap(RZ_NONNULL RzPdbOmapStream *omap_stream, int address) {
OmapEntry *omap_entry = 0;
RzListIter *it = 0;
int i = 0;

View file

@ -5,7 +5,7 @@
#include <ht_uu.h>
/// Finm a suitable location for putting the artificial reloc targets map
RZ_API ut64 rz_bin_relocs_patch_find_targets_map_base(RzList /*<RzBinMap>*/ *maps, ut64 target_sz) {
RZ_API ut64 rz_bin_relocs_patch_find_targets_map_base(RzList /*<RzBinMap *>*/ *maps, ut64 target_sz) {
// find the lowest unmapped address
ut64 max = 0;
if (maps) {
@ -83,7 +83,7 @@ RZ_API ut64 rz_bin_reloc_target_builder_get_target(RzBinRelocTargetBuilder *buil
* \param buf_patched_offset the offset of the data in buf_patched inside the real file.
* This is especially relevant for fatmach0 where the buf starts further into the fat file.
*/
RZ_API void rz_bin_relocs_patch_maps(RZ_NONNULL RzList /* <RzBinMap> */ *maps,
RZ_API void rz_bin_relocs_patch_maps(RZ_NONNULL RzList /*<RzBinMap *>*/ *maps,
RZ_NULLABLE RzBuffer *buf_patched, ut64 buf_patched_offset,
ut64 target_vfile_base, ut64 target_vfile_size,
RZ_NONNULL const char *vfile_name_patched, RZ_NONNULL const char *vfile_name_reloc_targets) {

View file

@ -416,7 +416,7 @@ RZ_API void rz_config_node_value_format_i(char *buf, size_t buf_size, const ut64
* Writes the integer \p value in the config variable of \p name only and only if
* the variable is integer.
*/
RZ_API RzConfigNode *rz_config_set_i(RzConfig *cfg, const char *name, const ut64 i) {
RZ_API RzConfigNode *rz_config_set_i(RzConfig *cfg, RZ_NONNULL const char *name, const ut64 i) {
char buf[128], *ov = NULL;
rz_return_val_if_fail(cfg && name, NULL);
RzConfigNode *node = rz_config_node_get(cfg, name);

View file

@ -824,7 +824,7 @@ RZ_API const char *rz_cons_get_buffer(void) {
/**
* \brief Return a newly allocated buffer containing what's currently in RzCons buffer
*/
RZ_API char *rz_cons_get_buffer_dup(void) {
RZ_API RZ_OWN char *rz_cons_get_buffer_dup(void) {
const char *s = rz_cons_get_buffer();
return s ? strdup(s) : NULL;
}

View file

@ -494,7 +494,7 @@ RZ_API int rz_line_hist_load(RZ_NONNULL const char *path) {
* will be saved
* \return false(0) if it fails, true(!0) otherwise
*/
RZ_API int rz_line_hist_save(const char *path) {
RZ_API int rz_line_hist_save(RZ_NONNULL const char *path) {
FILE *fd;
int i, ret = false;
if (RZ_STR_ISEMPTY(path)) {

View file

@ -4913,7 +4913,7 @@ RZ_API int rz_core_visual_graph(RzCore *core, RzAGraph *g, RzAnalysisFunction *_
* @param graph <RzGraphNodeInfo>
* @return RzAGraph* NULL if failure
*/
RZ_API RzAGraph *create_agraph_from_graph(const RzGraph /*<RzGraphNodeInfo>*/ *graph) {
RZ_API RzAGraph *create_agraph_from_graph(const RzGraph /*<RzGraphNodeInfo *>*/ *graph) {
rz_return_val_if_fail(graph, NULL);
RzAGraph *result_agraph = rz_agraph_new(rz_cons_canvas_new(1, 1));

View file

@ -2384,7 +2384,7 @@ static void add_single_addr_xrefs(RzCore *core, ut64 addr, RzGraph *graph) {
rz_list_free(list);
}
RZ_API RzGraph *rz_core_analysis_importxrefs(RzCore *core) {
RZ_API RzGraph /*<RzGraphNodeInfo *>*/ *rz_core_analysis_importxrefs(RzCore *core) {
RzBinObject *obj = rz_bin_cur_object(core->bin);
bool va = core->io->va || core->bin->is_debugger;
@ -2409,7 +2409,7 @@ RZ_API RzGraph *rz_core_analysis_importxrefs(RzCore *core) {
return graph;
}
RZ_API RzGraph *rz_core_analysis_codexrefs(RzCore *core, ut64 addr) {
RZ_API RzGraph /*<RzGraphNodeInfo *>*/ *rz_core_analysis_codexrefs(RzCore *core, ut64 addr) {
RzGraph *graph = rz_graph_new();
if (!graph) {
return NULL;
@ -2660,7 +2660,7 @@ RZ_API char *rz_core_analysis_fcn_name(RzCore *core, RzAnalysisFunction *fcn) {
}
// for a given function returns an RzList of all functions that were called in it
RZ_API RzList *rz_core_analysis_fcn_get_calls(RzCore *core, RzAnalysisFunction *fcn) {
RZ_API RzList /*<RzAnalysisXRef *>*/ *rz_core_analysis_fcn_get_calls(RzCore *core, RzAnalysisFunction *fcn) {
RzAnalysisXRef *xrefi;
RzListIter *iter, *iter2;
@ -2892,7 +2892,7 @@ static RzList *analysis_graph_to(RzCore *core, ut64 addr, int depth, HtUP *avoid
return NULL;
}
RZ_API RzList *rz_core_analysis_graph_to(RzCore *core, ut64 addr, int n) {
RZ_API RzList /*<RzAnalysisBlock *>*/ *rz_core_analysis_graph_to(RzCore *core, ut64 addr, int n) {
int depth = rz_config_get_i(core->config, "analysis.graph_depth");
RzList *path, *paths = rz_list_new();
HtUP *avoid = ht_up_new0();
@ -3844,7 +3844,7 @@ RZ_API ut64 rz_core_analysis_stats_get_block_to(RZ_NONNULL const RzCoreAnalysisS
return rz_core_analysis_stats_get_block_from(s, i + 1) - 1;
}
RZ_API RzList *rz_core_analysis_cycles(RzCore *core, int ccl) {
RZ_API RzList /*<RzAnalysisCycleHook *>*/ *rz_core_analysis_cycles(RzCore *core, int ccl) {
ut64 addr = core->offset;
int depth = 0;
RzAnalysisOp *op = NULL;
@ -5991,7 +5991,7 @@ static void analysis_sigdb_add(RzSigDb *sigs, const char *path, bool with_detail
* \param[in] with_details The reads the signature details and sets them in RzSigDBEntry
* \return On success a RzList containing RzSigDBEntry entries, otherwise NULL.
*/
RZ_API RZ_OWN RzList *rz_core_analysis_sigdb_list(RZ_NONNULL RzCore *core, bool with_details) {
RZ_API RZ_OWN RzList /*<RzSigDBEntry *>*/ *rz_core_analysis_sigdb_list(RZ_NONNULL RzCore *core, bool with_details) {
rz_return_val_if_fail(core, NULL);
RzSigDb *sigs = rz_sign_sigdb_new();
@ -6814,7 +6814,7 @@ RZ_API void rz_analysis_bytes_free(RZ_NULLABLE void *ptr) {
* \param nops analysis n ops
* \return list of RzAnalysisBytes
*/
RZ_API RZ_OWN RzPVector *rz_core_analysis_bytes(RZ_NONNULL RzCore *core, RZ_NONNULL const ut8 *buf, int len, int nops) {
RZ_API RZ_OWN RzPVector /*<RzAnalysisBytes *>*/ *rz_core_analysis_bytes(RZ_NONNULL RzCore *core, RZ_NONNULL const ut8 *buf, int len, int nops) {
rz_return_val_if_fail(core && buf, NULL);
RzPVector *vec = rz_pvector_new(rz_analysis_bytes_free);
if (!vec) {

View file

@ -142,7 +142,7 @@ static void print_offset_in_binary_line_bar(RzAnnotatedCode *code, ut64 offset,
rz_cons_printf(" |");
}
RZ_API void rz_core_annotated_code_print(RzAnnotatedCode *code, RzVector *line_offsets) {
RZ_API void rz_core_annotated_code_print(RzAnnotatedCode *code, RzVector /*<ut64>*/ *line_offsets) {
if (code->annotations.len == 0) {
rz_cons_printf("%s\n", code->code);
return;

View file

@ -10,7 +10,7 @@
*
* Warning: this function contains hacks. Rewrite it before using it in new code.
*/
RZ_API RZ_DEPRECATE ut64 rz_core_arg_get(RzCore *core, const char *cc, int num) {
RZ_DEPRECATE RZ_API ut64 rz_core_arg_get(RzCore *core, const char *cc, int num) {
rz_return_val_if_fail(core, UT64_MAX);
if (!cc) {
cc = rz_analysis_syscc_default(core->analysis);
@ -52,7 +52,7 @@ RZ_API RZ_DEPRECATE ut64 rz_core_arg_get(RzCore *core, const char *cc, int num)
*
* Warning: this function contains hacks. Rewrite it before using it in new code.
*/
RZ_API RZ_DEPRECATE bool rz_core_arg_set(RzCore *core, const char *cc, int num, ut64 val) {
RZ_DEPRECATE RZ_API bool rz_core_arg_set(RzCore *core, const char *cc, int num, ut64 val) {
rz_return_val_if_fail(core, false);
if (!RZ_STR_ISEMPTY(cc)) {
cc = rz_analysis_syscc_default(core->analysis);
@ -273,8 +273,7 @@ static void rz_analysis_fcn_arg_free(RzAnalysisFuncArg *arg) {
free(arg);
}
/* Returns a list of RzAnalysisFuncArg */
RZ_API RZ_OWN RzList *rz_core_get_func_args(RzCore *core, const char *fcn_name) {
RZ_API RZ_OWN RzList /*<RzAnalysisFuncArg *>*/ *rz_core_get_func_args(RzCore *core, const char *fcn_name) {
if (!fcn_name || !core->analysis) {
return NULL;
}

View file

@ -35,7 +35,7 @@ RZ_API RzCoreAsmHit *rz_core_asm_hit_new(void) {
return hit;
}
RZ_API RzList *rz_core_asm_hit_list_new(void) {
RZ_API RzList /*<RzCoreAsmHit *>*/ *rz_core_asm_hit_list_new(void) {
RzList *list = rz_list_new();
if (list) {
list->free = &rz_core_asm_hit_free;
@ -182,7 +182,7 @@ RZ_API RzCmdStatus rz_core_asm_plugins_print(RzCore *core, const char *arch, RzC
}
// TODO: add support for byte-per-byte opcode search
RZ_API RzList *rz_core_asm_strsearch(RzCore *core, const char *input, ut64 from, ut64 to, int maxhits, int regexp, int everyByte, int mode) {
RZ_API RzList /*<RzCoreAsmHit *>*/ *rz_core_asm_strsearch(RzCore *core, const char *input, ut64 from, ut64 to, int maxhits, int regexp, int everyByte, int mode) {
RzCoreAsmHit *hit;
RzAsmOp op;
RzList *hits;
@ -609,7 +609,7 @@ static int is_hit_inrange(RzCoreAsmHit *hit, ut64 start_range, ut64 end_range) {
return result;
}
RZ_API RzList *rz_core_asm_bwdisassemble(RzCore *core, ut64 addr, int n, int len) {
RZ_API RzList /*<RzCoreAsmHit *>*/ *rz_core_asm_bwdisassemble(RzCore *core, ut64 addr, int n, int len) {
RzAsmOp op;
// if (n > core->blocksize) n = core->blocksize;
ut64 at;
@ -873,13 +873,13 @@ static RzList *rz_core_asm_back_disassemble(RzCore *core, ut64 addr, int len, ut
return hits;
}
RZ_API RzList *rz_core_asm_back_disassemble_instr(RzCore *core, ut64 addr, int len, ut32 hit_count, ut32 extra_padding) {
RZ_API RzList /*<RzCoreAsmHit *>*/ *rz_core_asm_back_disassemble_instr(RzCore *core, ut64 addr, int len, ut32 hit_count, ut32 extra_padding) {
// extra padding to allow for additional disassembly on border buffer cases
ut8 disassmble_each_addr = false;
return rz_core_asm_back_disassemble(core, addr, len, hit_count, disassmble_each_addr, extra_padding);
}
RZ_API RzList *rz_core_asm_back_disassemble_byte(RzCore *core, ut64 addr, int len, ut32 hit_count, ut32 extra_padding) {
RZ_API RzList /*<RzCoreAsmHit *>*/ *rz_core_asm_back_disassemble_byte(RzCore *core, ut64 addr, int len, ut32 hit_count, ut32 extra_padding) {
// extra padding to allow for additional disassembly on border buffer cases
ut8 disassmble_each_addr = true;
return rz_core_asm_back_disassemble(core, addr, len, hit_count, disassmble_each_addr, extra_padding);

View file

@ -383,7 +383,7 @@ static RzCmdStateOutput *add_header(RzCmdStateOutput *main_state, RzOutputMode d
* \param hashes List of strings with name of hashes that RZ_CORE_BIN_ACC_SECTIONS/SEGMENTS should print
* \return true if everything that was requested was printed well, false otherwise
*/
RZ_API bool rz_core_bin_print(RzCore *core, RzBinFile *bf, ut32 mask, RzCoreBinFilter *filter, RzCmdStateOutput *state, RzList *hashes) {
RZ_API bool rz_core_bin_print(RzCore *core, RZ_NONNULL RzBinFile *bf, ut32 mask, RzCoreBinFilter *filter, RzCmdStateOutput *state, RzList /*<char *>*/ *hashes) {
rz_return_val_if_fail(core && state, false);
#define wrap_mode(header, default_mode, method) \
@ -1638,7 +1638,7 @@ static void digests_ht_free(HtPPKv *kv) {
* Returns the hashtable with keys of digest names and values of
* strings containing requested digests.
* */
RZ_API RZ_OWN HtPP *rz_core_bin_create_digests(RzCore *core, ut64 paddr, ut64 size, RzList *digests) {
RZ_API RZ_OWN HtPP *rz_core_bin_create_digests(RzCore *core, ut64 paddr, ut64 size, RzList /*<char *>*/ *digests) {
rz_return_val_if_fail(size && digests, NULL);
HtPP *r = ht_pp_new(NULL, digests_ht_free, NULL);
if (!r) {
@ -1898,13 +1898,13 @@ static bool entries_initfini_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput
return true;
}
RZ_API bool rz_core_bin_initfini_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_initfini_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && state, false);
return entries_initfini_print(core, bf, state, true);
}
RZ_API bool rz_core_bin_entries_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_entries_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && state, false);
return entries_initfini_print(core, bf, state, false);
@ -2027,13 +2027,13 @@ static bool symbols_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state,
return true;
}
RZ_API bool rz_core_bin_symbols_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state, RzCoreBinFilter *filter) {
RZ_API bool rz_core_bin_symbols_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state, RzCoreBinFilter *filter) {
rz_return_val_if_fail(core && state, false);
return symbols_print(core, bf, state, filter, false);
}
RZ_API bool rz_core_bin_cur_symbol_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_cur_symbol_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && state, false);
RzCoreBinFilter filter = { 0 };
@ -2041,13 +2041,13 @@ RZ_API bool rz_core_bin_cur_symbol_print(RzCore *core, RzBinFile *bf, RzCmdState
return symbols_print(core, bf, state, &filter, false);
}
RZ_API bool rz_core_bin_exports_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state, RzCoreBinFilter *filter) {
RZ_API bool rz_core_bin_exports_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state, RzCoreBinFilter *filter) {
rz_return_val_if_fail(core && state, false);
return symbols_print(core, bf, state, filter, true);
}
RZ_API bool rz_core_bin_cur_export_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_cur_export_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && state, false);
RzCoreBinFilter filter = { 0 };
@ -2055,7 +2055,7 @@ RZ_API bool rz_core_bin_cur_export_print(RzCore *core, RzBinFile *bf, RzCmdState
return symbols_print(core, bf, state, &filter, true);
}
RZ_API bool rz_core_bin_imports_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state, RzCoreBinFilter *filter) {
RZ_API bool rz_core_bin_imports_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state, RzCoreBinFilter *filter) {
rz_return_val_if_fail(core && bf && bf->o && state, false);
int bin_demangle = rz_config_get_i(core->config, "bin.demangle");
@ -2160,7 +2160,7 @@ RZ_API bool rz_core_bin_imports_print(RzCore *core, RzBinFile *bf, RzCmdStateOut
return true;
}
RZ_API bool rz_core_bin_libs_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_libs_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && bf && bf->o && state, false);
const RzList *libs = rz_bin_object_get_libs(bf->o);
@ -2189,7 +2189,7 @@ RZ_API bool rz_core_bin_libs_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput
return true;
}
RZ_API bool rz_core_bin_main_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_main_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && bf && bf->o && state, false);
int va = (core->io->va || core->bin->is_debugger) ? VA_TRUE : VA_FALSE;
@ -2221,7 +2221,7 @@ RZ_API bool rz_core_bin_main_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput
return true;
}
RZ_API bool rz_core_bin_relocs_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_relocs_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && bf && bf->o && state, false);
RzBinObject *o = bf->o;
@ -2469,7 +2469,7 @@ static void sections_headers_setup(RzCore *core, RzCmdStateOutput *state, RzList
}
}
RZ_API bool rz_core_bin_sections_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state, RzCoreBinFilter *filter, RzList *hashes) {
RZ_API bool rz_core_bin_sections_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state, RzCoreBinFilter *filter, RzList /*<char *>*/ *hashes) {
rz_return_val_if_fail(core && bf && bf->o && state, false);
RzBinObject *o = bf->o;
@ -2538,7 +2538,7 @@ err:
return res;
}
RZ_API bool rz_core_bin_cur_section_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state, RzList *hashes) {
RZ_API bool rz_core_bin_cur_section_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state, RzList /*<char *>*/ *hashes) {
rz_return_val_if_fail(core && state, false);
RzCoreBinFilter filter = { 0 };
@ -2546,7 +2546,7 @@ RZ_API bool rz_core_bin_cur_section_print(RzCore *core, RzBinFile *bf, RzCmdStat
return rz_core_bin_sections_print(core, bf, state, &filter, hashes);
}
RZ_API bool rz_core_bin_cur_segment_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state, RzList *hashes) {
RZ_API bool rz_core_bin_cur_segment_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state, RzList /*<char *>*/ *hashes) {
rz_return_val_if_fail(core && bf && state, false);
RzCoreBinFilter filter = { 0 };
@ -2630,7 +2630,7 @@ RZ_API bool rz_core_bin_basefind_print(RzCore *core, ut32 pointer_size, RzCmdSta
return true;
}
RZ_API bool rz_core_bin_segments_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state, RzCoreBinFilter *filter, RzList *hashes) {
RZ_API bool rz_core_bin_segments_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state, RzCoreBinFilter *filter, RzList /*<char *>*/ *hashes) {
rz_return_val_if_fail(core && bf && bf->o && state, false);
RzBinObject *o = bf->o;
@ -2850,7 +2850,7 @@ static bool strings_print(RzCore *core, RzCmdStateOutput *state, const RzList *l
return true;
}
RZ_API bool rz_core_bin_strings_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_strings_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && bf && state, false);
const RzList *list = rz_bin_object_get_strings(bf->o);
@ -2863,7 +2863,7 @@ RZ_API bool rz_core_bin_strings_print(RzCore *core, RzBinFile *bf, RzCmdStateOut
* \param bf The RzBinFile to use for searching for strings
* \return On success returns RzList pointer, otherwise NULL
*/
RZ_API RZ_OWN RzList *rz_core_bin_whole_strings(RZ_NONNULL RzCore *core, RZ_NULLABLE RzBinFile *bf) {
RZ_API RZ_OWN RzList /*<RzBinString *>*/ *rz_core_bin_whole_strings(RZ_NONNULL RzCore *core, RZ_NULLABLE RzBinFile *bf) {
rz_return_val_if_fail(core, NULL);
bool new_bf = false;
@ -2914,7 +2914,7 @@ RZ_API RZ_OWN RzList *rz_core_bin_whole_strings(RZ_NONNULL RzCore *core, RZ_NULL
return l;
}
RZ_API bool rz_core_bin_whole_strings_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_whole_strings_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && state, false);
RzList *l = rz_core_bin_whole_strings(core, bf);
@ -2940,7 +2940,7 @@ static const char *get_filename(RzBinInfo *info, RzIODesc *desc) {
return "";
}
RZ_API bool rz_core_file_info_print(RzCore *core, RzBinFile *binfile, RzCmdStateOutput *state) {
RZ_API bool rz_core_file_info_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *binfile, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && core->file && state, false);
bool io_cache = rz_config_get_i(core->config, "io.cache");
@ -3041,7 +3041,7 @@ static const char *str2na(const char *s) {
return RZ_STR_ISEMPTY(s) ? "N/A" : s;
}
RZ_API bool rz_core_bin_info_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_info_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && state, false);
RzBinInfo *info = rz_bin_get_info(core->bin);
@ -3770,7 +3770,7 @@ static void bin_class_print_rizin(RzCore *r, RzBinClass *c, ut64 at_min) {
}
}
RZ_API bool rz_core_bin_class_as_source_print(RzCore *core, RzBinFile *bf, const char *class_name) {
RZ_API bool rz_core_bin_class_as_source_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, const char *class_name) {
rz_return_val_if_fail(core && bf, false);
RzBinClass *c;
@ -3811,7 +3811,7 @@ RZ_API bool rz_core_bin_class_as_source_print(RzCore *core, RzBinFile *bf, const
return found;
}
RZ_API bool rz_core_bin_class_fields_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state, const char *class_name) {
RZ_API bool rz_core_bin_class_fields_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state, const char *class_name) {
rz_return_val_if_fail(core && bf && bf->o && state, false);
RzListIter *iter, *iter2;
@ -3878,7 +3878,7 @@ RZ_API bool rz_core_bin_class_fields_print(RzCore *core, RzBinFile *bf, RzCmdSta
return true;
}
RZ_API bool rz_core_bin_class_methods_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state, const char *class_name) {
RZ_API bool rz_core_bin_class_methods_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state, const char *class_name) {
rz_return_val_if_fail(core && bf && bf->o && state, false);
RzListIter *iter, *iter2;
@ -3936,7 +3936,7 @@ RZ_API bool rz_core_bin_class_methods_print(RzCore *core, RzBinFile *bf, RzCmdSt
return true;
}
RZ_API bool rz_core_bin_classes_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_classes_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && bf && bf->o && state, false);
RzListIter *iter, *iter2, *iter3;
@ -4035,7 +4035,7 @@ RZ_API bool rz_core_bin_classes_print(RzCore *core, RzBinFile *bf, RzCmdStateOut
return true;
}
RZ_API bool rz_core_bin_signatures_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_signatures_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && state, false);
RzBinFile *cur = rz_bin_cur(core->bin);
@ -4067,7 +4067,7 @@ RZ_API bool rz_core_bin_signatures_print(RzCore *core, RzBinFile *bf, RzCmdState
return true;
}
RZ_API bool rz_core_bin_fields_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_fields_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && bf && bf->o && state, false);
const RzList *fields = rz_bin_object_get_fields(bf->o);
@ -4119,7 +4119,7 @@ RZ_API bool rz_core_bin_fields_print(RzCore *core, RzBinFile *bf, RzCmdStateOutp
return true;
}
RZ_API bool rz_core_bin_headers_print(RzCore *core, RzBinFile *bf) {
RZ_API bool rz_core_bin_headers_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf) {
rz_return_val_if_fail(core, false);
RzBinFile *cur = rz_bin_cur(core->bin);
@ -4877,13 +4877,13 @@ RZ_API RzCmdStatus rz_core_bin_plugins_print(RzBin *bin, RzCmdStateOutput *state
return RZ_CMD_STATUS_OK;
}
RZ_API bool rz_core_bin_dwarf_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_dwarf_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && state, false);
return bin_dwarf(core, bf, state);
}
RZ_API char *rz_core_bin_pdb_get_filename(RzCore *core) {
RZ_API RZ_OWN char *rz_core_bin_pdb_get_filename(RZ_NONNULL RzCore *core) {
RzBinInfo *info = rz_bin_get_info(core->bin);
/* Autodetect local file */
if (!info || !info->debug_file_name) {
@ -4952,7 +4952,7 @@ static void bin_memory_print_rec(RzCmdStateOutput *state, RzBinMem *mirror, cons
}
}
RZ_API bool rz_core_bin_memory_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_memory_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && bf && bf->o && state, false);
rz_cmd_state_output_array_start(state);
@ -5042,7 +5042,7 @@ end:
pj_end(state->d.pj);
}
RZ_API bool rz_core_bin_resources_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state, RZ_NULLABLE RzList *hashes) {
RZ_API bool rz_core_bin_resources_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state, RZ_NULLABLE RzList /*<char *>*/ *hashes) {
rz_return_val_if_fail(core && state && bf, false);
RzBinResource *resource = NULL;
RzListIter *it = NULL;
@ -5081,7 +5081,7 @@ RZ_API bool rz_core_bin_resources_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBi
return true;
}
RZ_API bool rz_core_bin_versions_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_versions_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && state, false);
// TODO: add rz_bin_object_get_versions and switch to table + json output
@ -5099,7 +5099,7 @@ RZ_API bool rz_core_bin_versions_print(RzCore *core, RzBinFile *bf, RzCmdStateOu
return true;
}
RZ_API bool rz_core_bin_trycatch_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_trycatch_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && state, false);
// TODO: add rz_bin_object_get_trycatch and switch to table + json output
@ -5114,7 +5114,7 @@ RZ_API bool rz_core_bin_trycatch_print(RzCore *core, RzBinFile *bf, RzCmdStateOu
return true;
}
RZ_API bool rz_core_bin_sections_mapping_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_sections_mapping_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && bf && bf->o && state, false);
rz_warn_if_fail(state->mode == RZ_OUTPUT_MODE_TABLE);
@ -5148,7 +5148,7 @@ RZ_API bool rz_core_bin_sections_mapping_print(RzCore *core, RzBinFile *bf, RzCm
return true;
}
RZ_API bool rz_core_bin_size_print(RzCore *core, RzBinFile *bf, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_size_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(core && state, false);
ut64 size = rz_bin_get_size(core->bin);
@ -5214,7 +5214,7 @@ static void print_arch(RzBin *bin, RzCmdStateOutput *state, struct arch_ctx *ctx
}
}
RZ_API bool rz_core_bin_archs_print(RzBin *bin, RzCmdStateOutput *state) {
RZ_API bool rz_core_bin_archs_print(RZ_NONNULL RzBin *bin, RZ_NONNULL RzCmdStateOutput *state) {
rz_return_val_if_fail(bin && state, false);
RzBinFile *binfile = rz_bin_cur(bin);

View file

@ -3756,7 +3756,7 @@ RZ_API void rz_core_parse_rizinrc(RzCore *r) {
* \param space The config space
* \return RzList of config variable spaces
*/
RZ_API RZ_OWN RzList *rz_core_config_in_space(RZ_NONNULL RzCore *core, RZ_NULLABLE const char *space) {
RZ_API RZ_OWN RzList /*<char *>*/ *rz_core_config_in_space(RZ_NONNULL RzCore *core, RZ_NULLABLE const char *space) {
rz_return_val_if_fail(core && core->config, NULL);
RzList *list = rz_list_new();
if (!list) {

View file

@ -434,7 +434,7 @@ static void print_debug_map_line(RzDebug *dbg, RzDebugMap *map, ut64 addr, RzOut
}
}
static void apply_maps_as_flags(RzCore *core, RzList /* <RzDebugMap> */ *maps, bool print_only) {
static void apply_maps_as_flags(RzCore *core, RzList /*<RzDebugMap *>*/ *maps, bool print_only) {
RzListIter *iter;
RzDebugMap *map;
rz_list_foreach (maps, iter, map) {
@ -923,7 +923,7 @@ static void get_backtrace_info(RzCore *core, RzDebugFrame *frame, ut64 addr,
* \param core The RzCore instance
* \return A list of RzBacktrace
*/
RZ_API RZ_OWN RzList *rz_core_debug_backtraces(RzCore *core) {
RZ_API RZ_OWN RzList /*<RzBacktrace *>*/ *rz_core_debug_backtraces(RzCore *core) {
RzList *list = rz_debug_frames(core->dbg, UT64_MAX);
if (!list) {
return NULL;

View file

@ -193,7 +193,7 @@ static bool sort_loclists(void *user, const ut64 key, const void *value) {
return true;
}
RZ_API void rz_core_bin_dwarf_print_loc(HtUP /*<offset, RzBinDwarfLocList*/ *loc_table, int addr_size) {
RZ_API void rz_core_bin_dwarf_print_loc(HtUP /*<offset, RzBinDwarfLocList *>*/ *loc_table, int addr_size) {
rz_return_if_fail(loc_table);
rz_cons_print("\nContents of the .debug_loc section:\n");
RzList /*<RzBinDwarfLocList *>*/ *sort_list = rz_list_new();
@ -219,7 +219,7 @@ RZ_API void rz_core_bin_dwarf_print_loc(HtUP /*<offset, RzBinDwarfLocList*/ *loc
rz_list_free(sort_list);
}
RZ_API void rz_core_bin_dwarf_print_aranges(RzList /*<RzBinDwarfARangeSet>*/ *aranges) {
RZ_API void rz_core_bin_dwarf_print_aranges(RzList /*<RzBinDwarfARangeSet *>*/ *aranges) {
rz_return_if_fail(aranges);
rz_cons_print("\nContents of the .debug_aranges section:\n");
RzListIter *it;
@ -340,7 +340,7 @@ static void print_line_op(RzBinDwarfLineOp *op, RzBinDwarfLineHeader *hdr, RZ_NU
rz_cons_print("\n");
}
RZ_API void rz_core_bin_dwarf_print_line_units(RzList /*<RzBinDwarfLineUnit>*/ *lines) {
RZ_API void rz_core_bin_dwarf_print_line_units(RzList /*<RzBinDwarfLineUnit *>*/ *lines) {
rz_return_if_fail(lines);
rz_cons_print("Raw dump of debug contents of section .debug_line:\n\n");
RzListIter *it;

View file

@ -11,7 +11,7 @@
* \param core RzCore Pointer
* \return RzList of RzWindowsHeapBlock structs
*/
RZ_API RZ_OWN RzList *rz_heap_windows_blocks_list(RzCore *core) {
RZ_API RZ_OWN RzList /*<RzWindowsHeapBlock *>*/ *rz_heap_windows_blocks_list(RzCore *core) {
return rz_heap_blocks_list(core);
}
@ -20,16 +20,16 @@ RZ_API RZ_OWN RzList *rz_heap_windows_blocks_list(RzCore *core) {
* \param core RzCore Pointer
* \return RzList of RzWindowsHeapInfo structs
*/
RZ_API RZ_OWN RzList *rz_heap_windows_heap_list(RzCore *core) {
RZ_API RZ_OWN RzList /*<RzWindowsHeapInfo *>*/ *rz_heap_windows_heap_list(RzCore *core) {
return rz_heap_list(core);
}
#else
RZ_API RZ_OWN RzList *rz_heap_windows_blocks_list(RzCore *core) {
RZ_API RZ_OWN RzList /*<RzWindowsHeapBlock *>*/ *rz_heap_windows_blocks_list(RzCore *core) {
return NULL;
}
RZ_API RZ_OWN RzList *rz_heap_windows_heap_list(RzCore *core) {
RZ_API RZ_OWN RzList /*<RzWindowsHeapInfo *>*/ *rz_heap_windows_heap_list(RzCore *core) {
return NULL;
}

View file

@ -266,7 +266,7 @@ RZ_API void rz_core_analysis_esil_init_regs(RZ_NONNULL RzCore *core) {
rz_core_analysis_set_reg(core, "PC", core->offset);
}
RZ_IPI void rz_core_analysis_esil_step_over(RzCore *core) {
RZ_API void rz_core_analysis_esil_step_over(RZ_NONNULL RzCore *core) {
RzAnalysisOp *op = rz_core_analysis_op(core, rz_reg_getv(core->analysis->reg, rz_reg_get_name(core->analysis->reg, RZ_REG_NAME_PC)), RZ_ANALYSIS_OP_MASK_BASIC | RZ_ANALYSIS_OP_MASK_HINT);
ut64 until_addr = UT64_MAX;
if (op && op->type == RZ_ANALYSIS_OP_TYPE_CALL) {

View file

@ -324,7 +324,7 @@ err:
* \param instructions List of instructions to assemble as a string
* \return Returns the length of the written data or -1 in case of error
*/
RZ_API int rz_core_write_assembly(RzCore *core, ut64 addr, const char *instructions) {
RZ_API int rz_core_write_assembly(RzCore *core, ut64 addr, RZ_NONNULL const char *instructions) {
rz_return_val_if_fail(core && instructions, -1);
int ret = -1;
@ -362,7 +362,7 @@ err:
* \param instructions List of instructions to assemble as a string
* \return Returns the length of the written data or -1 in case of error (e.g. the new instruction does not fit)
*/
RZ_API int rz_core_write_assembly_fill(RzCore *core, ut64 addr, const char *instructions) {
RZ_API int rz_core_write_assembly_fill(RzCore *core, ut64 addr, RZ_NONNULL const char *instructions) {
rz_return_val_if_fail(core && instructions, -1);
int ret = -1;
@ -602,7 +602,7 @@ RZ_API bool rz_core_write_value_inc_at(RzCore *core, ut64 addr, st64 value, int
* \param addr Address where to write the string
* \param s String to write. The string is unescaped, meaning that if there is `\n` it becomes 0x0a
*/
RZ_API bool rz_core_write_string_at(RzCore *core, ut64 addr, const char *s) {
RZ_API bool rz_core_write_string_at(RzCore *core, ut64 addr, RZ_NONNULL const char *s) {
rz_return_val_if_fail(core && s, false);
char *str = strdup(s);
@ -697,7 +697,7 @@ RZ_API bool rz_core_write_length_string_at(RzCore *core, ut64 addr, const char *
* \param addr Address where to write the string
* \param s String to encode as base64 and then written.
*/
RZ_API bool rz_core_write_base64_at(RzCore *core, ut64 addr, const char *s) {
RZ_API bool rz_core_write_base64_at(RzCore *core, ut64 addr, RZ_NONNULL const char *s) {
rz_return_val_if_fail(core && s, false);
bool res = false;
@ -742,7 +742,7 @@ err:
* \param addr Address where to write the string
* \param s String to decode from base64 and then written
*/
RZ_API bool rz_core_write_base64d_at(RzCore *core, ut64 addr, const char *s) {
RZ_API bool rz_core_write_base64d_at(RzCore *core, ut64 addr, RZ_NONNULL const char *s) {
rz_return_val_if_fail(core && s, false);
bool res = false;

View file

@ -1083,7 +1083,7 @@ RZ_API int rz_core_esil_step_back(RzCore *core) {
return 0;
}
RZ_API bool rz_core_esil_continue_back(RzCore *core) {
RZ_API bool rz_core_esil_continue_back(RZ_NONNULL RzCore *core) {
rz_return_val_if_fail(core->analysis->esil && core->analysis->esil->trace, false);
RzAnalysisEsil *esil = core->analysis->esil;
if (esil->trace->idx == 0) {
@ -2676,7 +2676,7 @@ RZ_API void rz_core_agraph_print(RzCore *core, int use_utf, const char *input) {
}
}
static void print_graph_agg(RzGraph /*RzGraphNodeInfo*/ *graph) {
static void print_graph_agg(RzGraph /*<RzGraphNodeInfo *>*/ *graph) {
RzGraphNodeInfo *print_node;
RzGraphNode *node, *target;
RzListIter *it, *edge_it;
@ -2705,7 +2705,7 @@ static void print_graph_agg(RzGraph /*RzGraphNodeInfo*/ *graph) {
}
}
static char *print_graph_dot(RzCore *core, RzGraph /*<RzGraphNodeInfo>*/ *graph) {
static char *print_graph_dot(RzCore *core, RzGraph /*<RzGraphNodeInfo *>*/ *graph) {
const char *font = rz_config_get(core->config, "graph.font");
char *node_properties = rz_str_newf("fontname=\"%s\"", font);
char *result = rz_graph_drawable_to_dot(graph, node_properties, NULL);
@ -2713,7 +2713,7 @@ static char *print_graph_dot(RzCore *core, RzGraph /*<RzGraphNodeInfo>*/ *graph)
return result;
}
static void rz_core_graph_print(RzCore *core, RzGraph /*<RzGraphNodeInfo>*/ *graph, int use_utf, bool use_offset, const char *input) {
static void rz_core_graph_print(RzCore *core, RzGraph /*<RzGraphNodeInfo *>*/ *graph, int use_utf, bool use_offset, const char *input) {
RzAGraph *agraph = NULL;
RzListIter *it;
RzListIter *edge_it;
@ -7628,4 +7628,4 @@ RZ_IPI RzCmdStatus rz_global_imports_handler(RzCore *core, int argc, const char
RZ_IPI RzCmdStatus rz_delete_global_imports_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state) {
rz_analysis_purge_imports(core->analysis);
return RZ_CMD_STATUS_OK;
}
}

View file

@ -2600,7 +2600,7 @@ RZ_API void rz_cmd_state_output_set_columnsf(RzCmdStateOutput *state, const char
/**
* \brief Clear the inner fields of RzCmdStateOutput structure, but do not free it.
*/
RZ_API void rz_cmd_state_output_fini(RzCmdStateOutput *state) {
RZ_API void rz_cmd_state_output_fini(RZ_NONNULL RzCmdStateOutput *state) {
rz_return_if_fail(state);
switch (state->mode) {
@ -2621,7 +2621,7 @@ RZ_API void rz_cmd_state_output_fini(RzCmdStateOutput *state) {
/**
* \brief Free the RzCmdStateOutput structure and its inner fields appropriately
*/
RZ_API void rz_cmd_state_output_free(RzCmdStateOutput *state) {
RZ_API void rz_cmd_state_output_free(RZ_NONNULL RzCmdStateOutput *state) {
rz_return_if_fail(state);
rz_cmd_state_output_fini(state);
@ -2631,7 +2631,7 @@ RZ_API void rz_cmd_state_output_free(RzCmdStateOutput *state) {
/**
* \brief Initialize a RzCmdStateOutput structure and its inner fields based on the provided mode
*/
RZ_API bool rz_cmd_state_output_init(RzCmdStateOutput *state, RzOutputMode mode) {
RZ_API bool rz_cmd_state_output_init(RZ_NONNULL RzCmdStateOutput *state, RzOutputMode mode) {
rz_return_val_if_fail(state, false);
state->mode = mode;
@ -2665,7 +2665,7 @@ RZ_API bool rz_cmd_state_output_init(RzCmdStateOutput *state, RzOutputMode mode)
* output was already printed to console for those types that output as they go
* (e.g. STANDARD, QUIET).
*/
RZ_API void rz_cmd_state_output_print(RzCmdStateOutput *state) {
RZ_API void rz_cmd_state_output_print(RZ_NONNULL RzCmdStateOutput *state) {
rz_return_if_fail(state);
char *s;

View file

@ -116,7 +116,7 @@ static bool dict2keylist(void *user, const void *key, const ut64 value) {
* \param core The RzCore struct to use
* \return On success, an RzList pointer, otherwise NULL.
*/
RZ_API RZ_OWN RzList *rz_core_theme_list(RZ_NONNULL RzCore *core) {
RZ_API RZ_OWN RzList /*<char *>*/ *rz_core_theme_list(RZ_NONNULL RzCore *core) {
rz_return_val_if_fail(core, NULL);
HtPU *themes = ht_pu_new0();
@ -145,7 +145,7 @@ RZ_API RZ_OWN RzList *rz_core_theme_list(RZ_NONNULL RzCore *core) {
return list;
}
RZ_IPI void rz_core_theme_nextpal(RzCore *core, RzConsPalSeekMode mode) {
RZ_API void rz_core_theme_nextpal(RzCore *core, RzConsPalSeekMode mode) {
RzListIter *iter;
const char *fn;
RzList *files = rz_core_theme_list(core);

View file

@ -79,7 +79,7 @@ RZ_IPI RzCmdStatus rz_cmd_heap_arena_bins_print_handler(RzCore *core, int argc,
* \param core RzCore pointer
* \return RzList of arenas
*/
RZ_API RzList *rz_heap_arenas_list(RzCore *core) {
RZ_API RzList /*<MallocState *>*/ *rz_heap_arenas_list(RzCore *core) {
call_handler(rz_heap_arena_list_wrapper);
}
@ -89,7 +89,7 @@ RZ_API RzList *rz_heap_arenas_list(RzCore *core) {
* \param m_arena Base Address of the arena
* \return RzList of heap chunks
*/
RZ_API RzList *rz_heap_chunks_list(RzCore *core, ut64 m_arena) {
RZ_API RzList /*<RzHeapChunkListItem *>*/ *rz_heap_chunks_list(RzCore *core, ut64 m_arena) {
call_handler(rz_heap_chunks_list_wrapper, m_arena);
}
@ -146,7 +146,7 @@ RZ_API MallocState *rz_heap_get_arena(RzCore *core, ut64 m_state) {
* \param arena_base Base address of the arena
* \return RzList of RzHeapBin pointers
*/
RZ_API RzList *rz_heap_tcache_content(RzCore *core, ut64 arena_base) {
RZ_API RzList /*<RzHeapBin *>*/ *rz_heap_tcache_content(RzCore *core, ut64 arena_base) {
call_handler(rz_heap_tcache_content, arena_base);
}

View file

@ -200,7 +200,7 @@ static const char *get_reg_role_name(RzReg *reg, RzRegItem *item) {
* \param filter Filter registers
* \return List of RzRegItem
*/
RZ_API RZ_OWN RzList *rz_core_reg_filter_items_sync(RZ_NONNULL RzCore *core, RZ_NONNULL RzReg *reg, RzCmdRegSync sync_cb, RZ_NULLABLE const char *filter) {
RZ_API RZ_OWN RzList /*<RzRegItem *>*/ *rz_core_reg_filter_items_sync(RZ_NONNULL RzCore *core, RZ_NONNULL RzReg *reg, RzCmdRegSync sync_cb, RZ_NULLABLE const char *filter) {
rz_return_val_if_fail(core && reg, NULL);
RzList *ritems = filter_reg_items(reg, filter);
if (!ritems) {

View file

@ -574,7 +574,7 @@ static bool maskMatches(int perm, int mask, bool only) {
return false;
}
RZ_API RZ_OWN RzList *rz_core_get_boundaries_prot(RzCore *core, int perm, const char *mode, const char *prefix) {
RZ_API RZ_OWN RzList /*<RzIOMap *>*/ *rz_core_get_boundaries_prot(RzCore *core, int perm, const char *mode, const char *prefix) {
rz_return_val_if_fail(core, NULL);
RzList *list = rz_list_newf(free); // XXX rz_io_map_free);

View file

@ -158,7 +158,7 @@ RZ_API int rz_core_cmp_print(RzCore *core, RZ_NONNULL const RzCompareData *cmp,
* \param len number of bytes to read instructions from
* \return RzList<RzCompareData>* List of comparison data
*/
RZ_API RZ_OWN RzList /*<RzCompareData>*/ *rz_core_cmp_disasm(RzCore *core, ut64 addr1, ut64 addr2, ut32 len) {
RZ_API RZ_OWN RzList /*<RzCompareData *>*/ *rz_core_cmp_disasm(RzCore *core, ut64 addr1, ut64 addr2, ut32 len) {
rz_return_val_if_fail(core, NULL);
RzList *cmp_list = rz_list_new();
@ -240,7 +240,7 @@ RZ_API void rz_core_cmp_free(RzCompareData *cmp) {
* \param unified print in unified form
* \return bool true if successfull
*/
RZ_API bool rz_core_cmp_disasm_print(RzCore *core, const RzList /*<RzCompareData>*/ *compare, bool unified) {
RZ_API bool rz_core_cmp_disasm_print(RzCore *core, const RzList /*<RzCompareData *>*/ *compare, bool unified) {
rz_return_val_if_fail(core && compare, false);
char colpad[80];
int hascolor = rz_config_get_i(core->config, "scr.color");

View file

@ -93,7 +93,7 @@ RZ_IPI void rz_core_types_link_show(RzCore *core, ut64 addr);
RZ_IPI void rz_core_types_print_all(RzCore *core, RzOutputMode mode);
RZ_IPI void rz_types_define(RzCore *core, const char *type);
RZ_IPI bool rz_types_open_file(RzCore *core, const char *path);
RZ_IPI bool rz_types_open_editor(RzCore *core, const char *typename);
RZ_IPI bool rz_types_open_editor(RzCore *core, RZ_NONNULL const char *typename);
/* agraph.c */
RZ_IPI void rz_core_agraph_add_node(RzCore *core, const char *title, const char *body, int color);
@ -115,7 +115,7 @@ RZ_IPI RzCmdStatus rz_core_bin_plugin_print(const RzBinPlugin *bp, RzCmdStateOut
RZ_IPI RzCmdStatus rz_core_binxtr_plugin_print(const RzBinXtrPlugin *bx, RzCmdStateOutput *state);
/* creg.c */
RZ_IPI RzList /*<RzRegItem>*/ *rz_core_reg_flags_candidates(RzCore *core, RzReg *reg);
RZ_IPI RzList /*<RzRegItem *>*/ *rz_core_reg_flags_candidates(RzCore *core, RzReg *reg);
RZ_IPI void rz_core_reg_print_diff(RzReg *reg, RzList *items);
/* cdebug.c */

View file

@ -57,7 +57,7 @@ RZ_API bool rz_core_reg_set_by_role_or_name(RzCore *core, const char *name, ut64
/// Construct the list of registers that should be applied as flags by default
/// (e.g. because their size matches the pointer size)
RZ_IPI RzList /*<RzRegItem>*/ *rz_core_reg_flags_candidates(RzCore *core, RzReg *reg) {
RZ_IPI RzList /*<RzRegItem *>*/ *rz_core_reg_flags_candidates(RzCore *core, RzReg *reg) {
const RzList *l = rz_reg_get_list(reg, RZ_REG_TYPE_GPR);
if (!l) {
return NULL;

View file

@ -8,7 +8,7 @@
* have several modes/alignment requirements.
*/
void rz_core_hack_help(const RzCore *core) {
RZ_API void rz_core_hack_help(const RzCore *core) {
const char *help_msg[] = {
"wao", " [op]", "performs a modification on current opcode",
"wao", " nop", "nop current opcode",

View file

@ -1385,7 +1385,7 @@ char *GH(rz_bin_num_to_type)(int bin_num) {
return NULL;
}
void GH(rz_heap_bin_free)(RzHeapBin *bin) {
RZ_API void GH(rz_heap_bin_free)(RzHeapBin *bin) {
if (!bin) {
return;
}

View file

@ -408,7 +408,7 @@ RZ_API void rz_core_seek_free(RzCore *core) {
* current state, followed by some items with positive idx which are Redos
* items.
*/
RZ_API RzList *rz_core_seek_list(RzCore *core) {
RZ_API RzList /*<RzCoreSeekItem *>*/ *rz_core_seek_list(RzCore *core) {
RzList *res = rz_list_newf((RzListFree)rz_core_seek_item_free);
if (!res) {
return NULL;

View file

@ -542,7 +542,7 @@ static void __create_panel_input(void *user, RzPanel *panel, const RzPanelLayout
static void __replace_current_panel_input(void *user, RzPanel *panel, const RzPanelLayout dir, RZ_NULLABLE const char *title);
static void __search_strings_data_create(void *user, RzPanel *panel, const RzPanelLayout dir, RZ_NULLABLE const char *title);
static void __search_strings_bin_create(void *user, RzPanel *panel, const RzPanelLayout dir, RZ_NULLABLE const char *title);
static char *__search_strings(RzCore *core, bool whole);
RZ_OWN static char *__search_strings(RzCore *core, bool whole);
static void __put_breakpoints_cb(void *user, RZ_UNUSED RzPanel *panel, RZ_UNUSED const RzPanelLayout dir, RZ_UNUSED RZ_NULLABLE const char *title);
static void __continue_almighty_cb(void *user, RZ_UNUSED RzPanel *panel, RZ_UNUSED const RzPanelLayout dir, RZ_UNUSED RZ_NULLABLE const char *title);
static void __step_almighty_cb(void *user, RZ_UNUSED RzPanel *panel, RZ_UNUSED const RzPanelLayout dir, RZ_UNUSED RZ_NULLABLE const char *title);

View file

@ -6,7 +6,7 @@
#define SORT_NAME 1
// find a better name and move to rz_util or rz_cons?
RZ_API char *rz_str_widget_list(void *user, RzList *list, int rows, int cur, PrintItemCallback cb) {
RZ_API char *rz_str_widget_list(void *user, RzList /*<void *>*/ *list, int rows, int cur, PrintItemCallback cb) {
void *item;
RzStrBuf *sb = rz_strbuf_new("");
RzListIter *iter;

View file

@ -494,7 +494,7 @@ static int cmp_matches(RzDiffMatch *m0, RzDiffMatch *m1) {
* Generates a list of matching blocks that are found in both inputs.
* If non are found it returns a match result with size of 0
* */
RZ_API RZ_OWN RzList /*<RzDiffMatch>*/ *rz_diff_matches_new(RZ_NONNULL RzDiff *diff) {
RZ_API RZ_OWN RzList /*<RzDiffMatch *>*/ *rz_diff_matches_new(RZ_NONNULL RzDiff *diff) {
rz_return_val_if_fail(diff, NULL);
RzList *stack = NULL;
RzList *matches = NULL;
@ -628,7 +628,7 @@ static void opcode_set(RzDiffOp *op, RzDiffOpType type, st32 a_beg, st32 a_end,
*
* Generates a list of opcodes that are needed to convert A to B.
* */
RZ_API RZ_OWN RzList /*<RzDiffOp>*/ *rz_diff_opcodes_new(RZ_NONNULL RzDiff *diff) {
RZ_API RZ_OWN RzList /*<RzDiffOp *>*/ *rz_diff_opcodes_new(RZ_NONNULL RzDiff *diff) {
rz_return_val_if_fail(diff, NULL);
ut32 a = 0, b = 0;
RzDiffOpType type = RZ_DIFF_OP_INVALID;
@ -709,7 +709,7 @@ static void group_op_free(RzList *ops) {
* each group will end with N common EQUAL ops (if possible).
* default is 3 equals ops before splitting the group.
* */
RZ_API RZ_OWN RzList /*<RzList<RzDiffOp>>*/ *rz_diff_opcodes_grouped_new(RZ_NONNULL RzDiff *diff, ut32 n_groups) {
RZ_API RZ_OWN RzList /*<RzList<RzDiffOp *> *>*/ *rz_diff_opcodes_grouped_new(RZ_NONNULL RzDiff *diff, ut32 n_groups) {
rz_return_val_if_fail(diff && n_groups > 1, NULL);
RzDiffOp *op = NULL;
RzListIter *it = NULL;

View file

@ -460,7 +460,7 @@ static bool append_to_list(RzFlagItem *fi, void *user) {
return true;
}
RZ_API RzList *rz_flag_all_list(RzFlag *f, bool by_space) {
RZ_API RzList /*<RzFlagItem *>*/ *rz_flag_all_list(RzFlag *f, bool by_space) {
RzList *ret = rz_list_new();
if (!ret) {
return NULL;
@ -472,7 +472,7 @@ RZ_API RzList *rz_flag_all_list(RzFlag *f, bool by_space) {
}
/* return the list of flag items that are associated with a given offset */
RZ_API const RzList * /*<RzFlagItem*>*/ rz_flag_get_list(RzFlag *f, ut64 off) {
RZ_API const RzList /*<RzFlagItem *>*/ *rz_flag_get_list(RzFlag *f, ut64 off) {
const RzFlagsAtOffset *item = rz_flag_get_nearest_list(f, off, 0);
return item ? item->flags : NULL;
}

View file

@ -9,7 +9,7 @@ RZ_API void rz_flag_tags_set(RzFlag *f, const char *name, const char *words) {
sdb_set(f->tags, k, words, -1);
}
RZ_API RZ_OWN RzList *rz_flag_tags_list(RzFlag *f) {
RZ_API RZ_OWN RzList /*<char *>*/ *rz_flag_tags_list(RzFlag *f) {
rz_return_val_if_fail(f, NULL);
RzList *res = rz_list_newf(free);
SdbList *o = sdb_foreach_list(f->tags, false);

View file

@ -127,7 +127,7 @@ RZ_API bool rz_flag_zone_around(RzFlag *f, ut64 addr, const char **prev, const c
return true;
}
RZ_API RzList *rz_flag_zone_barlist(RzFlag *f, ut64 from, ut64 bsize, int rows) {
RZ_API RzList /*<char *>*/ *rz_flag_zone_barlist(RzFlag *f, ut64 from, ut64 bsize, int rows) {
RzList *list = rz_list_newf(NULL);
int i;
for (i = 0; i < rows; i++) {

View file

@ -24,12 +24,12 @@ typedef struct hash_cfg_config_t {
const static RzHashPlugin *hash_static_plugins[] = { RZ_HASH_STATIC_PLUGINS };
RZ_API ut32 rz_hash_xxhash(RZ_NONNULL RzHash *rh, const ut8 *input, size_t size) {
RZ_API ut32 rz_hash_xxhash(RZ_NONNULL RzHash *rh, RZ_NONNULL const ut8 *input, size_t size) {
rz_return_val_if_fail(input, 0);
return XXH32(input, size, 0);
}
RZ_API double rz_hash_entropy(RZ_NONNULL RzHash *rh, const ut8 *data, ut64 len) {
RZ_API double rz_hash_entropy(RZ_NONNULL RzHash *rh, RZ_NONNULL const ut8 *data, ut64 len) {
rz_return_val_if_fail(data, 0.0);
const RzHashPlugin *plugin = &rz_hash_plugin_entropy;
ut8 *digest = NULL;
@ -42,7 +42,7 @@ RZ_API double rz_hash_entropy(RZ_NONNULL RzHash *rh, const ut8 *data, ut64 len)
return e;
}
RZ_API double rz_hash_entropy_fraction(RZ_NONNULL RzHash *rh, const ut8 *data, ut64 len) {
RZ_API double rz_hash_entropy_fraction(RZ_NONNULL RzHash *rh, RZ_NONNULL const ut8 *data, ut64 len) {
rz_return_val_if_fail(data, 0.0);
const RzHashPlugin *plugin = &rz_hash_plugin_entropy_fract;
ut8 *digest = NULL;
@ -101,7 +101,7 @@ static HashCfgConfig *hash_cfg_config_new(const RzHashPlugin *plugin) {
return mdc;
}
RZ_API const RzHashPlugin *rz_hash_plugin_by_index(RZ_NONNULL RzHash *rh, size_t index) {
RZ_API RZ_BORROW const RzHashPlugin *rz_hash_plugin_by_index(RZ_NONNULL RzHash *rh, size_t index) {
rz_return_val_if_fail(rh, NULL);
RzListIter *it;
@ -117,7 +117,7 @@ RZ_API const RzHashPlugin *rz_hash_plugin_by_index(RZ_NONNULL RzHash *rh, size_t
return NULL;
}
RZ_API const RzHashPlugin *rz_hash_plugin_by_name(RZ_NONNULL RzHash *rh, const char *name) {
RZ_API RZ_BORROW const RzHashPlugin *rz_hash_plugin_by_name(RZ_NONNULL RzHash *rh, RZ_NONNULL const char *name) {
rz_return_val_if_fail(name && rh, NULL);
RzListIter *it;
@ -131,7 +131,7 @@ RZ_API const RzHashPlugin *rz_hash_plugin_by_name(RZ_NONNULL RzHash *rh, const c
return NULL;
}
RZ_API RzHashCfg *rz_hash_cfg_new(RZ_NONNULL RzHash *rh) {
RZ_API RZ_OWN RzHashCfg *rz_hash_cfg_new(RZ_NONNULL RzHash *rh) {
rz_return_val_if_fail(rh, NULL);
RzHashCfg *md = RZ_NEW0(RzHashCfg);
@ -158,7 +158,7 @@ RZ_API RzHashCfg *rz_hash_cfg_new(RZ_NONNULL RzHash *rh) {
* with the given algorithm and runs also the algo init.
* when fails to allocate or configure or initialize, returns NULL.
* */
RZ_API RzHashCfg *rz_hash_cfg_new_with_algo(RZ_NONNULL RzHash *rh, const char *name, const ut8 *key, ut64 key_size) {
RZ_API RZ_OWN RzHashCfg *rz_hash_cfg_new_with_algo(RZ_NONNULL RzHash *rh, RZ_NONNULL const char *name, RZ_NULLABLE const ut8 *key, ut64 key_size) {
rz_return_val_if_fail(rh && name, NULL);
RzHashCfg *md = rz_hash_cfg_new(rh);
if (!md) {
@ -183,7 +183,7 @@ RZ_API RzHashCfg *rz_hash_cfg_new_with_algo(RZ_NONNULL RzHash *rh, const char *n
return md;
}
RZ_API void rz_hash_cfg_free(RzHashCfg *md) {
RZ_API void rz_hash_cfg_free(RZ_NONNULL RzHashCfg *md) {
rz_return_if_fail(md);
rz_list_free(md->configurations);
@ -196,7 +196,7 @@ RZ_API void rz_hash_cfg_free(RzHashCfg *md) {
* message digest allocates internally a HashCfgConfig which
* contains all the needed informations to the plugin to work.
* */
RZ_API bool rz_hash_cfg_configure(RzHashCfg *md, const char *name) {
RZ_API bool rz_hash_cfg_configure(RZ_NONNULL RzHashCfg *md, RZ_NONNULL const char *name) {
rz_return_val_if_fail(md && name, false);
if (rz_list_find(md->configurations, name, hash_cfg_config_compare)) {
@ -247,7 +247,7 @@ RZ_API bool rz_hash_cfg_configure(RzHashCfg *md, const char *name) {
*
* message digest sets the hmac key
* */
RZ_API bool rz_hash_cfg_hmac(RzHashCfg *md, const ut8 *key, ut64 key_size) {
RZ_API bool rz_hash_cfg_hmac(RZ_NONNULL RzHashCfg *md, RZ_NONNULL const ut8 *key, ut64 key_size) {
rz_return_val_if_fail(md && key && key_size && hash_cfg_can_hmac(md), false);
RzHashSize block_size = 0;
@ -295,7 +295,7 @@ RZ_API bool rz_hash_cfg_hmac(RzHashCfg *md, const ut8 *key, ut64 key_size) {
* RzHashCfg contains a list of configurations; this method will call
* the init method of all the plugins stored in its list.
* */
RZ_API bool rz_hash_cfg_init(RzHashCfg *md) {
RZ_API bool rz_hash_cfg_init(RZ_NONNULL RzHashCfg *md) {
rz_return_val_if_fail(md && hash_cfg_can_init(md), false);
RzListIter *iter = NULL;
@ -334,7 +334,7 @@ RZ_API bool rz_hash_cfg_init(RzHashCfg *md) {
* RzHashCfg contains a list of configurations; this method will call
* the update method of all the plugins stored in its list.
* */
RZ_API bool rz_hash_cfg_update(RzHashCfg *md, const ut8 *data, ut64 size) {
RZ_API bool rz_hash_cfg_update(RZ_NONNULL RzHashCfg *md, RZ_NONNULL const ut8 *data, ut64 size) {
rz_return_val_if_fail(md && hash_cfg_can_update(md), false);
RzListIter *iter = NULL;
@ -356,7 +356,7 @@ RZ_API bool rz_hash_cfg_update(RzHashCfg *md, const ut8 *data, ut64 size) {
* RzHashCfg contains a list of configurations; this method will call
* the final method of all the plugins stored in its list.
* */
RZ_API bool rz_hash_cfg_final(RzHashCfg *md) {
RZ_API bool rz_hash_cfg_final(RZ_NONNULL RzHashCfg *md) {
rz_return_val_if_fail(md && hash_cfg_can_final(md), false);
RzListIter *iter = NULL;
@ -411,7 +411,7 @@ RZ_API bool rz_hash_cfg_final(RzHashCfg *md) {
* RzHashCfg contains a list of configurations; this method will iterate N times
* each configuration final result.
* */
RZ_API bool rz_hash_cfg_iterate(RzHashCfg *md, size_t iterate) {
RZ_API bool rz_hash_cfg_iterate(RZ_NONNULL RzHashCfg *md, size_t iterate) {
rz_return_val_if_fail(md && hash_cfg_has_finshed(md), false);
RzListIter *iter = NULL;
@ -442,7 +442,7 @@ RZ_API bool rz_hash_cfg_iterate(RzHashCfg *md, size_t iterate) {
* RzHashCfg contains a list of configurations; this method will search
* for the configuration with the given name and if found return the digest value.
* */
RZ_API const ut8 *rz_hash_cfg_get_result(RzHashCfg *md, const char *name, ut32 *size) {
RZ_API RZ_BORROW const ut8 *rz_hash_cfg_get_result(RZ_NONNULL RzHashCfg *md, RZ_NONNULL const char *name, RZ_NONNULL ut32 *size) {
rz_return_val_if_fail(md && name && hash_cfg_has_finshed(md), false);
RzListIter *it = rz_list_find(md->configurations, name, hash_cfg_config_compare);
@ -466,7 +466,7 @@ RZ_API const ut8 *rz_hash_cfg_get_result(RzHashCfg *md, const char *name, ut32 *
* RzHashCfg contains a list of configurations; this method will search
* for the configuration with the given name and if found return the digest value.
* */
RZ_API char *rz_hash_cfg_get_result_string(RzHashCfg *md, const char *name, ut32 *size, bool invert) {
RZ_API RZ_OWN char *rz_hash_cfg_get_result_string(RZ_NONNULL RzHashCfg *md, RZ_NONNULL const char *name, RZ_NULLABLE ut32 *size, bool invert) {
rz_return_val_if_fail(md && name && hash_cfg_has_finshed(md), false);
ut32 pos = 0;
@ -507,7 +507,7 @@ RZ_API char *rz_hash_cfg_get_result_string(RzHashCfg *md, const char *name, ut32
*
* Returns the digest size of the initialized configuration.
* */
RZ_API RzHashSize rz_hash_cfg_size(RzHashCfg *md, const char *name) {
RZ_API RzHashSize rz_hash_cfg_size(RZ_NONNULL RzHashCfg *md, RZ_NONNULL const char *name) {
rz_return_val_if_fail(md && name, 0);
RzListIter *it = rz_list_find(md->configurations, name, hash_cfg_config_compare);
@ -526,7 +526,7 @@ RZ_API RzHashSize rz_hash_cfg_size(RzHashCfg *md, const char *name) {
*
* Returns the digest size of the initialized configuration.
* */
RZ_API ut8 *rz_hash_cfg_calculate_small_block(RZ_NONNULL RzHash *rh, const char *name, const ut8 *buffer, ut64 bsize, RzHashSize *osize) {
RZ_API RZ_OWN ut8 *rz_hash_cfg_calculate_small_block(RZ_NONNULL RzHash *rh, RZ_NONNULL const char *name, RZ_NONNULL const ut8 *buffer, ut64 bsize, RZ_NONNULL RzHashSize *osize) {
rz_return_val_if_fail(rh && name && buffer, NULL);
ut8 *result = NULL;
@ -542,7 +542,7 @@ RZ_API ut8 *rz_hash_cfg_calculate_small_block(RZ_NONNULL RzHash *rh, const char
return result;
}
RZ_API char *rz_hash_cfg_calculate_small_block_string(RZ_NONNULL RzHash *rh, const char *name, const ut8 *buffer, ut64 bsize, ut32 *size, bool invert) {
RZ_API RZ_OWN char *rz_hash_cfg_calculate_small_block_string(RZ_NONNULL RzHash *rh, RZ_NONNULL const char *name, RZ_NONNULL const ut8 *buffer, ut64 bsize, RZ_NULLABLE ut32 *size, bool invert) {
rz_return_val_if_fail(rh && name && buffer, NULL);
ut32 pos = 0;

View file

@ -157,7 +157,7 @@ static bool vars_collect_cb(void *user, const void *k, const void *v) {
/**
* Get a list of all variable definitions in the given set
*/
RZ_API RZ_OWN RzPVector /* <RzILVar> */ *rz_il_var_set_get_all(RzILVarSet *vs) {
RZ_API RZ_OWN RzPVector /*<RzILVar *>*/ *rz_il_var_set_get_all(RzILVarSet *vs) {
rz_return_val_if_fail(vs, NULL);
RzPVector *r = rz_pvector_new(NULL);
if (!r) {

View file

@ -313,7 +313,7 @@ RZ_API bool rz_il_vm_sync_to_reg(RZ_NONNULL RzILVM *vm, RZ_NONNULL RzILRegBindin
* Set the values of all variables in \p vm that are bound to registers and PC to the respective contents from \p reg.
* Contents of variables that are not bound to a register are left unchanged.
*/
RZ_API void rz_il_vm_sync_from_reg(RzILVM *vm, RZ_NONNULL RzILRegBinding *rb, RZ_NONNULL RzReg *reg) {
RZ_API void rz_il_vm_sync_from_reg(RZ_NONNULL RzILVM *vm, RZ_NONNULL RzILRegBinding *rb, RZ_NONNULL RzReg *reg) {
rz_return_if_fail(vm && rb && reg);
const char *pc = rz_reg_get_name(reg, RZ_REG_NAME_PC);
if (pc) {

View file

@ -844,7 +844,7 @@ static bool validate_effect(VALIDATOR_EFFECT_ARGS) {
* \return whether the given op is valid under \p ctx
*/
RZ_API bool rz_il_validate_effect(RZ_NULLABLE RzILOpEffect *op, RZ_NONNULL RzILValidateGlobalContext *ctx,
RZ_NULLABLE RZ_OUT HtPP /* <const char *, RzILSortPure *> */ **local_var_sorts_out,
RZ_NULLABLE RZ_OUT HtPP /*<const char *, RzILSortPure *>*/ **local_var_sorts_out,
RZ_NULLABLE RZ_OUT RzILTypeEffect *type_out,
RZ_NULLABLE RZ_OUT RzILValidateReport *report_out) {
LocalContext local_ctx;

View file

@ -253,7 +253,7 @@ RZ_API RZ_BORROW RzILVar *rz_il_vm_get_var(RZ_NONNULL RzILVM *vm, RzILVarKind ki
return rz_il_var_set_get(var_set_of_kind(vm, kind), name);
}
RZ_API RZ_OWN RzPVector /* <RzILVar> */ *rz_il_vm_get_all_vars(RZ_NONNULL RzILVM *vm, RzILVarKind kind) {
RZ_API RZ_OWN RzPVector /*<RzILVar *>*/ *rz_il_vm_get_all_vars(RZ_NONNULL RzILVM *vm, RzILVarKind kind) {
rz_return_val_if_fail(vm, NULL);
return rz_il_var_set_get_all(var_set_of_kind(vm, kind));
}

View file

@ -109,7 +109,7 @@ RZ_API Sdb *rz_agraph_get_sdb(RzAGraph *g);
RZ_API void rz_agraph_foreach(RzAGraph *g, RzANodeCallback cb, void *user);
RZ_API void rz_agraph_foreach_edge(RzAGraph *g, RAEdgeCallback cb, void *user);
RZ_API void rz_agraph_set_curnode(RzAGraph *g, RzANode *node);
RZ_API RzAGraph *create_agraph_from_graph(const RzGraph /*<RzGraphNodeInfo>*/ *graph);
RZ_API RzAGraph *create_agraph_from_graph(const RzGraph /*<RzGraphNodeInfo *>*/ *graph);
#endif
#endif

View file

@ -1280,9 +1280,9 @@ RZ_API const char *rz_analysis_datatype_to_string(RzAnalysisDataType t);
RZ_API bool rz_analysis_op_nonlinear(int t);
RZ_API bool rz_analysis_op_ismemref(int t);
RZ_API const char *rz_analysis_optype_to_string(int t);
RZ_API int rz_analysis_optype_from_string(const char *type);
RZ_API int rz_analysis_optype_from_string(RZ_NONNULL const char *type);
RZ_API const char *rz_analysis_op_family_to_string(int n);
RZ_API int rz_analysis_op_family_from_string(const char *f);
RZ_API int rz_analysis_op_family_from_string(RZ_NONNULL const char *f);
RZ_API int rz_analysis_op_hint(RzAnalysisOp *op, RzAnalysisHint *hint);
/* block.c */
@ -1595,9 +1595,9 @@ RZ_API bool rz_analysis_il_vm_setup(RzAnalysis *analysis);
RZ_API void rz_analysis_il_vm_cleanup(RzAnalysis *analysis);
/* trace */
RZ_API RzAnalysisRzilTrace *rz_analysis_rzil_trace_new(RzAnalysis *analysis, RzAnalysisILVM *rzil);
RZ_API RzAnalysisRzilTrace *rz_analysis_rzil_trace_new(RzAnalysis *analysis, RZ_NONNULL RzAnalysisILVM *rzil);
RZ_API void rz_analysis_rzil_trace_free(RzAnalysisRzilTrace *trace);
RZ_API void rz_analysis_rzil_trace_op(RzAnalysis *analysis, RzAnalysisILVM *rzil, RzAnalysisLiftedILOp op);
RZ_API void rz_analysis_rzil_trace_op(RzAnalysis *analysis, RZ_NONNULL RzAnalysisILVM *rzil, RZ_NONNULL RzAnalysisLiftedILOp op);
RZ_API bool rz_analysis_add_device_peripheral_map(RzBinObject *o, RzAnalysis *analysis);
@ -1640,7 +1640,7 @@ RZ_API void rz_analysis_trim_jmprefs(RzAnalysis *analysis, RzAnalysisFunction *f
RZ_API void rz_analysis_del_jmprefs(RzAnalysis *analysis, RzAnalysisFunction *fcn);
RZ_API char *rz_analysis_function_get_json(RzAnalysisFunction *function);
RZ_API RzAnalysisFunction *rz_analysis_fcn_next(RzAnalysis *analysis, ut64 addr);
RZ_API RZ_OWN char *rz_analysis_function_get_signature(RzAnalysisFunction *function);
RZ_API RZ_OWN char *rz_analysis_function_get_signature(RZ_NONNULL RzAnalysisFunction *function);
RZ_API bool rz_analysis_function_set_type(RzAnalysis *a, RZ_NONNULL RzAnalysisFunction *f, RZ_NONNULL RzCallable *callable);
RZ_API bool rz_analysis_function_set_type_str(RzAnalysis *a, RZ_NONNULL RzAnalysisFunction *f, RZ_NONNULL const char *sig);
RZ_API int rz_analysis_fcn_count(RzAnalysis *a, ut64 from, ut64 to);
@ -1656,7 +1656,7 @@ RZ_API const char *rz_analysis_xrefs_type_tostring(RzAnalysisXRefType type);
RZ_API RzAnalysisXRefType rz_analysis_xrefs_type(char ch);
RZ_API RzList /*<RzAnalysisXRef *>*/ *rz_analysis_xrefs_get_to(RzAnalysis *analysis, ut64 addr);
RZ_API RzList /*<RzAnalysisXRef *>*/ *rz_analysis_xrefs_get_from(RzAnalysis *analysis, ut64 addr);
RZ_API RzList /*<RzAnalysisXRef *>*/ *rz_analysis_xrefs_list(RzAnalysis *analysis);
RZ_API RZ_OWN RzList /*<RzAnalysisXRef *>*/ *rz_analysis_xrefs_list(RzAnalysis *analysis);
RZ_API RzList /*<RzAnalysisXRef *>*/ *rz_analysis_function_get_xrefs_from(RzAnalysisFunction *fcn);
RZ_API RzList /*<RzAnalysisXRef *>*/ *rz_analysis_function_get_xrefs_to(RzAnalysisFunction *fcn);
RZ_API bool rz_analysis_xrefs_set(RzAnalysis *analysis, ut64 from, ut64 to, RzAnalysisXRefType type);
@ -1680,7 +1680,7 @@ RZ_API const char *rz_analysis_function_get_var_reg_at(RzAnalysisFunction *fcn,
RZ_API RZ_BORROW RzPVector /*<RzAnalysisVar *>*/ *rz_analysis_function_get_vars_used_at(RzAnalysisFunction *fcn, ut64 op_addr);
// There could be multiple vars used in multiple functions. Use rz_analysis_get_functions_in()+rz_analysis_function_get_vars_used_at() instead.
RZ_API RZ_DEPRECATE RzAnalysisVar *rz_analysis_get_used_function_var(RzAnalysis *analysis, ut64 addr);
RZ_DEPRECATE RZ_API RzAnalysisVar *rz_analysis_get_used_function_var(RzAnalysis *analysis, ut64 addr);
RZ_API bool rz_analysis_var_rename(RzAnalysisVar *var, const char *new_name, bool verbose);
RZ_API void rz_analysis_var_resolve_overlaps(RzAnalysisVar *var);
@ -1809,8 +1809,8 @@ RZ_API int rz_analysis_reflines_middle(RzAnalysis *analysis, RzList /*<RzAnalysi
RZ_API RzAnalysisRefStr *rz_analysis_reflines_str(void *core, ut64 addr, int opts);
RZ_API void rz_analysis_reflines_str_free(RzAnalysisRefStr *refstr);
RZ_API RzList /*<RzAnalysisVar *>*/ *rz_analysis_var_list(RzAnalysis *analysis, RzAnalysisFunction *fcn, int kind);
RZ_API RZ_DEPRECATE RzList /*<RzAnalysisVar *>*/ *rz_analysis_var_all_list(RzAnalysis *analysis, RzAnalysisFunction *fcn);
RZ_API RZ_DEPRECATE RzList /*<RzAnalysisVarField *>*/ *rz_analysis_function_get_var_fields(RzAnalysisFunction *fcn, int kind);
RZ_DEPRECATE RZ_API RzList /*<RzAnalysisVar *>*/ *rz_analysis_var_all_list(RzAnalysis *analysis, RzAnalysisFunction *fcn);
RZ_DEPRECATE RZ_API RzList /*<RzAnalysisVarField *>*/ *rz_analysis_function_get_var_fields(RzAnalysisFunction *fcn, int kind);
// calling conventions API
RZ_API bool rz_analysis_cc_exist(RzAnalysis *analysis, const char *convention);
@ -2121,7 +2121,7 @@ RZ_API RzVector /*<RzAnalysisVTable>*/ *rz_analysis_class_vtable_get_all(RzAnaly
RZ_API RzAnalysisClassErr rz_analysis_class_vtable_set(RzAnalysis *analysis, const char *class_name, RzAnalysisVTable *vtable);
RZ_API RzAnalysisClassErr rz_analysis_class_vtable_delete(RzAnalysis *analysis, const char *class_name, const char *vtable_id);
RZ_API RzGraph /*<RzGraphNodeInfo>*/ *rz_analysis_class_get_inheritance_graph(RzAnalysis *analysis);
RZ_API RzGraph /*<RzGraphNodeInfo *>*/ *rz_analysis_class_get_inheritance_graph(RzAnalysis *analysis);
RZ_API size_t rz_analysis_function_arg_count(RzAnalysis *a, RzAnalysisFunction *fcn);
RZ_API RZ_OWN RzPVector /*<RzAnalysisVar *>*/ *rz_analysis_function_args(RzAnalysis *a, RzAnalysisFunction *fcn);

View file

@ -158,8 +158,8 @@ RZ_API bool rz_asm_is_valid(RzAsm *a, const char *name);
RZ_API bool rz_asm_use(RzAsm *a, const char *name);
RZ_API bool rz_asm_use_assembler(RzAsm *a, const char *name);
RZ_API bool rz_asm_set_arch(RzAsm *a, const char *name, int bits);
RZ_API int rz_asm_set_bits(RzAsm *a, int bits);
RZ_API void rz_asm_set_cpu(RzAsm *a, const char *cpu);
RZ_DEPRECATE RZ_API int rz_asm_set_bits(RzAsm *a, int bits);
RZ_DEPRECATE RZ_API void rz_asm_set_cpu(RzAsm *a, const char *cpu);
RZ_API bool rz_asm_set_big_endian(RzAsm *a, bool big_endian);
RZ_API bool rz_asm_set_syntax(RzAsm *a, int syntax);
RZ_API int rz_asm_syntax_from_string(const char *name);
@ -206,7 +206,7 @@ RZ_API RZ_OWN RzAsmTokenString *rz_asm_token_string_new(const char *asm_str);
RZ_API void rz_asm_token_string_free(RZ_OWN RzAsmTokenString *toks);
RZ_API RZ_OWN RzAsmTokenString *rz_asm_token_string_clone(RZ_OWN RZ_NONNULL RzAsmTokenString *toks);
RZ_API void rz_asm_token_pattern_free(void *p);
RZ_API RZ_OWN RzAsmTokenString *rz_asm_tokenize_asm_regex(RZ_BORROW RzStrBuf *asm_str, RzPVector /* RzAsmTokenPattern* */ *patterns);
RZ_API RZ_OWN RzAsmTokenString *rz_asm_tokenize_asm_regex(RZ_BORROW RzStrBuf *asm_str, RzPVector /*<RzAsmTokenPattern *>*/ *patterns);
RZ_API RZ_OWN RzAsmParseParam *rz_asm_get_parse_param(RZ_NULLABLE const RzReg *reg, ut32 ana_op_type);
RZ_DEPRECATE RZ_API RZ_OWN RzAsmTokenString *rz_asm_tokenize_asm_string(RZ_BORROW RzStrBuf *asm_str, RZ_NULLABLE const RzAsmParseParam *param);
RZ_DEPRECATE RZ_API RZ_OWN RzStrBuf *rz_asm_colorize_asm_str(RZ_BORROW RzStrBuf *asm_str, RZ_BORROW RzPrint *p, RZ_NULLABLE const RzAsmParseParam *param, RZ_NULLABLE const RzAsmTokenString *toks);

View file

@ -815,7 +815,7 @@ typedef struct rz_bin_bind_t {
RZ_API void rz_bin_virtual_file_free(RzBinVirtualFile *vfile);
RZ_API void rz_bin_map_free(RzBinMap *map);
RZ_API RzList /*<RzBinMap *>*/ *rz_bin_maps_of_file_sections(RZ_NONNULL RzBinFile *binfile);
RZ_API RZ_OWN RzList /*<RzBinMap *>*/ *rz_bin_maps_of_file_sections(RZ_NONNULL RzBinFile *binfile);
RZ_API RzList /*<RzBinSection *>*/ *rz_bin_sections_of_maps(RzList /*<RzBinMap *>*/ *maps);
RZ_API RzBinSection *rz_bin_section_new(const char *name);
RZ_API void rz_bin_section_free(RzBinSection *bs);
@ -890,29 +890,29 @@ RZ_API void rz_bin_force_plugin(RzBin *bin, const char *pname);
RZ_API ut64 rz_bin_get_baddr(RzBin *bin);
RZ_API ut64 rz_bin_file_get_baddr(RzBinFile *bf);
RZ_API void rz_bin_set_user_ptr(RzBin *bin, void *user);
RZ_API RzBinInfo *rz_bin_get_info(RzBin *bin);
RZ_DEPRECATE RZ_API RZ_BORROW RzBinInfo *rz_bin_get_info(RzBin *bin);
RZ_API void rz_bin_set_baddr(RzBin *bin, ut64 baddr);
RZ_API ut64 rz_bin_get_laddr(RzBin *bin);
RZ_API ut64 rz_bin_get_size(RzBin *bin);
RZ_API RZ_OWN RzList /*<RzBinString *>*/ *rz_bin_file_strings(RZ_NONNULL RzBinFile *bf, size_t min_length, bool raw_strings);
// use RzBinFile instead
RZ_API RZ_DEPRECATE RZ_BORROW RzList /*<RzBinAddr *>*/ *rz_bin_get_entries(RZ_NONNULL RzBin *bin);
RZ_API RZ_DEPRECATE RZ_BORROW RzList /*<RzBinField *>*/ *rz_bin_get_fields(RZ_NONNULL RzBin *bin);
RZ_API RZ_DEPRECATE RZ_BORROW RzList /*<RzBinImport *>*/ *rz_bin_get_imports(RZ_NONNULL RzBin *bin);
RZ_API RZ_DEPRECATE RZ_BORROW RzList /*<char *>*/ *rz_bin_get_libs(RZ_NONNULL RzBin *bin);
RZ_API RZ_DEPRECATE RZ_BORROW RzList /*<RzBinSection *>*/ *rz_bin_get_sections(RZ_NONNULL RzBin *bin);
RZ_API RZ_DEPRECATE RZ_BORROW RzList /*<RzBinClass *>*/ *rz_bin_get_classes(RZ_NONNULL RzBin *bin);
RZ_API RZ_DEPRECATE RZ_BORROW RzList /*<RzBinString *>*/ *rz_bin_get_strings(RZ_NONNULL RzBin *bin);
RZ_API RZ_DEPRECATE RZ_BORROW RzList /*<RzBinMem *>*/ *rz_bin_get_mem(RZ_NONNULL RzBin *bin);
RZ_API RZ_DEPRECATE RZ_BORROW RzList /*<RzBinSymbol *>*/ *rz_bin_get_symbols(RZ_NONNULL RzBin *bin);
RZ_API RZ_DEPRECATE int rz_bin_is_static(RZ_NONNULL RzBin *bin);
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinAddr *>*/ *rz_bin_get_entries(RZ_NONNULL RzBin *bin);
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinField *>*/ *rz_bin_get_fields(RZ_NONNULL RzBin *bin);
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinImport *>*/ *rz_bin_get_imports(RZ_NONNULL RzBin *bin);
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<char *>*/ *rz_bin_get_libs(RZ_NONNULL RzBin *bin);
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinSection *>*/ *rz_bin_get_sections(RZ_NONNULL RzBin *bin);
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinClass *>*/ *rz_bin_get_classes(RZ_NONNULL RzBin *bin);
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinString *>*/ *rz_bin_get_strings(RZ_NONNULL RzBin *bin);
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinMem *>*/ *rz_bin_get_mem(RZ_NONNULL RzBin *bin);
RZ_DEPRECATE RZ_API RZ_BORROW RzList /*<RzBinSymbol *>*/ *rz_bin_get_symbols(RZ_NONNULL RzBin *bin);
RZ_DEPRECATE RZ_API int rz_bin_is_static(RZ_NONNULL RzBin *bin);
RZ_API RzList /*<RzBinTrycatch *>*/ *rz_bin_file_get_trycatch(RZ_NONNULL RzBinFile *bf);
RZ_API const RzList /*<RzBinAddr *>*/ *rz_bin_object_get_entries(RZ_NONNULL RzBinObject *obj);
RZ_API const RzList /*<RzBinField *>*/ *rz_bin_object_get_fields(RZ_NONNULL RzBinObject *obj);
RZ_API const RzList /*<RzBinImport *>*/ *rz_bin_object_get_imports(RZ_NONNULL RzBinObject *obj);
RZ_API const RzBinInfo /*<RzBinInfo *>*/ *rz_bin_object_get_info(RZ_NONNULL RzBinObject *obj);
RZ_API const RzBinInfo *rz_bin_object_get_info(RZ_NONNULL RzBinObject *obj);
RZ_API const RzList /*<char *>*/ *rz_bin_object_get_libs(RZ_NONNULL RzBinObject *obj);
RZ_API const RzList /*<RzBinSection *>*/ *rz_bin_object_get_sections_all(RZ_NONNULL RzBinObject *obj);
RZ_API RZ_OWN RzList /*<RzBinSection *>*/ *rz_bin_object_get_sections(RZ_NONNULL RzBinObject *obj);
@ -923,7 +923,7 @@ RZ_API const RzList /*<RzBinMem *>*/ *rz_bin_object_get_mem(RZ_NONNULL RzBinObje
RZ_API const RzList /*<RzBinResource *>*/ *rz_bin_object_get_resources(RZ_NONNULL RzBinObject *obj);
RZ_API const RzList /*<RzBinSymbol *>*/ *rz_bin_object_get_symbols(RZ_NONNULL RzBinObject *obj);
RZ_API bool rz_bin_object_reset_strings(RZ_NONNULL RzBin *bin, RZ_NONNULL RzBinFile *bf, RZ_NONNULL RzBinObject *obj);
RZ_API RzBinString *rz_bin_object_get_string_at(RZ_NONNULL RzBinObject *obj, ut64 address, bool is_va);
RZ_API RZ_BORROW RzBinString *rz_bin_object_get_string_at(RZ_NONNULL RzBinObject *obj, ut64 address, bool is_va);
RZ_API bool rz_bin_object_is_big_endian(RZ_NONNULL RzBinObject *obj);
RZ_API bool rz_bin_object_is_static(RZ_NONNULL RzBinObject *obj);
RZ_API RZ_OWN RzVector /*<RzBinSectionMap>*/ *rz_bin_object_sections_mapping_list(RZ_NONNULL RzBinObject *obj);

View file

@ -947,12 +947,12 @@ RZ_API const char *rz_bin_dwarf_get_attr_form_name(ut64 form_code);
RZ_API const char *rz_bin_dwarf_get_unit_type_name(ut64 unit_type);
RZ_API const char *rz_bin_dwarf_get_lang_name(ut64 lang);
RZ_API RzList /*<RzBinDwarfARangeSet>*/ *rz_bin_dwarf_parse_aranges(RzBinFile *binfile);
RZ_API RzList /*<RzBinDwarfARangeSet *>*/ *rz_bin_dwarf_parse_aranges(RzBinFile *binfile);
RZ_API RzBinDwarfDebugAbbrev *rz_bin_dwarf_parse_abbrev(RzBinFile *binfile);
RZ_API RzBinDwarfDebugInfo *rz_bin_dwarf_parse_info(RzBinFile *binfile, RzBinDwarfDebugAbbrev *da);
RZ_API HtUP /*<offset, RzBinDwarfLocList*/ *rz_bin_dwarf_parse_loc(RzBinFile *binfile, int addr_size);
RZ_API HtUP /*<offset, RzBinDwarfLocList *>*/ *rz_bin_dwarf_parse_loc(RzBinFile *binfile, int addr_size);
RZ_API void rz_bin_dwarf_arange_set_free(RzBinDwarfARangeSet *set);
RZ_API void rz_bin_dwarf_loc_free(HtUP /*<offset, RzBinDwarfLocList*>*/ *loc_table);
RZ_API void rz_bin_dwarf_loc_free(HtUP /*<offset, RzBinDwarfLocList *>*/ *loc_table);
RZ_API void rz_bin_dwarf_debug_info_free(RzBinDwarfDebugInfo *inf);
RZ_API void rz_bin_dwarf_debug_abbrev_free(RzBinDwarfDebugAbbrev *da);

View file

@ -23,9 +23,9 @@ typedef struct {
RZ_API RZ_OWN RzCompareData *rz_core_cmp_mem_mem(RzCore *core, ut64 addr1, ut64 addr2, ut32 len);
RZ_API RZ_OWN RzCompareData *rz_core_cmp_mem_data(RzCore *core, ut64 addr, RZ_NONNULL const ut8 *data, ut32 len);
RZ_API int rz_core_cmp_print(RzCore *core, RZ_NONNULL const RzCompareData *cmp, RzCmdStateOutput *state);
RZ_API RZ_OWN RzList /*<RzCompareData>*/ *rz_core_cmp_disasm(RzCore *core, ut64 addr1, ut64 addr2, ut32 len);
RZ_API RZ_OWN RzList /*<RzCompareData *>*/ *rz_core_cmp_disasm(RzCore *core, ut64 addr1, ut64 addr2, ut32 len);
RZ_API void rz_core_cmp_free(RzCompareData *cmp);
RZ_API bool rz_core_cmp_disasm_print(RzCore *core, const RzList /*<RzCompareData>*/ *compare, bool unified);
RZ_API bool rz_core_cmp_disasm_print(RzCore *core, const RzList /*<RzCompareData *>*/ *compare, bool unified);
/**
* \struct RzCoreCmpWatcher

View file

@ -106,7 +106,7 @@ RZ_API void rz_config_node_free(RZ_NULLABLE void *n);
RZ_API void rz_config_node_value_format_i(char *buf, size_t buf_size, const ut64 i, RZ_NULLABLE RzConfigNode *node);
RZ_API bool rz_config_toggle(RzConfig *cfg, RZ_NONNULL const char *name);
RZ_API bool rz_config_readonly(RzConfig *cfg, const char *key);
RZ_API bool rz_config_eval(RzConfig *cfg, const char *str);
RZ_API bool rz_config_eval(RZ_NONNULL RzConfig *cfg, RZ_NONNULL const char *str);
RZ_API bool rz_config_set_setter(RzConfig *cfg, const char *key, RzConfigCallback cb);
RZ_API bool rz_config_set_getter(RzConfig *cfg, const char *key, RzConfigCallback cb);

View file

@ -839,7 +839,7 @@ RZ_API void rz_cons_sleep_end(void *user);
RZ_API void rz_cons_break_push(RzConsBreak cb, void *user);
RZ_API void rz_cons_break_pop(void);
RZ_API void rz_cons_break_clear(void);
RZ_API void rz_cons_breakword(const char *s);
RZ_API void rz_cons_breakword(RZ_NULLABLE const char *s);
RZ_API void rz_cons_break_end(void);
RZ_API void rz_cons_break_timeout(int timeout);

View file

@ -491,7 +491,7 @@ RZ_API void rz_core_prompt_loop(RzCore *core);
RZ_API ut64 rz_core_pava(RzCore *core, ut64 addr);
RZ_API int rz_core_cmd(RzCore *core, const char *cmd, int log);
RZ_API RzCmdStatus rz_core_cmd_rzshell(RzCore *core, const char *cmd, int log);
RZ_API char *rz_core_editor(const RzCore *core, const char *file, const char *str);
RZ_API RZ_OWN char *rz_core_editor(const RzCore *core, RZ_NULLABLE const char *file, RZ_NULLABLE const char *str);
RZ_API int rz_core_fgets(char *buf, int len, void *user);
RZ_API RzFlagItem *rz_core_flag_get_by_spaces(RzFlag *f, ut64 off);
RZ_API int rz_core_flush(RzCore *core, const char *cmd);
@ -641,7 +641,7 @@ RZ_API bool rz_core_write_base64_at(RzCore *core, ut64 addr, RZ_NONNULL const ch
RZ_API bool rz_core_write_random_at(RzCore *core, ut64 addr, size_t len);
RZ_API bool rz_core_write_block_op_at(RzCore *core, ut64 addr, RzCoreWriteOp op, ut8 *hex, int hexlen);
RZ_API bool rz_core_write_duplicate_at(RzCore *core, ut64 addr, ut64 from, int len);
RZ_API ut8 *rz_core_transform_op(RzCore *core, ut64 addr, RzCoreWriteOp op, ut8 *hex, int hexlen, int *buflen);
RZ_API RZ_OWN ut8 *rz_core_transform_op(RzCore *core, ut64 addr, RzCoreWriteOp op, ut8 *hex, int hexlen, int *buflen);
RZ_API ut32 rz_core_file_cur_fd(RzCore *core);
RZ_API RzCmdStatus rz_core_io_cache_print(RzCore *core, RzCmdStateOutput *state);
RZ_API RzCmdStatus rz_core_io_pcache_print(RzCore *core, RzIODesc *desc, RzCmdStateOutput *state);
@ -731,8 +731,8 @@ RZ_API char *rz_core_disassemble_instr(RzCore *core, ut64 addr, int l);
RZ_API char *rz_core_disassemble_bytes(RzCore *core, ut64 addr, int b);
/* carg.c */
RZ_API RZ_DEPRECATE ut64 rz_core_arg_get(RzCore *core, const char *cc, int num);
RZ_API RzList /*<RzAnalysisFuncArg *>*/ *rz_core_get_func_args(RzCore *core, const char *func_name);
RZ_DEPRECATE RZ_API ut64 rz_core_arg_get(RzCore *core, const char *cc, int num);
RZ_API RZ_OWN RzList /*<RzAnalysisFuncArg *>*/ *rz_core_get_func_args(RzCore *core, const char *func_name);
RZ_API void rz_core_print_func_args(RzCore *core);
RZ_API char *resolve_fcn_name(RzAnalysis *analysis, const char *func_name);
@ -781,12 +781,12 @@ RZ_API void rz_core_analysis_undefine(RzCore *core, ut64 off);
RZ_API void rz_core_analysis_hint_print(RzAnalysis *a, ut64 addr, RzCmdStateOutput *state);
RZ_API void rz_core_analysis_hint_list_print(RzAnalysis *a, RzCmdStateOutput *state);
RZ_API int rz_core_analysis_search(RzCore *core, ut64 from, ut64 to, ut64 ref, int mode);
RZ_API int rz_core_analysis_search_xrefs(RzCore *core, ut64 from, ut64 to);
RZ_API int rz_core_analysis_search_xrefs(RZ_NONNULL RzCore *core, ut64 from, ut64 to);
RZ_API int rz_core_analysis_data(RzCore *core, ut64 addr, int count, int depth, int wordsize);
RZ_API void rz_core_analysis_datarefs(RzCore *core, ut64 addr);
RZ_API void rz_core_analysis_coderefs(RzCore *core, ut64 addr);
RZ_API RzGraph /*RzGraphNodeInfo*/ *rz_core_analysis_codexrefs(RzCore *core, ut64 addr);
RZ_API RzGraph /*RzGraphNodeInfo*/ *rz_core_analysis_importxrefs(RzCore *core);
RZ_API RzGraph /*<RzGraphNodeInfo *>*/ *rz_core_analysis_codexrefs(RzCore *core, ut64 addr);
RZ_API RzGraph /*<RzGraphNodeInfo *>*/ *rz_core_analysis_importxrefs(RzCore *core);
RZ_API void rz_core_analysis_callgraph(RzCore *core, ut64 addr, int fmt);
RZ_API void rz_core_analysis_resolve_jumps(RZ_NONNULL RzCore *core);
RZ_API bool rz_core_analysis_refs(RZ_NONNULL RzCore *core, size_t nbytes);
@ -869,7 +869,7 @@ RZ_API RzList /*<RzCoreAsmHit *>*/ *rz_core_asm_bwdisassemble(RzCore *core, ut64
RZ_API RzList /*<RzCoreAsmHit *>*/ *rz_core_asm_back_disassemble_instr(RzCore *core, ut64 addr, int len, ut32 hit_count, ut32 extra_padding);
RZ_API RzList /*<RzCoreAsmHit *>*/ *rz_core_asm_back_disassemble_byte(RzCore *core, ut64 addr, int len, ut32 hit_count, ut32 extra_padding);
RZ_API ut32 rz_core_asm_bwdis_len(RzCore *core, int *len, ut64 *start_addr, ut32 l);
RZ_API int rz_core_print_disasm(RZ_NONNULL RzCore *core, ut64 addr, RZ_NONNULL ut8 *buf, int len, int nlines, RZ_NULLABLE RzCmdStateOutput *state, RzCoreDisasmOptions *options);
RZ_API int rz_core_print_disasm(RZ_NONNULL RzCore *core, ut64 addr, RZ_NONNULL ut8 *buf, int len, int nlines, RZ_NULLABLE RzCmdStateOutput *state, RZ_NULLABLE RzCoreDisasmOptions *options);
RZ_API int rz_core_print_disasm_json(RzCore *core, ut64 addr, ut8 *buf, int len, int lines, PJ *pj);
RZ_API int rz_core_print_disasm_instructions_with_buf(RzCore *core, ut64 address, ut8 *buf, int nb_bytes, int nb_opcodes);
RZ_API int rz_core_print_disasm_instructions(RzCore *core, int nb_bytes, int nb_opcodes);
@ -922,7 +922,7 @@ RZ_API void rz_core_sym_name_fini(RZ_NULLABLE RzBinSymNames *sn);
RZ_API void rz_core_bin_dwarf_print_abbrev_section(const RzBinDwarfDebugAbbrev *da);
RZ_API void rz_core_bin_dwarf_print_attr_value(const RzBinDwarfAttrValue *val);
RZ_API void rz_core_bin_dwarf_print_debug_info(const RzBinDwarfDebugInfo *inf);
RZ_API void rz_core_bin_dwarf_print_loc(HtUP /*<offset, RzBinDwarfLocList*>*/ *loc_table, int addr_size);
RZ_API void rz_core_bin_dwarf_print_loc(HtUP /*<offset, RzBinDwarfLocList *>*/ *loc_table, int addr_size);
RZ_API void rz_core_bin_dwarf_print_aranges(RzList /*<RzBinDwarfARangeSet *>*/ *aranges);
RZ_API void rz_core_bin_dwarf_print_line_units(RzList /*<RzBinDwarfLineUnit *>*/ *lines);

View file

@ -82,9 +82,9 @@ RZ_API void rz_diff_free(RZ_NULLABLE RzDiff *diff);
RZ_API RZ_BORROW const void *rz_diff_get_a(RZ_NONNULL RzDiff *diff);
RZ_API RZ_BORROW const void *rz_diff_get_b(RZ_NONNULL RzDiff *diff);
RZ_API RZ_OWN RzList /*<RzDiffMatch>*/ *rz_diff_matches_new(RZ_NONNULL RzDiff *diff);
RZ_API RZ_OWN RzList /*<RzDiffOp>*/ *rz_diff_opcodes_new(RZ_NONNULL RzDiff *diff);
RZ_API RZ_OWN RzList /*<RzList<RzDiffOp>>*/ *rz_diff_opcodes_grouped_new(RZ_NONNULL RzDiff *diff, ut32 n_groups);
RZ_API RZ_OWN RzList /*<RzDiffMatch *>*/ *rz_diff_matches_new(RZ_NONNULL RzDiff *diff);
RZ_API RZ_OWN RzList /*<RzDiffOp *>*/ *rz_diff_opcodes_new(RZ_NONNULL RzDiff *diff);
RZ_API RZ_OWN RzList /*<RzList<RzDiffOp *> *>*/ *rz_diff_opcodes_grouped_new(RZ_NONNULL RzDiff *diff, ut32 n_groups);
RZ_API bool rz_diff_ratio(RZ_NONNULL RzDiff *diff, RZ_NONNULL double *result);
RZ_API bool rz_diff_sizes_ratio(RZ_NONNULL RzDiff *diff, RZ_NONNULL double *result);

View file

@ -258,7 +258,7 @@ RZ_API void rz_sign_sigdb_free(RzSigDb *db);
RZ_API RZ_OWN RzSigDb *rz_sign_sigdb_load_database(RZ_NONNULL const char *sigdb_path, bool with_details);
RZ_API bool rz_sign_sigdb_add_entry(RZ_NONNULL RzSigDb *db, RZ_NONNULL const RzSigDBEntry *entry);
RZ_API bool rz_sign_sigdb_merge(RZ_NONNULL RzSigDb *db, RZ_NONNULL RzSigDb *db2);
RZ_API RZ_OWN RzList /* RzSigDBEntry* */ *rz_sign_sigdb_list(RZ_NONNULL const RzSigDb *db);
RZ_API RZ_OWN RzList /*<RzSigDBEntry *>*/ *rz_sign_sigdb_list(RZ_NONNULL const RzSigDb *db);
#ifdef __cplusplus
}

View file

@ -59,7 +59,7 @@ RZ_API RZ_BORROW const RzHashPlugin *rz_hash_plugin_by_name(RZ_NONNULL RzHash *r
RZ_API RZ_OWN RzHashCfg *rz_hash_cfg_new(RZ_NONNULL RzHash *rh);
RZ_API RZ_OWN RzHashCfg *rz_hash_cfg_new_with_algo(RZ_NONNULL RzHash *rh, RZ_NONNULL const char *name, RZ_NULLABLE const ut8 *key, ut64 key_size);
#define rz_hash_cfg_new_with_algo2(rh, name) rz_hash_cfg_new_with_algo(rh, name, NULL, 0);
RZ_API void rz_hash_cfg_free(RZ_NULLABLE RzHashCfg *md);
RZ_API void rz_hash_cfg_free(RZ_NONNULL RzHashCfg *md);
RZ_API bool rz_hash_cfg_configure(RZ_NONNULL RzHashCfg *md, RZ_NONNULL const char *name);
RZ_API bool rz_hash_cfg_hmac(RZ_NONNULL RzHashCfg *md, RZ_NONNULL const ut8 *key, ut64 key_size);

View file

@ -16,10 +16,10 @@ typedef struct rz_il_bool_t {
} RzILBool;
RZ_API RzILBool *rz_il_bool_new(bool true_or_false);
RZ_API RzILBool *rz_il_bool_and(RzILBool *a, RzILBool *b);
RZ_API RzILBool *rz_il_bool_or(RzILBool *a, RzILBool *b);
RZ_API RzILBool *rz_il_bool_xor(RzILBool *a, RzILBool *b);
RZ_API RzILBool *rz_il_bool_not(RzILBool *a);
RZ_API RzILBool *rz_il_bool_and(RZ_NONNULL RzILBool *a, RZ_NONNULL RzILBool *b);
RZ_API RzILBool *rz_il_bool_or(RZ_NONNULL RzILBool *a, RZ_NONNULL RzILBool *b);
RZ_API RzILBool *rz_il_bool_xor(RZ_NONNULL RzILBool *a, RZ_NONNULL RzILBool *b);
RZ_API RzILBool *rz_il_bool_not(RZ_NONNULL RzILBool *a);
RZ_API void rz_il_bool_free(RzILBool *bool_var);
#ifdef __cplusplus

View file

@ -30,7 +30,7 @@ typedef struct rz_il_effect_label_t {
RzILEffectLabelType type; ///< type of label
} RzILEffectLabel;
RZ_API RzILEffectLabel *rz_il_effect_label_new(const char *name, RzILEffectLabelType type);
RZ_API RzILEffectLabel *rz_il_effect_label_new(RZ_NONNULL const char *name, RzILEffectLabelType type);
RZ_API void rz_il_effect_label_free(RzILEffectLabel *lbl);
RZ_API RzILEffectLabel *rz_il_effect_label_dup(RZ_NONNULL RzILEffectLabel *lbl);

View file

@ -40,7 +40,7 @@ RZ_API RZ_BORROW RzILVar *rz_il_var_set_create_var(RzILVarSet *vs, const char *n
RZ_API RZ_OWN RZ_NULLABLE RzILVal *rz_il_var_set_remove_var(RzILVarSet *vs, const char *name);
RZ_API bool rz_il_var_set_bind(RzILVarSet *vs, const char *name, RZ_OWN RzILVal *val);
RZ_API RZ_BORROW RzILVar *rz_il_var_set_get(RzILVarSet *vs, const char *name);
RZ_API RZ_OWN RzPVector /* <RzILVar> */ *rz_il_var_set_get_all(RzILVarSet *vs);
RZ_API RZ_OWN RzPVector /*<RzILVar *>*/ *rz_il_var_set_get_all(RzILVarSet *vs);
RZ_API RZ_BORROW RzILVal *rz_il_var_set_get_value(RzILVarSet *vs, const char *name);
typedef enum {

View file

@ -35,7 +35,7 @@ RZ_API void rz_il_validate_global_context_free(RzILValidateGlobalContext *ctx);
RZ_API bool rz_il_validate_pure(RZ_NULLABLE RzILOpPure *op, RZ_NONNULL RzILValidateGlobalContext *ctx,
RZ_NULLABLE RZ_OUT RzILSortPure *sort_out, RZ_NULLABLE RZ_OUT RzILValidateReport *report_out);
RZ_API bool rz_il_validate_effect(RZ_NULLABLE RzILOpEffect *op, RZ_NONNULL RzILValidateGlobalContext *ctx,
RZ_NULLABLE RZ_OUT HtPP /* <const char *, RzILSortPure *> */ **local_var_sorts_out,
RZ_NULLABLE RZ_OUT HtPP /*<const char *, RzILSortPure *>*/ **local_var_sorts_out,
RZ_NULLABLE RZ_OUT RzILTypeEffect *type_out,
RZ_NULLABLE RZ_OUT RzILValidateReport *report_out);

View file

@ -87,7 +87,7 @@ typedef RZ_NULLABLE RzILVal *RzILLocalPurePrev;
RZ_API RzILLocalPurePrev rz_il_vm_push_local_pure_var(RZ_NONNULL RzILVM *vm, RZ_NONNULL const char *name, RzILVal *val);
RZ_API void rz_il_vm_pop_local_pure_var(RZ_NONNULL RzILVM *vm, RZ_NONNULL const char *name, RzILLocalPurePrev prev);
RZ_API RZ_BORROW RzILVar *rz_il_vm_get_var(RZ_NONNULL RzILVM *vm, RzILVarKind kind, const char *name);
RZ_API RZ_OWN RzPVector /* <RzILVar> */ *rz_il_vm_get_all_vars(RZ_NONNULL RzILVM *vm, RzILVarKind kind);
RZ_API RZ_OWN RzPVector /*<RzILVar *>*/ *rz_il_vm_get_all_vars(RZ_NONNULL RzILVM *vm, RzILVarKind kind);
RZ_API RZ_BORROW RzILVal *rz_il_vm_get_var_value(RZ_NONNULL RzILVM *vm, RzILVarKind kind, const char *name);
// Evaluation (Emulation)

View file

@ -217,7 +217,7 @@ RZ_API RzRegFlags *rz_reg_cond_retrieve(RzReg *r, RzRegFlags *);
RZ_API int rz_reg_cond(RzReg *r, int type);
/* bitvector, for everything */
RZ_API RzBitVector *rz_reg_get_bv(RzReg *reg, RzRegItem *item);
RZ_API RzBitVector *rz_reg_get_bv(RZ_NONNULL RzReg *reg, RZ_NONNULL RzRegItem *item);
RZ_API bool rz_reg_set_bv(RZ_NONNULL RzReg *reg, RZ_NONNULL RzRegItem *item, RZ_NONNULL const RzBitVector *bv);
/* integer value 8-64 bits */
@ -267,7 +267,7 @@ RZ_API const char *rz_reg_cond_to_string(int n);
RZ_API int rz_reg_cond_from_string(const char *str);
RZ_API void rz_reg_arena_shrink(RzReg *reg);
RZ_API RZ_OWN RzList *rz_reg_filter_items_covered(RZ_BORROW RZ_NONNULL const RzList /* <RzRegItem> */ *regs);
RZ_API RZ_OWN RzList *rz_reg_filter_items_covered(RZ_BORROW RZ_NONNULL const RzList /*<RzRegItem *>*/ *regs);
#ifdef __cplusplus
}

View file

@ -65,15 +65,15 @@ RZ_API void rz_th_pool_free(RZ_NULLABLE RzThreadPool *pool);
RZ_API bool rz_th_pool_add_thread(RZ_NONNULL RzThreadPool *pool, RZ_NONNULL RzThread *thread);
RZ_API RZ_BORROW RzThread *rz_th_pool_get_thread(RZ_NONNULL RzThreadPool *pool, size_t index);
RZ_API bool rz_th_pool_wait(RZ_NONNULL RzThreadPool *pool);
RZ_API size_t rz_th_pool_size(RZ_NULLABLE RzThreadPool *pool);
RZ_API size_t rz_th_pool_size(RZ_NONNULL RzThreadPool *pool);
RZ_API RZ_OWN RzThreadQueue *rz_th_queue_new(size_t max_size, RZ_NULLABLE RzListFree qfree);
RZ_API void rz_th_queue_free(RZ_NULLABLE RzThreadQueue *queue);
RZ_API bool rz_th_queue_push(RZ_NONNULL RzThreadQueue *queue, RZ_NONNULL void *user, bool tail);
RZ_API RZ_OWN void *rz_th_queue_pop(RZ_NONNULL RzThreadQueue *queue, bool tail);
RZ_API RZ_OWN void *rz_th_queue_wait_pop(RZ_NONNULL RzThreadQueue *queue, bool tail);
RZ_API bool rz_th_queue_is_empty(RZ_NULLABLE RzThreadQueue *queue);
RZ_API bool rz_th_queue_is_full(RZ_NULLABLE RzThreadQueue *queue);
RZ_API bool rz_th_queue_is_empty(RZ_NONNULL RzThreadQueue *queue);
RZ_API bool rz_th_queue_is_full(RZ_NONNULL RzThreadQueue *queue);
RZ_API RZ_OWN RzAtomicBool *rz_atomic_bool_new(bool value);
RZ_API void rz_atomic_bool_free(RZ_NULLABLE RzAtomicBool *tbool);

View file

@ -260,11 +260,11 @@ RZ_API RZ_BORROW RzBaseType *rz_type_db_get_compound_type(const RzTypeDB *typedb
RZ_API void rz_type_db_save_base_type(const RzTypeDB *typedb, const RzBaseType *type);
RZ_API bool rz_type_db_delete_base_type(RzTypeDB *typedb, RZ_NONNULL RzBaseType *type);
RZ_API RZ_OWN RzList /* RzBaseType */ *rz_type_db_get_base_types_of_kind(const RzTypeDB *typedb, RzBaseTypeKind kind);
RZ_API RZ_OWN RzList /* RzBaseType */ *rz_type_db_get_base_types(const RzTypeDB *typedb);
RZ_API RZ_OWN RzList /*<RzBaseType *>*/ *rz_type_db_get_base_types_of_kind(const RzTypeDB *typedb, RzBaseTypeKind kind);
RZ_API RZ_OWN RzList /*<RzBaseType *>*/ *rz_type_db_get_base_types(const RzTypeDB *typedb);
RZ_API RZ_OWN char *rz_type_db_base_type_as_string(const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *btype);
RZ_API RZ_OWN char *rz_type_db_base_type_as_pretty_string(const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *btype, unsigned int opts, int unfold_level);
RZ_API RZ_OWN char *rz_type_db_base_type_as_pretty_string(RZ_NONNULL const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *btype, unsigned int opts, int unfold_level);
RZ_API bool rz_type_db_edit_base_type(RzTypeDB *typedb, RZ_NONNULL const char *name, RZ_NONNULL const char *typestr);
// Compound types
@ -276,9 +276,9 @@ RZ_API RZ_OWN char *rz_type_as_string(const RzTypeDB *typedb, RZ_NONNULL const R
RZ_API RZ_OWN char *rz_type_declaration_as_string(const RzTypeDB *typedb, RZ_NONNULL const RzType *type);
RZ_API RZ_OWN char *rz_type_identifier_declaration_as_string(const RzTypeDB *typedb, RZ_NONNULL const RzType *type, RZ_NONNULL const char *identifier);
RZ_API RZ_OWN char *rz_type_as_pretty_string(const RzTypeDB *typedb, RZ_NONNULL const RzType *type, RZ_NULLABLE const char *identifier, unsigned int opts, int unfold_level);
RZ_API void rz_type_free(RzType *type);
RZ_API void rz_type_free(RZ_NULLABLE RzType *type);
RZ_API bool rz_type_exists(RzTypeDB *typedb, RZ_NONNULL const char *name);
RZ_API int rz_type_kind(RzTypeDB *typedb, const char *name);
RZ_API int rz_type_kind(RzTypeDB *typedb, RZ_NONNULL const char *name);
// Type classes
RZ_API RZ_BORROW const char *rz_type_typeclass_as_string(RzTypeTypeclass typeclass);
@ -303,8 +303,8 @@ RZ_API RZ_OWN RzBaseType *rz_type_typeclass_get_default_sized(const RzTypeDB *ty
RZ_API RZ_OWN RzTypePath *rz_type_path_new(RZ_BORROW RZ_NONNULL RzType *type, RZ_OWN RZ_NONNULL char *path);
RZ_API void rz_type_path_free(RZ_NULLABLE RzTypePath *tpath);
RZ_API st64 rz_type_offset_by_path(const RzTypeDB *typedb, RZ_NONNULL const char *path);
RZ_API RZ_OWN RzList /* RzTypePath */ *rz_type_path_by_offset(const RzTypeDB *typedb, RzBaseType *btype, ut64 offset);
RZ_API RZ_OWN RzList /* RzTypePath */ *rz_type_db_get_by_offset(const RzTypeDB *typedb, ut64 offset);
RZ_API RZ_OWN RzList /*<RzTypePath *>*/ *rz_type_path_by_offset(const RzTypeDB *typedb, RzBaseType *btype, ut64 offset);
RZ_API RZ_OWN RzList /*<RzTypePath *>*/ *rz_type_db_get_by_offset(const RzTypeDB *typedb, ut64 offset);
RZ_API ut64 rz_type_db_struct_member_packed_offset(RZ_NONNULL const RzTypeDB *typedb, RZ_NONNULL const char *name, RZ_NONNULL const char *member);
RZ_API ut64 rz_type_db_struct_member_offset(RZ_NONNULL const RzTypeDB *typedb, RZ_NONNULL const char *name, RZ_NONNULL const char *member);
@ -312,8 +312,8 @@ RZ_API ut64 rz_type_db_struct_member_offset(RZ_NONNULL const RzTypeDB *typedb, R
RZ_API RZ_OWN RzTypeParser *rz_type_parser_new(void);
RZ_API RZ_OWN RzTypeParser *rz_type_parser_init(HtPP *types, HtPP *callables);
RZ_API void rz_type_parser_free(RzTypeParser *parser);
RZ_API void rz_type_parser_free_purge(RzTypeParser *parser);
RZ_API void rz_type_parser_free(RZ_NONNULL RzTypeParser *parser);
RZ_API void rz_type_parser_free_purge(RZ_NONNULL RzTypeParser *parser);
RZ_API int rz_type_parse_string_stateless(RzTypeParser *parser, const char *code, char **error_msg);
RZ_API int rz_type_parse_file_stateless(RzTypeParser *parser, const char *path, const char *dir, char **error_msg);
@ -328,15 +328,15 @@ RZ_API void rz_type_parse_reset(RzTypeDB *typedb);
// Type-specific APIs
RZ_API RzBaseType *rz_type_db_get_enum(const RzTypeDB *typedb, const char *name);
RZ_API RzBaseType *rz_type_db_get_union(const RzTypeDB *typedb, const char *name);
RZ_API RzBaseType *rz_type_db_get_struct(const RzTypeDB *typedb, const char *name);
RZ_API RzBaseType *rz_type_db_get_enum(const RzTypeDB *typedb, RZ_NONNULL const char *name);
RZ_API RzBaseType *rz_type_db_get_union(const RzTypeDB *typedb, RZ_NONNULL const char *name);
RZ_API RzBaseType *rz_type_db_get_struct(const RzTypeDB *typedb, RZ_NONNULL const char *name);
RZ_API RzBaseType *rz_type_db_get_typedef(const RzTypeDB *typedb, RZ_NONNULL const char *name);
RZ_API int rz_type_db_enum_member_by_name(const RzTypeDB *typedb, const char *name, const char *member);
RZ_API RZ_BORROW const char *rz_type_db_enum_member_by_val(const RzTypeDB *typedb, const char *name, ut64 val);
RZ_API int rz_type_db_enum_member_by_name(const RzTypeDB *typedb, RZ_NONNULL const char *name, const char *member);
RZ_API RZ_BORROW const char *rz_type_db_enum_member_by_val(const RzTypeDB *typedb, RZ_NONNULL const char *name, ut64 val);
RZ_API RZ_OWN RzList *rz_type_db_find_enums_by_val(const RzTypeDB *typedb, ut64 val);
RZ_API char *rz_type_db_enum_get_bitfield(const RzTypeDB *typedb, const char *name, ut64 val);
RZ_API RZ_OWN char *rz_type_db_enum_get_bitfield(const RzTypeDB *typedb, RZ_NONNULL const char *name, ut64 val);
// Type size calculation
RZ_API ut64 rz_type_db_atomic_bitsize(const RzTypeDB *typedb, RZ_NONNULL RzBaseType *btype);
@ -383,7 +383,7 @@ RZ_API void rz_type_db_format_delete(RzTypeDB *typedb, const char *name);
RZ_API void rz_type_db_format_purge(RzTypeDB *typedb);
RZ_API RZ_OWN char *rz_base_type_as_format(const RzTypeDB *typedb, RZ_NONNULL RzBaseType *type);
RZ_API RZ_OWN char *rz_type_format(const RzTypeDB *typedb, const char *type);
RZ_API RZ_OWN char *rz_type_format(RZ_NONNULL const RzTypeDB *typedb, RZ_NONNULL const char *type);
RZ_API int rz_type_format_struct_size(const RzTypeDB *typedb, const char *f, int mode, int n);
RZ_API RZ_OWN char *rz_type_format_data(const RzTypeDB *t, RzPrint *p, ut64 seek, const ut8 *b, const int len,
const char *formatname, int mode, const char *setval, char *ofield);
@ -432,11 +432,11 @@ RZ_API RZ_OWN RzList *rz_type_function_names(RzTypeDB *typedb);
RZ_API RZ_OWN RzList *rz_type_noreturn_function_names(RzTypeDB *typedb);
// Listing API
RZ_API RzList *rz_type_db_enum_names(RzTypeDB *typedb);
RZ_API RzList *rz_type_db_struct_names(RzTypeDB *typedb);
RZ_API RzList *rz_type_db_union_names(RzTypeDB *typedb);
RZ_API RzList *rz_type_db_typedef_names(RzTypeDB *typedb);
RZ_API RzList *rz_type_db_all(RzTypeDB *typedb);
RZ_API RZ_OWN RzList *rz_type_db_enum_names(RzTypeDB *typedb);
RZ_API RZ_OWN RzList *rz_type_db_struct_names(RzTypeDB *typedb);
RZ_API RZ_OWN RzList *rz_type_db_union_names(RzTypeDB *typedb);
RZ_API RZ_OWN RzList *rz_type_db_typedef_names(RzTypeDB *typedb);
RZ_API RZ_OWN RzList *rz_type_db_all(RzTypeDB *typedb);
// Serialization API
RZ_API void rz_serialize_types_save(RZ_NONNULL Sdb *db, RZ_NONNULL const RzTypeDB *typedb);

View file

@ -95,7 +95,7 @@ RZ_API void rz_bv_set_from_bytes_le(RZ_NONNULL RzBitVector *bv, RZ_IN RZ_NONNULL
RZ_API void rz_bv_set_from_bytes_be(RZ_NONNULL RzBitVector *bv, RZ_IN RZ_NONNULL const ut8 *buf, ut32 bit_offset, ut32 size);
RZ_API void rz_bv_set_to_bytes_le(RZ_NONNULL const RzBitVector *bv, RZ_OUT RZ_NONNULL ut8 *buf);
RZ_API void rz_bv_set_to_bytes_be(RZ_NONNULL const RzBitVector *bv, RZ_OUT RZ_NONNULL ut8 *buf);
RZ_API char *rz_bv_as_string(RZ_NONNULL RzBitVector *bv);
RZ_API RZ_OWN char *rz_bv_as_string(RZ_NONNULL RzBitVector *bv);
RZ_API RZ_OWN char *rz_bv_as_hex_string(RZ_NONNULL RzBitVector *bv, bool pad);
RZ_API ut32 rz_bv_len(RZ_NONNULL const RzBitVector *bv);

View file

@ -13,7 +13,7 @@ extern "C" {
// For information about the algorithm, see Joe Sawada and Frank Ruskey, "An
// Efficient Algorithm for Generating Necklaces with Fixed Density"
RZ_API char *rz_debruijn_pattern(int size, int start, const char *charset);
RZ_API RZ_OWN char *rz_debruijn_pattern(int size, int start, const char *charset);
RZ_API int rz_debruijn_offset(int start, const char *charset, ut64 value, bool is_big_endian);
#ifdef __cplusplus

View file

@ -67,7 +67,7 @@ RZ_API bool rz_file_fexists(const char *fmt, ...) RZ_PRINTF_CHECK(1, 2);
RZ_API char *rz_file_slurp_line(const char *file, int line, int context);
RZ_API char *rz_file_slurp_lines(const char *file, int line, int count);
RZ_API RZ_OWN char *rz_file_slurp_lines_from_bottom(const char *file, int line);
RZ_API int rz_file_mkstemp(const char *prefix, char **oname);
RZ_API int rz_file_mkstemp(RZ_NULLABLE const char *prefix, char **oname);
RZ_API char *rz_file_tmpdir(void);
RZ_API char *rz_file_readlink(const char *path);
RZ_API bool rz_file_copy(const char *src, const char *dst);

View file

@ -37,7 +37,7 @@ RZ_API RzGraphNode *rz_graph_add_node_info(RzGraph *graph, const char *title, co
* @param node_properties List node styling attributes. Can be set to NULL.
* @param edge_properties List edge styling attributes. Can be set to NULL.
*/
RZ_API char *rz_graph_drawable_to_dot(RzGraph /*RzGraphNodeInfo*/ *graph, const char *node_properties, const char *edge_properties);
RZ_API char *rz_graph_drawable_to_dot(RzGraph /*<RzGraphNodeInfo *>*/ *graph, const char *node_properties, const char *edge_properties);
/**
* @brief Convert graph to JSON.
*
@ -45,7 +45,7 @@ RZ_API char *rz_graph_drawable_to_dot(RzGraph /*RzGraphNodeInfo*/ *graph, const
* @param[out] pj Json output structure. Can be used to include the resulting JSON value inside bigger JSON.
* @param[in] use_offset Set this to true if graph uses \ref RzGraphNodeInfo::offset offset field.
*/
RZ_API void rz_graph_drawable_to_json(RzGraph /*RzGraphNodeInfo*/ *graph, PJ *pj, bool use_offset);
RZ_API void rz_graph_drawable_to_json(RzGraph /*<RzGraphNodeInfo *>*/ *graph, PJ *pj, bool use_offset);
#ifdef __cplusplus
}

View file

@ -7,7 +7,7 @@
extern "C" {
#endif
RZ_API void rz_path_set_prefix(RZ_NULLABLE const char *path);
RZ_API void rz_path_set_prefix(RZ_NONNULL const char *path);
RZ_API RZ_OWN char *rz_path_prefix(RZ_NULLABLE const char *path);
RZ_API RZ_OWN char *rz_path_incdir(void);
RZ_API RZ_OWN char *rz_path_bindir(void);

View file

@ -18,7 +18,7 @@ typedef struct {
#define RZ_STRBUF_SAFEGET(sb) (rz_strbuf_get(sb) ? rz_strbuf_get(sb) : "")
RZ_API RzStrBuf *rz_strbuf_new(const char *s);
RZ_API const char *rz_strbuf_set(RzStrBuf *sb, const char *s); // return = the string or NULL on fail
RZ_API bool rz_strbuf_slice(RzStrBuf *sb, size_t from, size_t len);
RZ_API bool rz_strbuf_slice(RZ_NONNULL RzStrBuf *sb, size_t from, size_t len);
RZ_API bool rz_strbuf_setbin(RzStrBuf *sb, const ut8 *s, size_t len);
RZ_API ut8 *rz_strbuf_getbin(RzStrBuf *sb, int *len);
RZ_API const char *rz_strbuf_setf(RzStrBuf *sb, const char *fmt, ...) RZ_PRINTF_CHECK(2, 3); // return = the string or NULL on fail

Some files were not shown because too many files have changed in this diff Show more