Clean up headers (#2719)
* Remove duplicate declarations * Remove undefined functions
This commit is contained in:
parent
6903d6ab98
commit
e7f85fd409
60 changed files with 80 additions and 172 deletions
|
|
@ -2854,8 +2854,6 @@ RZ_API int rz_core_prompt(RzCore *r, int sync) {
|
|||
return true;
|
||||
}
|
||||
|
||||
extern void rz_core_echo(RzCore *core, const char *input);
|
||||
|
||||
RZ_API int rz_core_prompt_exec(RzCore *r) {
|
||||
int ret = rz_core_cmd(r, r->cmdqueue, true);
|
||||
r->rc = r->num->value;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ rz_util_files = [
|
|||
'rz_util/rz_path.h',
|
||||
'rz_util/rz_pj.h',
|
||||
'rz_util/rz_pkcs7.h',
|
||||
'rz_util/rz_pool.h',
|
||||
'rz_util/rz_print.h',
|
||||
'rz_util/rz_protobuf.h',
|
||||
'rz_util/rz_punycode.h',
|
||||
|
|
|
|||
|
|
@ -68,8 +68,6 @@ typedef struct rz_analysis_range_t {
|
|||
RBNode rb;
|
||||
} RzAnalysisRange;
|
||||
|
||||
#define RZ_ANALYSIS_GET_OFFSET(x, y, z) \
|
||||
(x && x->binb.bin && x->binb.get_offset) ? x->binb.get_offset(x->binb.bin, y, z) : -1
|
||||
enum {
|
||||
RZ_ANALYSIS_DATA_TYPE_NULL = 0,
|
||||
RZ_ANALYSIS_DATA_TYPE_UNKNOWN = 1,
|
||||
|
|
@ -203,8 +201,6 @@ enum {
|
|||
|
||||
#define RZ_ANALYSIS_DIFF_THRESHOLD (0.5)
|
||||
|
||||
#define RzAnalysisBlock struct rz_analysis_bb_t
|
||||
|
||||
enum {
|
||||
RZ_ANALYSIS_DIFF_TYPE_NULL = 0,
|
||||
RZ_ANALYSIS_DIFF_TYPE_MATCH = 'm',
|
||||
|
|
@ -892,7 +888,6 @@ typedef struct rz_analysis_bb_t {
|
|||
RzList *fcns;
|
||||
RzAnalysis *analysis;
|
||||
int ref;
|
||||
#undef RzAnalysisBlock
|
||||
} RzAnalysisBlock;
|
||||
|
||||
typedef struct rz_analysis_task_item {
|
||||
|
|
@ -1278,27 +1273,12 @@ typedef struct rz_analysis_plugin_t {
|
|||
|
||||
} RzAnalysisPlugin;
|
||||
|
||||
/*----------------------------------------------------------------------------------------------*/
|
||||
int *(rz_analysis_compare)(RzAnalysisFunction, RzAnalysisFunction);
|
||||
/*----------------------------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef RZ_API
|
||||
/* --------- */ /* REFACTOR */ /* ---------- */
|
||||
RZ_API RzListRange *rz_listrange_new(void);
|
||||
RZ_API void rz_listrange_free(RzListRange *s);
|
||||
RZ_API void rz_listrange_add(RzListRange *s, RzAnalysisFunction *f);
|
||||
RZ_API void rz_listrange_del(RzListRange *s, RzAnalysisFunction *f);
|
||||
RZ_API void rz_listrange_resize(RzListRange *s, RzAnalysisFunction *f, int newsize);
|
||||
RZ_API RzAnalysisFunction *rz_listrange_find_in_range(RzListRange *s, ut64 addr);
|
||||
RZ_API RzAnalysisFunction *rz_listrange_find_root(RzListRange *s, ut64 addr);
|
||||
/* --------- */ /* REFACTOR */ /* ---------- */
|
||||
/* type.c */
|
||||
RZ_API RzAnalysisType *rz_analysis_type_new(void);
|
||||
RZ_API void rz_analysis_type_add(RzAnalysis *l, RzAnalysisType *t);
|
||||
RZ_API RzAnalysisType *rz_analysis_type_find(RzAnalysis *a, const char *name);
|
||||
RZ_API void rz_analysis_type_list(RzAnalysis *a, short category, short enabled);
|
||||
RZ_API const char *rz_analysis_datatype_to_string(RzAnalysisDataType t);
|
||||
RZ_API RzAnalysisType *rz_analysis_str_to_type(RzAnalysis *a, const char *s);
|
||||
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);
|
||||
|
|
@ -1306,8 +1286,6 @@ RZ_API int rz_analysis_optype_from_string(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_hint(RzAnalysisOp *op, RzAnalysisHint *hint);
|
||||
RZ_API RzAnalysisType *rz_analysis_type_free(RzAnalysisType *t);
|
||||
RZ_API RzAnalysisType *rz_analysis_type_loadfile(RzAnalysis *a, const char *path);
|
||||
|
||||
/* block.c */
|
||||
typedef bool (*RzAnalysisBlockCb)(RzAnalysisBlock *block, void *user);
|
||||
|
|
@ -1653,12 +1631,10 @@ RZ_API int rz_analysis_run_tasks(RZ_NONNULL RzVector *tasks);
|
|||
|
||||
#define RZ_ANALYSIS_FCN_VARKIND_LOCAL 'v'
|
||||
|
||||
RZ_API int rz_analysis_fcn_var_del_byindex(RzAnalysis *a, ut64 fna, char kind, int scope, ut32 idx);
|
||||
/* args */
|
||||
RZ_API int rz_analysis_var_count(RzAnalysis *a, RzAnalysisFunction *fcn, int kind, int type);
|
||||
|
||||
/* vars // globals. not here */
|
||||
RZ_API bool rz_analysis_var_display(RzAnalysis *analysis, RzAnalysisVar *var);
|
||||
|
||||
RZ_API int rz_analysis_function_complexity(RzAnalysisFunction *fcn);
|
||||
RZ_API int rz_analysis_function_loops(RzAnalysisFunction *fcn);
|
||||
|
|
@ -1672,7 +1648,6 @@ RZ_API bool rz_analysis_function_set_type_str(RzAnalysis *a, RZ_NONNULL RzAnalys
|
|||
RZ_API int rz_analysis_fcn_count(RzAnalysis *a, ut64 from, ut64 to);
|
||||
RZ_API RzAnalysisBlock *rz_analysis_fcn_bbget_in(const RzAnalysis *analysis, RzAnalysisFunction *fcn, ut64 addr);
|
||||
RZ_API RzAnalysisBlock *rz_analysis_fcn_bbget_at(RzAnalysis *analysis, RzAnalysisFunction *fcn, ut64 addr);
|
||||
RZ_API bool rz_analysis_fcn_bbadd(RzAnalysisFunction *fcn, RzAnalysisBlock *bb);
|
||||
RZ_API int rz_analysis_function_resize(RzAnalysisFunction *fcn, int newsize);
|
||||
RZ_API bool rz_analysis_function_purity(RzAnalysisFunction *fcn);
|
||||
|
||||
|
|
@ -1770,7 +1745,6 @@ RZ_API RZ_BORROW RzType *rz_analysis_type_link_at(RzAnalysis *analysis, ut64 add
|
|||
RZ_API bool rz_analysis_type_set_link(RzAnalysis *analysis, RZ_BORROW RzType *type, ut64 addr);
|
||||
RZ_API bool rz_analysis_type_unlink(RzAnalysis *analysis, ut64 addr);
|
||||
RZ_API bool rz_analysis_type_unlink_all(RzAnalysis *analysis);
|
||||
RZ_API bool rz_analysis_type_link_offset(RzAnalysis *analysis, RZ_BORROW RzType *type, ut64 addr);
|
||||
RZ_API RZ_OWN RzList /* RzType */ *rz_analysis_type_links(RzAnalysis *analysis);
|
||||
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_paths_by_address(RzAnalysis *analysis, ut64 addr);
|
||||
|
|
@ -1796,7 +1770,6 @@ RZ_API int rz_analysis_diff_eval(RzAnalysis *analysis);
|
|||
RZ_API RzAnalysisValue *rz_analysis_value_new(void);
|
||||
RZ_API RzAnalysisValue *rz_analysis_value_copy(RzAnalysisValue *ov);
|
||||
RZ_API RzAnalysisValue *rz_analysis_value_new_from_string(const char *str);
|
||||
RZ_API st64 rz_analysis_value_eval(RzAnalysisValue *value);
|
||||
RZ_API char *rz_analysis_value_to_string(RzAnalysisValue *value);
|
||||
RZ_API ut64 rz_analysis_value_to_ut64(RzAnalysis *analysis, RzAnalysisValue *val);
|
||||
RZ_API int rz_analysis_value_set_ut64(RzAnalysis *analysis, RzAnalysisValue *val, ut64 num);
|
||||
|
|
@ -2074,9 +2047,6 @@ RZ_API bool rz_analysis_rtti_msvc_print_at_vtable(RVTableContext *context, ut64
|
|||
RZ_API void rz_analysis_rtti_msvc_recover_all(RVTableContext *vt_context, RzList *vtables);
|
||||
|
||||
RZ_API char *rz_analysis_rtti_itanium_demangle_class_name(RVTableContext *context, const char *name);
|
||||
RZ_API void rz_analysis_rtti_itanium_print_class_type_info(RVTableContext *context, ut64 addr, int mode);
|
||||
RZ_API void rz_analysis_rtti_itanium_print_si_class_type_info(RVTableContext *context, ut64 addr, int mode);
|
||||
RZ_API void rz_analysis_rtti_itanium_print_vmi_class_type_info(RVTableContext *context, ut64 addr, int mode);
|
||||
RZ_API bool rz_analysis_rtti_itanium_print_at_vtable(RVTableContext *context, ut64 addr, RzOutputMode mode);
|
||||
RZ_API void rz_analysis_rtti_itanium_recover_all(RVTableContext *vt_context, RzList *vtables);
|
||||
|
||||
|
|
@ -2237,8 +2207,6 @@ RZ_API void rz_serialize_analysis_sign_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAna
|
|||
RZ_API bool rz_serialize_analysis_sign_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res);
|
||||
RZ_API void rz_serialize_analysis_imports_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis);
|
||||
RZ_API bool rz_serialize_analysis_imports_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res);
|
||||
RZ_API void rz_serialize_analysis_pin_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis);
|
||||
RZ_API bool rz_serialize_analysis_pin_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res);
|
||||
RZ_API void rz_serialize_analysis_cc_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis);
|
||||
RZ_API bool rz_serialize_analysis_cc_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res);
|
||||
|
||||
|
|
|
|||
|
|
@ -825,7 +825,6 @@ RZ_API void rz_bin_virtual_file_free(RzBinVirtualFile *vfile);
|
|||
RZ_API void rz_bin_map_free(RzBinMap *map);
|
||||
RZ_API RzList *rz_bin_maps_of_file_sections(RZ_NONNULL RzBinFile *binfile);
|
||||
RZ_API RzList *rz_bin_sections_of_maps(RzList /*<RzBinMap>*/ *maps);
|
||||
RZ_API ut64 rz_bin_find_free_base_addr(RzList /*<RzBinMap>*/ *maps, ut64 align);
|
||||
RZ_IPI RzBinSection *rz_bin_section_new(const char *name);
|
||||
RZ_IPI void rz_bin_section_free(RzBinSection *bs);
|
||||
RZ_API RZ_OWN char *rz_bin_section_type_to_string(RzBin *bin, int type);
|
||||
|
|
@ -891,7 +890,6 @@ RZ_API bool rz_bin_plugin_add(RzBin *bin, RzBinPlugin *foo);
|
|||
RZ_API bool rz_bin_xtr_add(RzBin *bin, RzBinXtrPlugin *foo);
|
||||
RZ_API bool rz_bin_ldr_add(RzBin *bin, RzBinLdrPlugin *foo);
|
||||
RZ_API bool rz_bin_list_plugin(RzBin *bin, const char *name, PJ *pj, int json);
|
||||
RZ_API RzBinPlugin *rz_bin_get_binplugin_by_bytes(RzBin *bin, const ut8 *bytes, ut64 sz);
|
||||
RZ_API RzBinPlugin *rz_bin_get_binplugin_by_buffer(RzBin *bin, RzBuffer *buf);
|
||||
RZ_API const RzBinPlugin *rz_bin_plugin_get(RZ_NONNULL RzBin *bin, RZ_NONNULL const char *name);
|
||||
RZ_API const RzBinXtrPlugin *rz_bin_xtrplugin_get(RZ_NONNULL RzBin *bin, RZ_NONNULL const char *name);
|
||||
|
|
@ -929,7 +927,6 @@ RZ_API const RzList *rz_bin_object_get_fields(RZ_NONNULL RzBinObject *obj);
|
|||
RZ_API const RzList *rz_bin_object_get_imports(RZ_NONNULL RzBinObject *obj);
|
||||
RZ_API const RzBinInfo *rz_bin_object_get_info(RZ_NONNULL RzBinObject *obj);
|
||||
RZ_API const RzList *rz_bin_object_get_libs(RZ_NONNULL RzBinObject *obj);
|
||||
RZ_API const RBNode *rz_bin_object_get_relocs(RZ_NONNULL RzBinObject *obj);
|
||||
RZ_API const RzList *rz_bin_object_get_sections_all(RZ_NONNULL RzBinObject *obj);
|
||||
RZ_API RZ_OWN RzList *rz_bin_object_get_sections(RZ_NONNULL RzBinObject *obj);
|
||||
RZ_API RZ_OWN RzList *rz_bin_object_get_segments(RZ_NONNULL RzBinObject *obj);
|
||||
|
|
@ -968,7 +965,6 @@ RZ_API bool rz_bin_file_object_new_from_xtr_data(RzBin *bin, RzBinFile *bf, RzBi
|
|||
|
||||
// RzBinFile.get
|
||||
RZ_API RzBinFile *rz_bin_file_at(RzBin *bin, ut64 addr);
|
||||
RZ_API RzBinFile *rz_bin_file_find_by_object_id(RzBin *bin, ut32 binobj_id);
|
||||
RZ_API RzList *rz_bin_file_get_symbols(RzBinFile *bf);
|
||||
// RzBinFile.add
|
||||
RZ_API RzBinClass *rz_bin_file_add_class(RzBinFile *binfile, const char *name, const char *super, int view);
|
||||
|
|
@ -980,7 +976,6 @@ RZ_API RzBinFile *rz_bin_file_find_by_fd(RzBin *bin, ut32 bin_fd);
|
|||
RZ_API RzBinFile *rz_bin_file_find_by_name(RzBin *bin, const char *name);
|
||||
|
||||
RZ_API bool rz_bin_file_set_cur_binfile(RzBin *bin, RzBinFile *bf);
|
||||
RZ_API bool rz_bin_file_set_cur_by_name(RzBin *bin, const char *name);
|
||||
RZ_API bool rz_bin_file_set_cur_by_fd(RzBin *bin, ut32 bin_fd);
|
||||
RZ_API bool rz_bin_file_set_cur_by_id(RzBin *bin, ut32 bin_id);
|
||||
RZ_API bool rz_bin_file_set_cur_by_name(RzBin *bin, const char *name);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#ifndef RZ_BIN_DWARF_H
|
||||
#define RZ_BIN_DWARF_H
|
||||
|
||||
#include <rz_types.h>
|
||||
#include <rz_bin.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -30,8 +33,8 @@ struct rz_bin_source_line_info_builder_t;
|
|||
#define DW_LNE_set_address 0x02
|
||||
#define DW_LNE_define_file 0x03
|
||||
#define DW_LNE_set_discriminator 0x04 /* DWARF4 */
|
||||
#define DW_LNE_lo_user 0x80
|
||||
#define DW_LNE_hi_user 0xff
|
||||
#define DW_LNE_lo_user 0x80 /* DWARF3 */
|
||||
#define DW_LNE_hi_user 0xff /* DWARF3 */
|
||||
|
||||
/* HP extensions. */
|
||||
#define DW_LNE_HP_negate_is_UV_update 0x11 /* 17 HP */
|
||||
|
|
@ -45,9 +48,6 @@ struct rz_bin_source_line_info_builder_t;
|
|||
#define DW_LNE_HP_negate_front_end_logical 0x19 /* 25 HP */
|
||||
#define DW_LNE_HP_define_proc 0x20 /* 32 HP */
|
||||
|
||||
#define DW_LNE_lo_user 0x80 /* DWARF3 */
|
||||
#define DW_LNE_hi_user 0xff /* DWARF3 */
|
||||
|
||||
/* debug_info tags */
|
||||
// this is not a real dwarf named entry, but I wanted to give it
|
||||
// a name so it's more obvious and readable that it's just a type of entry
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ RZ_LIB_VERSION_HEADER(rz_bp);
|
|||
|
||||
#define RZ_BP_MAXPIDS 10
|
||||
#define RZ_BP_CONT_NORMAL 0
|
||||
#define RZ_BP_CONT_NORMAL 0
|
||||
|
||||
typedef struct rz_bp_arch_t {
|
||||
int bits;
|
||||
|
|
@ -119,7 +118,6 @@ RZ_API int rz_bp_use(RZ_NONNULL RzBreakpoint *bp, RZ_NONNULL const char *name);
|
|||
RZ_API int rz_bp_plugin_del(RzBreakpoint *bp, const char *name);
|
||||
RZ_API void rz_bp_plugin_list(RzBreakpoint *bp);
|
||||
|
||||
RZ_API int rz_bp_in(RzBreakpoint *bp, ut64 addr, int perm);
|
||||
RZ_API int rz_bp_size(RZ_NONNULL RzBreakpoint *bp, int bits);
|
||||
RZ_API int rz_bp_size_at(RZ_NONNULL RzBreakpoint *bp, ut64 addr);
|
||||
|
||||
|
|
@ -145,8 +143,6 @@ RZ_API bool rz_bp_item_set_data(RZ_NONNULL RzBreakpointItem *item, RZ_NULLABLE c
|
|||
RZ_API bool rz_bp_item_set_expr(RZ_NONNULL RzBreakpointItem *item, RZ_NULLABLE const char *expr);
|
||||
RZ_API bool rz_bp_item_set_name(RZ_NONNULL RzBreakpointItem *item, RZ_NULLABLE const char *name);
|
||||
|
||||
RZ_API int rz_bp_add_cond(RzBreakpoint *bp, const char *cond);
|
||||
RZ_API int rz_bp_del_cond(RzBreakpoint *bp, int idx);
|
||||
RZ_API int rz_bp_add_fault(RzBreakpoint *bp, ut64 addr, int size, int perm);
|
||||
|
||||
RZ_API RZ_BORROW RzBreakpointItem *rz_bp_add_sw(RZ_NONNULL RzBreakpoint *bp, ut64 addr, int size, int perm);
|
||||
|
|
@ -165,7 +161,6 @@ RZ_API int rz_bp_traptrace_free_at(RzBreakpoint *bp, ut64 from);
|
|||
RZ_API void rz_bp_traptrace_list(RzBreakpoint *bp);
|
||||
RZ_API int rz_bp_traptrace_at(RzBreakpoint *bp, ut64 from, int len);
|
||||
RZ_API RzList *rz_bp_traptrace_new(void);
|
||||
RZ_API void rz_bp_traptrace_enable(RzBreakpoint *bp, int enable);
|
||||
|
||||
/* watchpoint */
|
||||
RZ_API RZ_BORROW RzBreakpointItem *rz_bp_watch_add(RZ_NONNULL RzBreakpoint *bp, ut64 addr, int size, int hw, int perm);
|
||||
|
|
|
|||
|
|
@ -521,7 +521,6 @@ RZ_API int rz_cmd_set_data(RzCmd *cmd, void *data);
|
|||
RZ_API void rz_cmd_batch_start(RzCmd *cmd);
|
||||
RZ_API void rz_cmd_batch_end(RzCmd *cmd);
|
||||
RZ_API int rz_cmd_add(RzCmd *cmd, const char *command, RzCmdCb callback);
|
||||
RZ_API int rz_core_del(RzCmd *cmd, const char *command);
|
||||
RZ_API int rz_cmd_call(RzCmd *cmd, const char *command);
|
||||
RZ_API RzCmdStatus rz_cmd_call_parsed_args(RzCmd *cmd, RzCmdParsedArgs *args);
|
||||
RZ_API RzCmdDesc *rz_cmd_get_root(RzCmd *cmd);
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@ 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 void rz_config_set_sort_column(char *column);
|
||||
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);
|
||||
|
||||
|
|
|
|||
|
|
@ -807,10 +807,8 @@ RZ_API void rz_cons_canvas_clear(RzConsCanvas *c);
|
|||
RZ_API void rz_cons_canvas_print(RzConsCanvas *c);
|
||||
RZ_API void rz_cons_canvas_print_region(RzConsCanvas *c);
|
||||
RZ_API RZ_OWN char *rz_cons_canvas_to_string(RzConsCanvas *c);
|
||||
RZ_API void rz_cons_canvas_attr(RzConsCanvas *c, const char *attr);
|
||||
RZ_API void rz_cons_canvas_write(RzConsCanvas *c, const char *_s);
|
||||
RZ_API bool rz_cons_canvas_gotoxy(RzConsCanvas *c, int x, int y);
|
||||
RZ_API void rz_cons_canvas_goto_write(RzConsCanvas *c, int x, int y, const char *s);
|
||||
RZ_API void rz_cons_canvas_box(RzConsCanvas *c, int x, int y, int w, int h, const char *color);
|
||||
RZ_API void rz_cons_canvas_line(RzConsCanvas *c, int x, int y, int x2, int y2, RzCanvasLineStyle *style);
|
||||
RZ_API void rz_cons_canvas_line_diagonal(RzConsCanvas *c, int x, int y, int x2, int y2, RzCanvasLineStyle *style);
|
||||
|
|
@ -857,7 +855,6 @@ RZ_API int rz_cons_win_vhprintf(unsigned long hdl, bool vmode, const char *fmt,
|
|||
#endif
|
||||
|
||||
RZ_API void rz_cons_push(void);
|
||||
RZ_API void rz_cons_push_capture(void);
|
||||
RZ_API void rz_cons_pop(void);
|
||||
RZ_API RzConsContext *rz_cons_context_new(RZ_NULLABLE RzConsContext *parent);
|
||||
RZ_API void rz_cons_context_free(RzConsContext *context);
|
||||
|
|
@ -880,8 +877,6 @@ RZ_API void rz_cons_clear_buffer(void);
|
|||
RZ_API void rz_cons_clear00(void);
|
||||
RZ_API void rz_cons_clear_line(int err);
|
||||
RZ_API void rz_cons_fill_line(void);
|
||||
RZ_API void rz_cons_stdout_open(const char *file, int append);
|
||||
RZ_API int rz_cons_stdout_set_fd(int fd);
|
||||
RZ_API void rz_cons_gotoxy(int x, int y);
|
||||
RZ_API int rz_cons_get_cur_line(void);
|
||||
RZ_API void rz_cons_show_cursor(int cursor);
|
||||
|
|
@ -916,8 +911,6 @@ RZ_API void rz_cons_visual_flush(void);
|
|||
RZ_API void rz_cons_visual_write(char *buffer);
|
||||
RZ_API bool rz_cons_is_utf8(void);
|
||||
RZ_API void rz_cons_cmd_help(const char *help[], bool use_color);
|
||||
RZ_API void rz_cons_log_stub(const char *output, const char *funcname, const char *filename,
|
||||
unsigned int lineno, unsigned int level, const char *tag, const char *fmtstr, ...) RZ_PRINTF_CHECK(7, 8);
|
||||
|
||||
/* input */
|
||||
RZ_API int rz_cons_controlz(int ch);
|
||||
|
|
@ -930,7 +923,6 @@ RZ_API int rz_cons_readchar_timeout(ut32 usec);
|
|||
RZ_API int rz_cons_any_key(const char *msg);
|
||||
RZ_API int rz_cons_eof(void);
|
||||
|
||||
RZ_API int rz_cons_palette_init(const unsigned char *pal);
|
||||
RZ_API int rz_cons_pal_set(const char *key, const char *val);
|
||||
RZ_API void rz_cons_pal_update_event(void);
|
||||
RZ_API void rz_cons_pal_free(RzConsContext *ctx);
|
||||
|
|
@ -971,7 +963,6 @@ RZ_API void rz_cons_grep_process(char *grep);
|
|||
RZ_API int rz_cons_grep_line(char *buf, int len); // must be static
|
||||
RZ_API void rz_cons_grepbuf(void);
|
||||
|
||||
RZ_API void rz_cons_rgb(ut8 r, ut8 g, ut8 b, ut8 a);
|
||||
RZ_API void rz_cons_rgb_init(void);
|
||||
RZ_API char *rz_cons_rgb_str_mode(RzConsColorMode mode, char *outstr, size_t sz, const RzColor *rcolor);
|
||||
RZ_API char *rz_cons_rgb_str(char *outstr, size_t sz, const RzColor *rcolor);
|
||||
|
|
@ -1147,8 +1138,6 @@ RZ_API const char *rz_line_readline_cb(RzLineReadCallback cb, void *user);
|
|||
RZ_API int rz_line_hist_load(RZ_NONNULL const char *file);
|
||||
RZ_API int rz_line_hist_add(const char *line);
|
||||
RZ_API int rz_line_hist_save(RZ_NONNULL const char *file);
|
||||
RZ_API int rz_line_hist_label(const char *label, void (*cb)(const char *));
|
||||
RZ_API void rz_line_label_show(void);
|
||||
RZ_API int rz_line_hist_list(void);
|
||||
RZ_API const char *rz_line_hist_get(int n);
|
||||
|
||||
|
|
|
|||
|
|
@ -414,8 +414,6 @@ typedef struct rz_core_item_t {
|
|||
char *fcnname;
|
||||
} RzCoreItem;
|
||||
|
||||
RZ_API void rz_core_item_free(RzCoreItem *ci);
|
||||
|
||||
typedef int (*RzCoreSearchCallback)(RzCore *core, ut64 from, ut8 *buf, int len);
|
||||
|
||||
/**
|
||||
|
|
@ -473,7 +471,6 @@ RZ_API RzCore *rz_core_ncast(ut64 p);
|
|||
RZ_API RzCore *rz_core_cast(void *p);
|
||||
RZ_API bool rz_core_bin_load_structs(RZ_NONNULL RzCore *core, RZ_NONNULL const char *file);
|
||||
RZ_API int rz_core_config_init(RzCore *core);
|
||||
RZ_API bool rz_core_config_eval_and_print(RzCore *core, const char *str, bool many);
|
||||
RZ_API void rz_core_config_print_all(RzConfig *cfg, const char *str, RzCmdStateOutput *state);
|
||||
RZ_API void rz_core_parse_rizinrc(RzCore *r);
|
||||
RZ_API RZ_OWN RzList *rz_core_config_in_space(RZ_NONNULL RzCore *core, RZ_NULLABLE const char *space);
|
||||
|
|
@ -486,9 +483,7 @@ 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 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_cmdf(RzCore *core, const char *fmt, ...) RZ_PRINTF_CHECK(2, 3);
|
||||
RZ_API int rz_core_flush(RzCore *core, const char *cmd);
|
||||
RZ_API int rz_core_cmd0(RzCore *core, const char *cmd);
|
||||
RZ_API void rz_core_cmd_init(RzCore *core);
|
||||
RZ_API int rz_core_cmd_pipe_old(RzCore *core, char *rizin_cmd, char *shell_cmd);
|
||||
RZ_API char *rz_core_cmd_str(RzCore *core, const char *cmd);
|
||||
|
|
@ -715,7 +710,6 @@ RZ_API int rz_core_cmd_buffer(RzCore *core, const char *buf);
|
|||
RZ_API int rz_core_cmdf(RzCore *core, const char *fmt, ...) RZ_PRINTF_CHECK(2, 3);
|
||||
RZ_API int rz_core_cmd0(RzCore *core, const char *cmd);
|
||||
RZ_API RzCmdStatus rz_core_cmd0_rzshell(RzCore *core, const char *cmd);
|
||||
RZ_API char *rz_core_cmd_str(RzCore *core, const char *cmd);
|
||||
RZ_API int rz_core_cmd_foreach(RzCore *core, const char *cmd, char *each);
|
||||
RZ_API int rz_core_cmd_foreach3(RzCore *core, const char *cmd, char *each);
|
||||
RZ_API char *rz_core_op_str(RzCore *core, ut64 addr);
|
||||
|
|
@ -725,7 +719,6 @@ 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 RZ_DEPRECATE bool rz_coret_arg_set(RzCore *core, const char *cc, int num, ut64 val);
|
||||
RZ_API RzList *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);
|
||||
|
|
@ -871,7 +864,6 @@ RZ_API int rz_core_bin_rebase(RzCore *core, ut64 baddr);
|
|||
RZ_API void rz_core_bin_export_info(RzCore *core, int mode);
|
||||
RZ_API bool rz_core_binfiles_print(RzCore *core, RzCmdStateOutput *state);
|
||||
RZ_API bool rz_core_binfiles_delete(RzCore *core, RzBinFile *bf);
|
||||
RZ_API ut64 rz_core_bin_impaddr(RzBin *bin, int va, const char *name);
|
||||
RZ_API RZ_OWN HtPP *rz_core_bin_create_digests(RzCore *core, ut64 paddr, ut64 size, RzList *digests);
|
||||
|
||||
RZ_API void rz_core_bin_print_source_line_sample(RzCore *core, const RzBinSourceLineSample *s, RzCmdStateOutput *state);
|
||||
|
|
@ -889,10 +881,6 @@ RZ_API void rz_core_bin_dwarf_print_loc(HtUP /*<offset, RzBinDwarfLocList*>*/ *l
|
|||
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);
|
||||
|
||||
// XXX - this is kinda hacky, maybe there should be a way to
|
||||
// refresh the bin environment without specific calls?
|
||||
RZ_API int rz_core_pseudo_code(RzCore *core, const char *input);
|
||||
|
||||
/* gdiff.c */
|
||||
RZ_API bool rz_core_gdiff_2_files(RzCore *core1, RzCore *core2);
|
||||
RZ_API bool rz_core_gdiff_function_1_file(RzCore *c, ut64 addr, ut64 addr2);
|
||||
|
|
@ -1146,7 +1134,6 @@ struct rz_core_task_t {
|
|||
|
||||
typedef void (*RzCoreTaskOneShot)(void *);
|
||||
|
||||
RZ_API void rz_core_echo(RzCore *core, const char *msg);
|
||||
RZ_API RzTable *rz_core_table(RzCore *core);
|
||||
|
||||
RZ_API void rz_core_task_scheduler_init(RzCoreTaskScheduler *sched,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_AES_H
|
||||
#define RZ_AES_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_DES_H
|
||||
#define RZ_DES_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#define DES_KEY_SIZE 8
|
||||
#define DES_BLOCK_SIZE 8
|
||||
|
||||
|
|
|
|||
|
|
@ -478,8 +478,6 @@ RZ_API ut64 rz_debug_get_baddr(RzDebug *dbg, const char *file);
|
|||
RZ_API void rz_debug_signal_init(RzDebug *dbg);
|
||||
RZ_API int rz_debug_signal_send(RzDebug *dbg, int num);
|
||||
RZ_API int rz_debug_signal_what(RzDebug *dbg, int num);
|
||||
RZ_API int rz_debug_signal_resolve(RzDebug *dbg, const char *signame);
|
||||
RZ_API const char *rz_debug_signal_resolve_i(RzDebug *dbg, int signum);
|
||||
RZ_API void rz_debug_signal_setup(RzDebug *dbg, int num, int opt);
|
||||
RZ_API int rz_debug_signal_set(RzDebug *dbg, int num, ut64 addr);
|
||||
RZ_API void rz_debug_signal_list(RzDebug *dbg, RzOutputMode mode);
|
||||
|
|
@ -491,7 +489,6 @@ RZ_API int rz_debug_kill_setup(RzDebug *dbg, int sig, int action);
|
|||
|
||||
/* handle.c */
|
||||
RZ_API void rz_debug_plugin_init(RzDebug *dbg);
|
||||
RZ_API int rz_debug_plugin_set(RzDebug *dbg, const char *str);
|
||||
RZ_API bool rz_debug_plugin_add(RzDebug *dbg, RzDebugPlugin *foo);
|
||||
RZ_API bool rz_debug_plugin_set_reg_profile(RzDebug *dbg, const char *str);
|
||||
|
||||
|
|
|
|||
|
|
@ -209,7 +209,6 @@ RZ_API int rz_egg_padding(RzEgg *egg, const char *pad);
|
|||
RZ_API bool rz_egg_assemble(RzEgg *egg);
|
||||
RZ_API bool rz_egg_assemble_asm(RzEgg *egg, char **asm_list);
|
||||
RZ_API void rz_egg_pattern(RzEgg *egg, int size);
|
||||
RZ_API RzBuffer *rz_egg_get_bin(RzEgg *egg);
|
||||
// RZ_API int rz_egg_dump (RzEgg *egg, const char *file) { }
|
||||
RZ_API char *rz_egg_get_source(RzEgg *egg);
|
||||
RZ_API RzBuffer *rz_egg_get_bin(RzEgg *egg);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_ENDIAN_H
|
||||
#define RZ_ENDIAN_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -123,7 +123,6 @@ RZ_API int rz_flag_unset_glob(RzFlag *f, const char *name);
|
|||
RZ_API int rz_flag_rename(RzFlag *f, RzFlagItem *item, const char *name);
|
||||
RZ_API int rz_flag_relocate(RzFlag *f, ut64 off, ut64 off_mask, ut64 to);
|
||||
RZ_API bool rz_flag_move(RzFlag *f, ut64 at, ut64 to);
|
||||
RZ_API const char *rz_flag_color(RzFlag *f, RzFlagItem *it, const char *color);
|
||||
RZ_API int rz_flag_count(RzFlag *f, const char *glob);
|
||||
RZ_API void rz_flag_foreach(RzFlag *f, RzFlagItemCb cb, void *user);
|
||||
RZ_API void rz_flag_foreach_prefix(RzFlag *f, const char *pfx, int pfx_len, RzFlagItemCb cb, void *user);
|
||||
|
|
@ -187,7 +186,6 @@ RZ_API void rz_flag_zone_item_free(void *a);
|
|||
RZ_API bool rz_flag_zone_add(RzFlag *fz, const char *name, ut64 addr);
|
||||
RZ_API bool rz_flag_zone_del(RzFlag *fz, const char *name);
|
||||
RZ_API bool rz_flag_zone_around(RzFlag *fz, ut64 addr, const char **prev, const char **next);
|
||||
RZ_API bool rz_flag_zone_list(RzFlag *fz, int mode);
|
||||
RZ_API bool rz_flag_zone_reset(RzFlag *f);
|
||||
RZ_API RzList *rz_flag_zone_barlist(RzFlag *f, ut64 from, ut64 bsize, int rows);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_HEAP_GLIBC_H
|
||||
#define RZ_HEAP_GLIBC_H
|
||||
|
||||
#include <rz_core.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -334,9 +336,6 @@ RZ_API RzHeapBin *rz_heap_fastbin_content_32(RzCore *core, MallocState *main_are
|
|||
RZ_API RzHeapBin *rz_heap_bin_content_64(RzCore *core, MallocState *main_arena, int bin_num, ut64 m_arena);
|
||||
RZ_API RzHeapBin *rz_heap_bin_content_32(RzCore *core, MallocState *main_arena, int bin_num, ut32 m_arena);
|
||||
|
||||
RZ_API RzList *rz_heap_tcache_list_64(RzCore *core, ut64 m_arena, MallocState *main_arena, bool main_thread_only);
|
||||
RZ_API RzList *rz_heap_tcache_list_32(RzCore *core, ut32 m_arena, MallocState *main_arena, bool main_thread_only);
|
||||
|
||||
RZ_API RzList *rz_heap_chunks_list_wrapper_64(RzCore *core, ut64 m_state);
|
||||
RZ_API RzList *rz_heap_chunks_list_wrapper_32(RzCore *core, ut64 m_state);
|
||||
|
||||
|
|
|
|||
|
|
@ -295,7 +295,6 @@ RZ_API bool rz_io_map_priorize(RzIO *io, ut32 id);
|
|||
RZ_API bool rz_io_map_priorize_for_fd(RzIO *io, int fd);
|
||||
RZ_API void rz_io_map_cleanup(RzIO *io);
|
||||
RZ_API void rz_io_map_fini(RzIO *io);
|
||||
RZ_API bool rz_io_map_is_in_range(RzIOMap *map, ut64 from, ut64 to);
|
||||
RZ_API void rz_io_map_set_name(RzIOMap *map, const char *name);
|
||||
RZ_API void rz_io_map_del_name(RzIOMap *map);
|
||||
RZ_API RzList *rz_io_map_get_for_fd(RzIO *io, int fd);
|
||||
|
|
@ -328,7 +327,6 @@ RZ_API bool rz_io_vread_at_mapped(RzIO *io, ut64 vaddr, ut8 *buf, int len);
|
|||
RZ_API bool rz_io_read_at(RzIO *io, ut64 addr, ut8 *buf, int len);
|
||||
RZ_API bool rz_io_read_at_mapped(RzIO *io, ut64 addr, ut8 *buf, int len);
|
||||
RZ_API int rz_io_nread_at(RzIO *io, ut64 addr, ut8 *buf, int len);
|
||||
RZ_API void rz_io_alprint(RzList *ls);
|
||||
RZ_API bool rz_io_write_at(RzIO *io, ut64 addr, const ut8 *buf, int len);
|
||||
RZ_API bool rz_io_read(RzIO *io, ut8 *buf, int len);
|
||||
RZ_API bool rz_io_write(RzIO *io, ut8 *buf, int len);
|
||||
|
|
@ -346,16 +344,12 @@ RZ_API void rz_io_free(RzIO *io);
|
|||
#define rz_io_bind_init(x) memset(&x, 0, sizeof(x))
|
||||
|
||||
RZ_API bool rz_io_plugin_init(RzIO *io);
|
||||
RZ_API int rz_io_plugin_open(RzIO *io, int fd, RzIOPlugin *plugin);
|
||||
RZ_API int rz_io_plugin_close(RzIO *io, int fd, RzIOPlugin *plugin);
|
||||
RZ_API int rz_io_plugin_generate(RzIO *io);
|
||||
RZ_API bool rz_io_plugin_add(RzIO *io, RZ_BORROW RzIOPlugin *plugin);
|
||||
RZ_API int rz_io_plugin_read(RzIODesc *desc, ut8 *buf, int len);
|
||||
RZ_API int rz_io_plugin_write(RzIODesc *desc, const ut8 *buf, int len);
|
||||
RZ_API int rz_io_plugin_read_at(RzIODesc *desc, ut64 addr, ut8 *buf, int len);
|
||||
RZ_API int rz_io_plugin_write_at(RzIODesc *desc, ut64 addr, const ut8 *buf, int len);
|
||||
RZ_API RzIOPlugin *rz_io_plugin_resolve(RzIO *io, const char *filename, bool many);
|
||||
RZ_API RzIOPlugin *rz_io_plugin_resolve_fd(RzIO *io, int fd);
|
||||
RZ_API RzIOPlugin *rz_io_plugin_get_default(RzIO *io, const char *filename, bool many);
|
||||
|
||||
// desc.c
|
||||
|
|
@ -407,11 +401,6 @@ RZ_API void rz_io_desc_cache_fini(RzIODesc *desc);
|
|||
RZ_API void rz_io_desc_cache_fini_all(RzIO *io);
|
||||
RZ_API RzList *rz_io_desc_cache_list(RzIODesc *desc);
|
||||
|
||||
/* io/buffer.c */
|
||||
RZ_API int rz_io_buffer_read(RzIO *io, ut64 addr, ut8 *buf, int len);
|
||||
RZ_API int rz_io_buffer_load(RzIO *io, ut64 addr, int len);
|
||||
RZ_API void rz_io_buffer_close(RzIO *io);
|
||||
|
||||
/* io/fd.c */
|
||||
RZ_API int rz_io_fd_open(RzIO *io, const char *uri, int flags, int mode);
|
||||
RZ_API bool rz_io_fd_close(RzIO *io, int fd);
|
||||
|
|
|
|||
|
|
@ -54,11 +54,10 @@ RZ_API bool rz_lang_add(RzLang *lang, RzLangPlugin *foo);
|
|||
RZ_API bool rz_lang_use(RzLang *lang, const char *name);
|
||||
RZ_API int rz_lang_run(RzLang *lang, const char *code, int len);
|
||||
RZ_API int rz_lang_run_string(RzLang *lang, const char *code);
|
||||
RZ_API int rz_lang_run_file(RzLang *lang, const char *file);
|
||||
/* TODO: user_ptr must be deprecated */
|
||||
RZ_API void rz_lang_set_user_ptr(RzLang *lang, void *user);
|
||||
RZ_API bool rz_lang_set_argv(RzLang *lang, int argc, char **argv);
|
||||
RZ_API int rz_lang_run(RzLang *lang, const char *code, int len);
|
||||
RZ_API int rz_lang_run_file(RzLang *lang, const char *file);
|
||||
RZ_API int rz_lang_prompt(RzLang *lang);
|
||||
RZ_API void rz_lang_plugin_free(RzLangPlugin *p); // XXX
|
||||
RZ_API RzLangPlugin *rz_lang_get_by_name(RzLang *lang, const char *name);
|
||||
|
|
|
|||
|
|
@ -119,7 +119,6 @@ RZ_API bool rz_lib_add_handler(RzLib *lib, int type, const char *desc, RzLibCall
|
|||
RZ_API bool rz_lib_del_handler(RzLib *lib, int type);
|
||||
RZ_API int rz_lib_close(RzLib *lib, const char *file);
|
||||
|
||||
RZ_API const char *rz_lib_types_get(int idx);
|
||||
RZ_API int rz_lib_types_get_i(const char *str);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ RZ_API RZ_OWN RzList *rz_list_uniq(RZ_NONNULL const RzList *list, RZ_NONNULL RzL
|
|||
RZ_API void rz_list_init(RZ_NONNULL RzList *list);
|
||||
RZ_API void rz_list_delete(RZ_NONNULL RzList *list, RZ_NONNULL RzListIter *iter);
|
||||
RZ_API bool rz_list_delete_data(RZ_NONNULL RzList *list, void *ptr);
|
||||
RZ_API void rz_list_iter_init(RZ_NONNULL RzListIter *iter, RZ_NONNULL RzList *list);
|
||||
RZ_API void rz_list_purge(RZ_NONNULL RzList *list);
|
||||
RZ_API void rz_list_free(RZ_NONNULL RzList *list);
|
||||
RZ_API RZ_OWN RzListIter *rz_list_item_new(void *data);
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ typedef struct rz_regmatch_t {
|
|||
#define RZ_REGEX_BACKR 02000 /* force use of backref code */
|
||||
|
||||
RZ_API RzRegex *rz_regex_new(const char *pattern, const char *cflags);
|
||||
RZ_API int rz_regex_run(const char *pattern, const char *flags, const char *text);
|
||||
RZ_API int rz_regex_match(const char *pattern, const char *flags, const char *text);
|
||||
RZ_API RzList *rz_regex_get_match_list(const char *pattern, const char *flags, const char *text);
|
||||
RZ_API int rz_regex_flags(const char *flags);
|
||||
|
|
|
|||
|
|
@ -99,14 +99,6 @@ RZ_API int rz_search_kw_add(RzSearch *s, RzSearchKeyword *kw);
|
|||
RZ_API void rz_search_reset(RzSearch *s, int mode);
|
||||
RZ_API void rz_search_kw_reset(RzSearch *s);
|
||||
RZ_API void rz_search_string_prepare_backward(RzSearch *s);
|
||||
RZ_API void rz_search_kw_reset(RzSearch *s);
|
||||
|
||||
RZ_API int rz_search_range_add(RzSearch *s, ut64 from, ut64 to);
|
||||
RZ_API int rz_search_range_set(RzSearch *s, ut64 from, ut64 to);
|
||||
RZ_API int rz_search_range_reset(RzSearch *s);
|
||||
RZ_API int rz_search_set_blocksize(RzSearch *s, ut32 bsize);
|
||||
|
||||
RZ_API int rz_search_bmh(const RzSearchKeyword *kw, const ut64 from, const ut8 *buf, const int len, ut64 *out);
|
||||
|
||||
// TODO: is this an internal API?
|
||||
RZ_API int rz_search_mybinparse_update(RzSearch *s, ut64 from, const ut8 *buf, int len);
|
||||
|
|
@ -116,11 +108,9 @@ RZ_API int rz_search_magic_update(RzSearch *_s, ut64 from, const ut8 *buf, int l
|
|||
RZ_API int rz_search_deltakey_update(RzSearch *s, ut64 from, const ut8 *buf, int len);
|
||||
RZ_API int rz_search_strings_update(RzSearch *s, ut64 from, const ut8 *buf, int len);
|
||||
RZ_API int rz_search_regexp_update(RzSearch *s, ut64 from, const ut8 *buf, int len);
|
||||
RZ_API int rz_search_xrefs_update(RzSearch *s, ut64 from, const ut8 *buf, int len);
|
||||
// Returns 2 if search.maxhits is reached, 0 on error, otherwise 1
|
||||
RZ_API int rz_search_hit_new(RzSearch *s, RzSearchKeyword *kw, ut64 addr);
|
||||
RZ_API void rz_search_set_distance(RzSearch *s, int dist);
|
||||
RZ_API int rz_search_strings(RzSearch *s, ut32 min, ut32 max);
|
||||
RZ_API int rz_search_set_string_limits(RzSearch *s, ut32 min, ut32 max); // dup again?
|
||||
// RZ_API int rz_search_set_callback(RzSearch *s, int (*callback)(struct rz_search_kw_t *, void *, ut64), void *user);
|
||||
RZ_API void rz_search_set_callback(RzSearch *s, RzSearchCallback(callback), void *user);
|
||||
|
|
|
|||
|
|
@ -262,17 +262,6 @@ RZ_API void rz_run_reset(RzRunProfile *p);
|
|||
RZ_API bool rz_run_parsefile(RzRunProfile *p, const char *b);
|
||||
RZ_API char *rz_run_get_environ_profile(char **env);
|
||||
|
||||
/* rapipe */
|
||||
RZ_API RzPipe *rap_open(const char *cmd);
|
||||
RZ_API RzPipe *rap_open_corebind(RzCoreBind *coreb);
|
||||
RZ_API int rap_close(RzPipe *rap);
|
||||
|
||||
RZ_API char *rap_cmd(RzPipe *rap, const char *str);
|
||||
RZ_API char *rap_cmdf(RzPipe *rap, const char *fmt, ...) RZ_PRINTF_CHECK(2, 3);
|
||||
|
||||
RZ_API int rap_write(RzPipe *rap, const char *str);
|
||||
RZ_API char *rap_read(RzPipe *rap);
|
||||
|
||||
RZ_API int rzpipe_write(RzPipe *rzpipe, const char *str);
|
||||
RZ_API char *rzpipe_read(RzPipe *rzpipe);
|
||||
RZ_API int rzpipe_close(RzPipe *rzpipe);
|
||||
|
|
|
|||
|
|
@ -181,8 +181,6 @@ typedef enum {
|
|||
#include <rz_types_base.h>
|
||||
#include <rz_constructor.h>
|
||||
|
||||
#undef _FILE_OFFSET_BITS
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#undef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ typedef struct _utX {
|
|||
#define ST32_MAX 0x7FFFFFFF
|
||||
#define ST32_MIN (-ST32_MAX - 1)
|
||||
#define UT32_MAX 0xFFFFFFFFU
|
||||
#define UT32_MIN 0U
|
||||
#define ST16_MAX 0x7FFF
|
||||
#define ST16_MIN (-ST16_MAX - 1)
|
||||
#define UT16_GT0 0x8000U
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_TYPES_OVERFLOW_H
|
||||
#define RZ_TYPES_OVERFLOW_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
// TODO: Use CLANG/GCC builtins if available: __builtin_mul_overflow
|
||||
|
||||
// ADD
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ int gettimeofday(struct timeval *p, void *tz);
|
|||
#include "rz_util/rz_graph.h"
|
||||
#include "rz_util/rz_path.h"
|
||||
#include "rz_util/rz_panels.h"
|
||||
#include "rz_util/rz_pool.h"
|
||||
#include "rz_util/rz_punycode.h"
|
||||
#include "rz_util/rz_queue.h"
|
||||
#include "rz_util/rz_range.h"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
#ifndef RZ_ASCII_TABLE_H
|
||||
#define RZ_ASCII_TABLE_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
#ifndef RZ_ASN1_H
|
||||
#define RZ_ASN1_H
|
||||
|
||||
#include <rz_types.h>
|
||||
#include <stdint.h>
|
||||
#include <rz_util/rz_strbuf.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#ifndef RZ_AXML_H
|
||||
#define RZ_AXML_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_BASE64_H
|
||||
#define RZ_BASE64_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_BASE91_H
|
||||
#define RZ_BASE91_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_BITMAP_H
|
||||
#define RZ_BITMAP_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#if RZ_SYS_BITS == 4
|
||||
#define BITWORD_BITS_SHIFT 5
|
||||
#define RBitword ut32
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#ifndef RZ_BUF_H
|
||||
#define RZ_BUF_H
|
||||
#include <rz_util/rz_mem.h>
|
||||
#include <rz_types.h>
|
||||
#include <rz_list.h>
|
||||
#include <rz_util/rz_assert.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_HEX_H
|
||||
#define RZ_HEX_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
#ifndef RZ_ID_STORAGE_H
|
||||
#define RZ_ID_STORAGE_H
|
||||
|
||||
#include <rz_util/rz_pool.h>
|
||||
#include <rz_util/rz_queue.h>
|
||||
#include <rz_types.h>
|
||||
#include <rz_list.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef RZ_LOG_H
|
||||
#define RZ_LOG_H
|
||||
|
||||
#include <rz_types.h>
|
||||
#include <rz_userconf.h>
|
||||
|
||||
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__GNUC__)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_MEM_H
|
||||
#define RZ_MEM_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -18,10 +20,6 @@ typedef struct rz_mem_pool_t {
|
|||
RZ_API ut64 rz_mem_get_num(const ut8 *b, int size);
|
||||
|
||||
/* MEMORY POOL */
|
||||
RZ_API RMemoryPool *rz_mem_pool_deinit(RMemoryPool *pool);
|
||||
RZ_API RMemoryPool *rz_mem_pool_new(int nodesize, int poolsize, int poolcount);
|
||||
RZ_API RMemoryPool *rz_mem_pool_free(RMemoryPool *pool);
|
||||
RZ_API void *rz_mem_pool_alloc(RMemoryPool *pool);
|
||||
RZ_API void *rz_mem_dup(const void *s, int l);
|
||||
RZ_API void *rz_mem_alloc(int sz);
|
||||
RZ_API void rz_mem_free(void *);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_NAME_H
|
||||
#define RZ_NAME_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_NUM_H
|
||||
#define RZ_NUM_H
|
||||
|
||||
#include <rz_list.h>
|
||||
|
||||
#define RZ_NUMCALC_STRSZ 1024
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
@ -89,7 +91,6 @@ RZ_API int rz_num_to_bits(char *out, ut64 num);
|
|||
RZ_API int rz_num_to_trits(char *out, ut64 num); // Rename this please
|
||||
RZ_API int rz_num_rand(int max);
|
||||
RZ_API void rz_num_irand(void);
|
||||
RZ_API ut16 rz_num_ntohs(ut16 foo);
|
||||
RZ_API ut64 rz_get_input_num_value(RzNum *num, const char *input_value);
|
||||
RZ_API bool rz_is_valid_input_num_value(RzNum *num, const char *input_value);
|
||||
RZ_API int rz_num_between(RzNum *num, const char *input_value);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_PANELS_H
|
||||
#define RZ_PANELS_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_PKCS7_H
|
||||
#define RZ_PKCS7_H
|
||||
|
||||
#include <rz_util/rz_x509.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
#ifndef RZ_POOL_H
|
||||
#define RZ_POOL_H
|
||||
#include <rz_util/rz_mem.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct rz_mem_pool_factory_t {
|
||||
int limit;
|
||||
RMemoryPool **pools;
|
||||
} RPoolFactory;
|
||||
|
||||
RZ_API RPoolFactory *rz_poolfactory_instance(void);
|
||||
RZ_API void rz_poolfactory_init(int limit);
|
||||
RZ_API RPoolFactory *rz_poolfactory_new(int limit);
|
||||
RZ_API void *rz_poolfactory_alloc(RPoolFactory *pf, int nodesize);
|
||||
RZ_API void rz_poolfactory_stats(RPoolFactory *pf);
|
||||
RZ_API void rz_poolfactory_free(RPoolFactory *pf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // RZ_POOL_H
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_PROTOBUF_H
|
||||
#define RZ_PROTOBUF_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_PUNYCODE_H
|
||||
#define RZ_PUNYCODE_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_QUEUE_H
|
||||
#define RZ_QUEUE_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#ifndef RZ_RANGE_H
|
||||
#define RZ_RANGE_H
|
||||
|
||||
#include <rz_types.h>
|
||||
#include <rz_list.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -28,7 +31,6 @@ RZ_API ut64 rz_range_size(RRange *r);
|
|||
RZ_API int rz_range_add_from_string(RRange *rgs, const char *string);
|
||||
RZ_API RRangeItem *rz_range_add(RRange *rgs, ut64 from, ut64 to, int rw);
|
||||
RZ_API int rz_range_sub(RRange *rgs, ut64 from, ut64 to);
|
||||
RZ_API void rz_range_merge(RRange *rgs, RRange *r);
|
||||
RZ_API int rz_range_contains(RRange *rgs, ut64 addr);
|
||||
RZ_API int rz_range_sort(RRange *rgs);
|
||||
RZ_API void rz_range_percent(RRange *rgs);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_SIGNAL_H
|
||||
#define RZ_SIGNAL_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#if __UNIX__
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_STACK_H
|
||||
#define RZ_STACK_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -185,7 +185,6 @@ static inline const char *rz_str_get_null(const char *str) {
|
|||
}
|
||||
RZ_API char *rz_str_ndup(RZ_NULLABLE const char *ptr, int len);
|
||||
RZ_API char *rz_str_dup(char *ptr, const char *string);
|
||||
RZ_API int rz_str_inject(char *begin, char *end, char *str, int maxlen);
|
||||
RZ_API int rz_str_delta(char *p, char a, char b);
|
||||
RZ_API void rz_str_filter(char *str);
|
||||
RZ_API const char *rz_str_tok(const char *str1, const char b, size_t len);
|
||||
|
|
@ -200,8 +199,6 @@ typedef void (*str_operation)(char *c);
|
|||
RZ_API int rz_str_do_until_token(str_operation op, char *str, const char tok);
|
||||
|
||||
RZ_API void rz_str_reverse(char *str);
|
||||
RZ_API int rz_str_re_match(const char *str, const char *reg);
|
||||
RZ_API int rz_str_re_replace(const char *str, const char *reg, const char *sub);
|
||||
RZ_API int rz_str_path_unescape(char *path);
|
||||
RZ_API char *rz_str_path_escape(const char *path);
|
||||
RZ_API int rz_str_unescape(char *buf);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_STRBUF_H
|
||||
#define RZ_STRBUF_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -30,7 +32,6 @@ RZ_API char *rz_strbuf_get(RzStrBuf *sb);
|
|||
RZ_API RZ_OWN char *rz_strbuf_drain(RzStrBuf *sb);
|
||||
RZ_API RZ_OWN char *rz_strbuf_drain_nofree(RzStrBuf *sb);
|
||||
RZ_API int rz_strbuf_length(RzStrBuf *sb);
|
||||
RZ_API int rz_strbuf_size(RzStrBuf *sb);
|
||||
RZ_API void rz_strbuf_free(RzStrBuf *sb);
|
||||
RZ_API void rz_strbuf_fini(RzStrBuf *sb);
|
||||
RZ_API void rz_strbuf_init(RzStrBuf *sb);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_STRPOOL_H
|
||||
#define RZ_STRPOOL_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#define RZ_STRPOOL_INC 1024
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@
|
|||
#ifndef RZ_UTIL_SUBPROCESS_H
|
||||
#define RZ_UTIL_SUBPROCESS_H
|
||||
|
||||
#include <rz_types.h>
|
||||
#include <rz_util/rz_strbuf.h>
|
||||
|
||||
/**
|
||||
* Enum used to determine how pipes should be created, if at all, in the
|
||||
* subprocess.
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ RZ_API char *rz_sys_whoami(char *buf);
|
|||
RZ_API char *rz_sys_getdir(void);
|
||||
RZ_API bool rz_sys_chdir(RZ_NONNULL const char *s);
|
||||
RZ_API bool rz_sys_aslr(int val);
|
||||
RZ_API int rz_sys_thp_mode(void);
|
||||
RZ_API int rz_sys_cmd_str_full(const char *cmd, const char *input, char **output, int *len, char **sterr);
|
||||
#if __WINDOWS__
|
||||
#if UNICODE
|
||||
|
|
|
|||
|
|
@ -83,15 +83,7 @@ RZ_API bool rz_table_query(RzTable *t, const char *q);
|
|||
RZ_API void rz_table_hide_header(RzTable *t);
|
||||
RZ_API bool rz_table_align(RzTable *t, int nth, int align);
|
||||
RZ_API void rz_table_visual_list(RzTable *table, RzList *list, ut64 seek, ut64 len, int width, bool va);
|
||||
RZ_API RzTable *rz_table_clone(RzTable *t);
|
||||
RZ_API RzTable *rz_table_push(RzTable *t);
|
||||
RZ_API RzTable *rz_table_pop(RzTable *t);
|
||||
RZ_API void rz_table_fromjson(RzTable *t, const char *csv);
|
||||
RZ_API void rz_table_fromcsv(RzTable *t, const char *csv);
|
||||
RZ_API char *rz_table_tohtml(RzTable *t);
|
||||
RZ_API RzTable *rz_table_transpose(RzTable *t);
|
||||
RZ_API void rz_table_format(RzTable *t, int nth, RzTableColumnType *type);
|
||||
RZ_API ut64 rz_table_reduce(RzTable *t, int nth);
|
||||
RZ_API void rz_table_columns(RzTable *t, RzList *cols); // const char *name, ...);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_ULEB128_H
|
||||
#define RZ_ULEB128_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
// LEB128 or Little Endian Base 128 is a form of variable-length code
|
||||
// compression used to store an arbitrarily large integer in a small number of
|
||||
// bytes. LEB128 is used in the DWARF debug file format.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
#ifndef RZ_X509_H
|
||||
#define RZ_X509_H
|
||||
|
||||
#include <rz_util/rz_asn1.h>
|
||||
#include <rz_util/rz_pj.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -112,7 +115,6 @@ RZ_API void rz_x509_crl_json(PJ *pj, RX509CertificateRevocationList *crl);
|
|||
RZ_API RX509Certificate *rz_x509_parse_certificate(RASN1Object *object);
|
||||
RZ_API RX509Certificate *rz_x509_parse_certificate2(const ut8 *buffer, ut32 length);
|
||||
RZ_API void rz_x509_free_certificate(RX509Certificate *certificate);
|
||||
RZ_API char *rz_x509_certificate_to_string(RX509Certificate *certificate, const char *pad);
|
||||
RZ_API void rz_x509_certificate_json(PJ *pj, RX509Certificate *certificate);
|
||||
RZ_API void rz_x509_certificate_dump(RX509Certificate *cert, const char *pad, RzStrBuf *sb);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RZ_WINDOWS_HEAP_H
|
||||
#define RZ_WINDOWS_HEAP_H
|
||||
|
||||
#include <rz_types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -48,6 +48,14 @@ RZ_API const char *rz_magic_error(RzMagic *m) {
|
|||
RZ_API void rz_magic_setflags(RzMagic *m, int f) {
|
||||
magic_setflags(m, f);
|
||||
}
|
||||
RZ_API bool rz_magic_load_buffer(RzMagic *m, const char *f) {
|
||||
if (*magicdata == '#') {
|
||||
return magic_load(m, f) != -1;
|
||||
} else {
|
||||
eprintf("Magic buffers should start with #\n");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
RZ_API bool rz_magic_load(RzMagic *m, const char *f) {
|
||||
return magic_load(m, f) != -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue