11 rz_list_foreach (block->
fcns,
iter, fcn) {
37 RZ_LOG_INFO(
"Empty function name, we must auto generate one\n");
100 rz_list_foreach (fcn->
bbs,
iter, block) {
200 ht_up_insert(
ctx->inst_vars_new,
k -
ctx->delta, (
void *)
v);
227 if (
ctx.inst_vars_new) {
244 if (existing == fcn) {
306 rz_list_foreach (fcn->
bbs,
iter, block) {
307 if (block->
addr < minval) {
308 minval = block->
addr;
310 if (block->
addr + block->
size > maxval) {
343 rz_list_foreach (fcn->
bbs,
iter, bb) {
353 rz_list_foreach (block->
fcns,
iter, fcn) {
370 rz_list_foreach (fcn->
bbs, it, bb) {
380 return analysis->
fcns;
383 #define MIN_MATCH_LEN 4
400 return slen > 4 && (
offset + 3 < slen) && func_name[
offset + 3] ==
'.';
409 return func_name +
offset;
416 }
else if (
rz_str_startswith(func_name,
"__libc_") && !strstr(func_name,
"_main")) {
425 char *
tmp = strstr(func_name,
"dll_");
463 size_t slen = strlen(
str);
RZ_API void rz_analysis_diff_free(RzAnalysisDiff *diff)
RZ_API RZ_OWN RzAnalysisDiff * rz_analysis_diff_new(void)
static bool get_functions_block_cb(RzAnalysisBlock *block, void *user)
RZ_API RZ_OWN char * rz_analysis_function_name_guess(RzTypeDB *typedb, RZ_NONNULL char *name)
Checks if varions function name variations present in the database.
RZ_API void rz_analysis_function_add_block(RzAnalysisFunction *fcn, RzAnalysisBlock *bb)
RZ_API RZ_BORROW RzList * rz_analysis_function_list(RzAnalysis *analysis)
RZ_API bool rz_analysis_function_is_autonamed(RZ_NONNULL char *name)
Checks if the function name was generated by Rizin automatically.
static char * strip_common_prefixes_stdlib(char *func_name)
RZ_API RzAnalysisFunction * rz_analysis_get_function_at(RzAnalysis *analysis, ut64 addr)
RZ_API ut64 rz_analysis_function_max_addr(RzAnalysisFunction *fcn)
RZ_API ut64 rz_analysis_function_size_from_entry(RzAnalysisFunction *fcn)
static RZ_OWN char * function_name_try_guess(RzTypeDB *typedb, RZ_NONNULL char *name)
static void inst_vars_kv_free(HtUPKv *kv)
RZ_IPI void rz_analysis_var_free(RzAnalysisVar *av)
RZ_API RzList * rz_analysis_get_functions_in(RzAnalysis *analysis, ut64 addr)
static void label_addrs_kv_free(HtPPKv *kv)
RZ_API bool rz_analysis_function_relocate(RzAnalysisFunction *fcn, ut64 addr)
static void ensure_fcn_range(RzAnalysisFunction *fcn)
static char * strip_rz_prefixes(char *func_name, size_t slen)
static bool __fcn_exists(RzAnalysis *analysis, const char *name, ut64 addr)
RZ_API ut64 rz_analysis_function_linear_size(RzAnalysisFunction *fcn)
RZ_API void rz_analysis_function_remove_block(RzAnalysisFunction *fcn, RzAnalysisBlock *bb)
RZ_API ut64 rz_analysis_function_realsize(const RzAnalysisFunction *fcn)
static bool is_auto_named(char *func_name, size_t slen)
static bool inst_vars_relocate_cb(void *user, const ut64 k, const void *v)
static bool fcn_in_cb(RzAnalysisBlock *block, void *user)
static char * strip_dll_prefix(char *func_name)
static void clean_function_name(char *func_name)
RZ_API bool rz_analysis_add_function(RzAnalysis *analysis, RzAnalysisFunction *fcn)
RZ_API bool rz_analysis_function_was_modified(RzAnalysisFunction *fcn)
static bool has_rz_prefixes(char *func_name, int offset, size_t slen)
RZ_API bool rz_analysis_function_rename(RzAnalysisFunction *fcn, const char *name)
static void labels_kv_free(HtUPKv *kv)
RZ_API RzAnalysisFunction * rz_analysis_function_new(RzAnalysis *analysis)
RZ_API RzAnalysisFunction * rz_analysis_create_function(RzAnalysis *analysis, const char *name, ut64 addr, int type, RzAnalysisDiff *diff)
RZ_API bool rz_analysis_function_delete(RzAnalysisFunction *fcn)
RZ_API ut64 rz_analysis_function_min_addr(RzAnalysisFunction *fcn)
RZ_API void rz_analysis_function_free(void *_fcn)
RZ_API bool rz_analysis_function_contains(RzAnalysisFunction *fcn, ut64 addr)
RZ_API bool rz_analysis_noreturn_at_addr(RzAnalysis *analysis, ut64 addr)
RZ_API bool rz_analysis_block_was_modified(RzAnalysisBlock *block)
RZ_API void rz_analysis_block_ref(RzAnalysisBlock *bb)
RZ_API bool rz_analysis_blocks_foreach_in(RzAnalysis *analysis, ut64 addr, RzAnalysisBlockCb cb, void *user)
RZ_API void rz_analysis_block_unref(RzAnalysisBlock *bb)
RZ_API const char * rz_analysis_cc_default(RzAnalysis *analysis)
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API const KEY_TYPE bool * found
static void list(RzEgg *egg)
RZ_API RZ_BORROW RzListIter * rz_list_contains(RZ_NONNULL const RzList *list, RZ_NONNULL const void *ptr)
Returns the RzListIter of the given pointer, if found.
RZ_API bool rz_list_delete_data(RZ_NONNULL RzList *list, void *ptr)
Deletes an entry in the list by searching for a pointer.
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
RZ_API RZ_BORROW RzListIter * rz_list_push(RZ_NONNULL RzList *list, void *item)
Alias for rz_list_append.
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
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")
#define rz_return_val_if_fail(expr, val)
#define RZ_LOG_INFO(fmtstr,...)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API const char * rz_str_lchr(const char *str, char chr)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API bool rz_str_isnumber(const char *str)
RZ_API bool rz_str_startswith(RZ_NONNULL const char *str, RZ_NONNULL const char *needle)
Checks if a string starts with a specifc sequence of characters (case sensitive)
RZ_API const char * rz_str_constpool_get(RzStrConstPool *pool, const char *str)
RZ_API void rz_pvector_init(RzPVector *vec, RzPVectorFree free)
#define rz_vector_foreach(vec, it)
RZ_API void rz_pvector_free(RzPVector *vec)
#define rz_pvector_foreach(vec, it)
int(* on_fcn_bb_new)(struct rz_analysis_t *, void *user, RzAnalysisFunction *fcn, struct rz_analysis_bb_t *bb)
int(* on_fcn_new)(struct rz_analysis_t *, void *user, RzAnalysisFunction *fcn)
struct rz_analysis_t * analysis
RZ_API bool rz_type_func_exist(RzTypeDB *typedb, RZ_NONNULL const char *name)
Checks if the RzCallable type exists in the database given the name.
RZ_API void rz_analysis_function_delete_all_vars(RzAnalysisFunction *fcn)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()