112 rz_list_foreach (enumlist, it, btype) {
127 unsigned int multiline_opt = 0;
139 rz_list_foreach (enumlist, it, btype) {
206 rz_list_foreach (unionlist, it, btype) {
221 unsigned int multiline_opt = 0;
233 rz_list_foreach (unionlist, it, btype) {
301 rz_list_foreach (structlist, it, btype) {
325 rz_list_foreach (structlist, it, btype) {
348 pj_ks(pj,
"type", typestr);
374 rz_list_foreach (typedeflist, it, btype) {
397 rz_list_foreach (typedeflist, it, btype) {
411 unsigned int multiline_opt = 0;
484 pj_ks(pj,
"name",
function);
485 pj_ks(pj,
"ret", ret);
533 rz_list_foreach (noretl, it,
s) {
544 rz_list_foreach (noretl, it,
s) {
580 pj_ks(pj,
"format", fmt);
607 rz_list_foreach (structlist, it, btype) {
618 rz_list_foreach (unionlist, it, btype) {
631 if (!hint || !fcn || !fcn->
name) {
723 bool stack_set =
false;
724 bool resolved =
false;
741 const int minopcode =
RZ_MAX(1, mininstrsz);
771 rz_list_foreach (fcn->
bbs, it, bb) {
775 for (
i = 0; at <
to;
i++) {
782 if (
i >= (bsize - maxinstrsz)) {
797 int j, src_imm = -1, dst_imm = -1;
800 for (j = 0; j < 3; j++) {
816 src_addr = aop.
src[j]->
imm;
890 pj_ks(pj, saddr, typestr);
904 eprintf(
"Can't fint type %s", typestr);
955 char *error_msg =
NULL;
957 if (!
type || error_msg) {
967 eprintf(
"Multiple functions found in here.\n");
995 rz_list_foreach (
types, it, btype) {
1009 rz_list_foreach (
types, it, btype) {
1014 rz_list_foreach (
types, it, btype) {
1037 char *error_msg =
NULL;
1040 if (result && error_msg) {
1049 if (!strcmp(
path,
"-")) {
1052 char *error_msg =
NULL;
1054 if (result && error_msg) {
1065 char *error_msg =
NULL;
1067 if (result && error_msg) {
1087 bool result =
false;
RZ_API RzList * rz_analysis_get_functions_in(RzAnalysis *analysis, ut64 addr)
RZ_API int rz_analysis_archinfo(RzAnalysis *analysis, int query)
static int bb_cmpaddr(const void *_a, const void *_b)
RZ_API int rz_reg_arena_push(RzReg *reg)
RZ_API void rz_reg_arena_pop(RzReg *reg)
RZ_API void rz_reg_arena_zero(RzReg *reg, RzRegisterType type)
RZ_API RZ_OWN RzList * rz_type_db_get_base_types(const RzTypeDB *typedb)
Returns the list of all basic types.
RZ_API RZ_BORROW RzBaseType * rz_type_db_get_compound_type(const RzTypeDB *typedb, RZ_NONNULL const char *name)
Searches for the compound RzBaseType in the types database given the name.
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)
Returns C representation as string of RzBaseType.
RZ_API RZ_BORROW RzBaseType * rz_type_db_get_base_type(const RzTypeDB *typedb, RZ_NONNULL const char *name)
Searches for the RzBaseType in the types database given the name.
RZ_API RZ_OWN RzList * rz_type_db_get_base_types_of_kind(const RzTypeDB *typedb, RzBaseTypeKind kind)
Returns the list of all basic types of the chosen kind.
RZ_API RZ_OWN RzType * rz_type_parse_string_single(RzTypeParser *parser, const char *code, char **error_msg)
Parses the single C type definition.
RZ_API int rz_type_parse_string_stateless(RzTypeParser *parser, const char *code, char **error_msg)
Parses the C type string reusing the existing parser state.
RZ_API int rz_type_parse_file_stateless(RzTypeParser *parser, const char *path, const char *dir, char **error_msg)
Parses the C types file reusing the existing parser state.
RZ_IPI void rz_core_analysis_cc_print(RzCore *core, RZ_NONNULL const char *cc, RZ_NULLABLE PJ *pj)
Print Calling Convention info.
RZ_API int rz_core_get_stacksz(RzCore *core, ut64 from, ut64 to)
RZ_API const char * rz_analysis_cc_func(RzAnalysis *analysis, const char *func_name)
RZ_API char * rz_analysis_cc_get(RzAnalysis *analysis, const char *name)
RZ_API RzList * rz_analysis_calling_conventions(RzAnalysis *analysis)
RZ_API const char * rz_analysis_cc_ret(RzAnalysis *analysis, const char *convention)
RZ_API void rz_core_analysis_esil_init_mem(RZ_NONNULL RzCore *core, RZ_NULLABLE const char *name, ut64 addr, ut32 size)
RZ_API void rz_core_analysis_esil_init_mem_del(RZ_NONNULL RzCore *core, RZ_NULLABLE const char *name, ut64 addr, ut32 size)
Remove ESIL VM stack.
RZ_API int rz_core_cmdf(RzCore *core, const char *fmt,...)
RZ_IPI void rz_core_kuery_print(RzCore *core, const char *k)
RZ_API int rz_core_esil_step(RzCore *core, ut64 until_addr, const char *until_expr, ut64 *prev_addr, bool stepOver)
RZ_API ut64 rz_config_get_i(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API RzConfigNode * rz_config_set_i(RzConfig *cfg, RZ_NONNULL const char *name, const ut64 i)
RZ_API RZ_BORROW const char * rz_config_get(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API void rz_cons_break_pop(void)
RZ_API void rz_cons_break_push(RzConsBreak cb, void *user)
RZ_API int rz_cons_printf(const char *format,...)
RZ_API bool rz_cons_is_breaked(void)
RZ_API void rz_cons_println(const char *str)
RZ_API void rz_core_reg_update_flags(RzCore *core)
Update or create flags for all registers where it makes sense.
static bool nonreturn_print(RzCore *core, RzList *noretl)
RZ_IPI void rz_core_types_link_print_all(RzCore *core, RzOutputMode mode)
RZ_IPI void rz_core_types_link_print(RzCore *core, RzType *type, ut64 addr, RzOutputMode mode, PJ *pj)
RZ_IPI void rz_core_types_union_print_format_all(RzCore *core)
RZ_IPI void rz_core_types_function_noreturn_print(RzCore *core, RzOutputMode mode)
RZ_IPI void rz_core_types_typedef_print_all(RzCore *core, RzOutputMode mode)
RZ_IPI RZ_OWN char * rz_core_types_enum_as_c(RzTypeDB *typedb, const RzBaseType *btype, bool multiline)
RZ_IPI RZ_OWN char * rz_core_types_struct_as_c_all(RzTypeDB *typedb, bool multiline)
RZ_IPI void rz_core_types_link_show(RzCore *core, ut64 addr)
RZ_IPI bool rz_types_open_editor(RzCore *core, RZ_NONNULL const char *name)
RZ_IPI void rz_core_types_function_print(RzTypeDB *typedb, const char *function, RzOutputMode mode, PJ *pj)
RZ_IPI void rz_core_types_function_print_all(RzCore *core, RzOutputMode mode)
RZ_IPI bool rz_types_open_file(RzCore *core, const char *path)
RZ_IPI void rz_core_types_union_print_all(RzCore *core, RzOutputMode mode)
RZ_IPI RZ_OWN char * rz_core_base_type_as_c(RzCore *core, RZ_NONNULL RzBaseType *type, bool multiline)
RZ_API RZ_OWN char * rz_core_types_as_c(RZ_NONNULL RzCore *core, RZ_NONNULL const char *name, bool multiline)
Get a type string by name (.
RZ_IPI RZ_OWN char * rz_core_types_typedef_as_c_all(RzTypeDB *typedb)
RZ_IPI void rz_core_types_struct_print_all(RzCore *core, RzOutputMode mode)
static void resolve_type_links(RzCore *core, ut64 at, struct TLAnalysisContext *ctx, int ret, bool *resolved)
RZ_IPI void rz_core_types_struct_print_format_all(RzCore *core)
RZ_IPI void rz_core_types_print_all(RzCore *core, RzOutputMode mode)
RZ_IPI void rz_core_types_enum_print(RzCore *core, const RzBaseType *btype, RzOutputMode mode, PJ *pj)
RZ_IPI RZ_OWN char * rz_core_types_enum_as_c_all(RzTypeDB *typedb, bool multiline)
RZ_IPI RZ_OWN char * rz_core_types_union_as_c_all(RzTypeDB *typedb, bool multiline)
RZ_IPI void rz_core_types_show_format(RzCore *core, const char *name, RzOutputMode mode)
static void set_offset_hint(RzCore *core, RzAnalysisOp *op, RZ_BORROW RzTypePath *tpath, ut64 laddr, ut64 at, int offimm)
RZ_API void rz_core_link_stroff(RzCore *core, RzAnalysisFunction *fcn)
RZ_API RZ_OWN char * rz_core_types_as_c_all(RZ_NONNULL RzCore *core, bool multiline)
Get all types with pretty printing.
RZ_IPI void rz_core_types_struct_print(RzCore *core, const RzBaseType *btype, RzOutputMode mode, PJ *pj)
RZ_API void rz_core_types_link(RzCore *core, const char *typestr, ut64 addr)
Link an address addr to the type referenced by typestr.
static bool typelink_print_cb(void *user, ut64 k, const void *v)
RZ_IPI RZ_OWN char * rz_core_types_typedef_as_c(RzTypeDB *typedb, const RzBaseType *btype)
RZ_IPI RZ_OWN char * rz_core_types_struct_as_c(RzTypeDB *typedb, const RzBaseType *btype, bool multiline)
RZ_IPI void rz_types_define(RzCore *core, const char *type)
RZ_IPI void rz_core_types_enum_print_all(RzCore *core, RzOutputMode mode)
RZ_IPI RZ_OWN char * rz_core_types_union_as_c(RzTypeDB *typedb, const RzBaseType *btype, bool multiline)
RZ_IPI void rz_core_types_union_print(RzCore *core, const RzBaseType *btype, RzOutputMode mode, PJ *pj)
static void set_retval(RzCore *core, ut64 at)
static bool nonreturn_print_json(RzCore *core, RzList *noretl)
RZ_IPI void rz_core_types_typedef_print(RzCore *core, const RzBaseType *btype, RzOutputMode mode, PJ *pj)
RZ_IPI void rz_core_types_calling_conventions_print(RzCore *core, RzOutputMode mode)
static static fork const void static count static fd const char const char static newpath const char static path const char path
static static fork const void static count static fd link
RZ_API int rz_debug_reg_sync(RzDebug *dbg, int type, int write)
RZ_API RzAnalysisEsil * rz_analysis_esil_new(int stacksize, int iotrap, unsigned int addrsize)
RZ_API bool rz_analysis_esil_setup(RzAnalysisEsil *esil, RzAnalysis *analysis, int romem, int stats, int nonull)
RZ_API void rz_analysis_esil_free(RzAnalysisEsil *esil)
RZ_DEPRECATE RZ_API RzAnalysisFunction * rz_analysis_get_fcn_in(RzAnalysis *analysis, ut64 addr, int type)
RZ_API RzAnalysisHint * rz_analysis_hint_get(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_free(RzAnalysisHint *h)
RZ_API void rz_analysis_hint_set_offset(RzAnalysis *a, ut64 addr, const char *typeoff)
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API RZ_OWN char * rz_core_editor(const RzCore *core, RZ_NULLABLE const char *file, RZ_NULLABLE const char *str)
static void list(RzEgg *egg)
RZ_API RZ_BORROW void * rz_list_get_top(RZ_NONNULL const RzList *list)
Returns the last element of the list.
RZ_API void rz_list_sort(RZ_NONNULL RzList *list, RZ_NONNULL RzListComparator cmp)
Sorts via merge sort or via insertion sort a list.
RZ_API RZ_BORROW void * rz_list_first(RZ_NONNULL const RzList *list)
Returns the first element of the list.
RZ_API ut32 rz_list_length(RZ_NONNULL const RzList *list)
Returns the length of the list.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
void * malloc(size_t size)
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
RZ_API bool rz_analysis_op_fini(RzAnalysisOp *op)
RZ_API bool rz_analysis_op_nonlinear(int t)
RZ_API int rz_analysis_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask)
RZ_API bool rz_analysis_op_ismemref(int t)
insn_type_descr_t types[]
RZ_API ut64 rz_reg_getv(RzReg *reg, const char *name)
RZ_API RzRegItem * rz_reg_get(RzReg *reg, const char *name, int type)
RZ_API const char * rz_reg_get_name(RzReg *reg, int role)
RZ_API bool rz_reg_set_value(RzReg *reg, RzRegItem *item, ut64 value)
#define RZ_ANALYSIS_ARCHINFO_MAX_OP_SIZE
@ RZ_ANALYSIS_OP_MASK_VAL
#define RZ_ANALYSIS_ARCHINFO_MIN_OP_SIZE
#define rz_warn_if_reached()
#define rz_return_if_fail(expr)
#define rz_return_val_if_fail(expr, val)
RZ_API bool rz_file_exists(const char *str)
RZ_API bool rz_io_read_at(RzIO *io, ut64 addr, ut8 *buf, int len)
RZ_API void rz_io_cache_reset(RzIO *io, int set)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API PJ * pj_ki(PJ *j, const char *k, int d)
RZ_API PJ * pj_k(PJ *j, const char *k)
RZ_API PJ * pj_end(PJ *j)
RZ_API const char * pj_string(PJ *pj)
RZ_API void pj_free(PJ *j)
RZ_API PJ * pj_s(PJ *j, const char *k)
RZ_API PJ * pj_ks(PJ *j, const char *k, const char *v)
RZ_API PJ * pj_kn(PJ *j, const char *k, ut64 n)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
static const char * rz_str_get_null(const char *str)
RZ_API RZ_OWN char * rz_strbuf_drain(RzStrBuf *sb)
RZ_API bool rz_strbuf_append(RzStrBuf *sb, const char *s)
RZ_API RzStrBuf * rz_strbuf_new(const char *s)
@ RZ_BASE_TYPE_KIND_TYPEDEF
@ RZ_BASE_TYPE_KIND_UNION
@ RZ_BASE_TYPE_KIND_STRUCT
@ RZ_TYPE_PRINT_SHOW_TYPEDEF
@ RZ_TYPE_PRINT_END_NEWLINE
@ RZ_TYPE_PRINT_MULTILINE
@ RZ_TYPE_PRINT_ANONYMOUS
@ RZ_TYPE_KIND_IDENTIFIER
RzOutputMode
Enum to describe the way data are printed.
@ RZ_OUTPUT_MODE_STANDARD
#define rz_vector_foreach(vec, it)
static bool rz_vector_empty(const RzVector *vec)
#define rz_pvector_foreach(vec, it)
RZ_API bool rz_core_seek(RzCore *core, ut64 addr, bool rb)
Seek to addr.
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr socklen_t static fromlen const void const struct sockaddr to
RzBaseTypeStruct struct_data
RzBaseTypeUnion union_data
RzPVector * args
optional for the time being
struct rz_type_t::@292::@294 identifier
RZ_API RZ_BORROW RzCallable * rz_type_func_get(RzTypeDB *typedb, RZ_NONNULL const char *name)
Returns the RzCallable from the database by name.
RZ_API RZ_OWN RzList * rz_type_noreturn_function_names(RzTypeDB *typedb)
Returns the list of all noreturn function type names.
RZ_API RZ_OWN RzList * rz_type_function_names(RzTypeDB *typedb)
Returns the list of all function type names.
RZ_API RZ_OWN char * rz_type_callable_as_string(const RzTypeDB *typedb, RZ_NONNULL const RzCallable *callable)
Returns the callable C representation.
RZ_API ut64 rz_type_db_get_bitsize(const RzTypeDB *typedb, RZ_NONNULL RzType *type)
Returns the type size in bits (target dependent)
RZ_API bool rz_type_db_edit_base_type(RzTypeDB *typedb, RZ_NONNULL const char *name, RZ_NONNULL const char *typestr)
Edits the existing base type given the new C code.
RZ_API RZ_OWN char * rz_type_as_string(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Returns the type C representation.
RZ_API RZ_BORROW RzType * rz_analysis_type_link_at(RzAnalysis *analysis, ut64 addr)
Returns the RzType linked to the given address.
RZ_API RZ_OWN RzList * rz_analysis_type_paths_by_address(RzAnalysis *analysis, ut64 addr)
Returns the list of all type paths that are linked to some address and have suitable offset.
RZ_API bool rz_analysis_type_set_link(RzAnalysis *analysis, RZ_BORROW RzType *type, ut64 addr)
Links the given RzType to the address.
RZ_API bool rz_analysis_var_rename(RzAnalysisVar *var, const char *new_name, bool verbose)
RZ_API void rz_analysis_var_set_type(RzAnalysisVar *var, RZ_OWN RzType *type, bool resolve_overlaps)
RZ_DEPRECATE RZ_API RzAnalysisVar * rz_analysis_get_used_function_var(RzAnalysis *analysis, ut64 addr)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static char * regname(int reg)