28 if (addr < in_tree_record->
addr) {
30 }
else if (
addr > in_tree_record->
addr) {
80 ht_up_free(
a->addr_hints);
101 ht_up_delete(
ctx->ht,
key);
108 ht_up_delete(
a->addr_hints,
addr);
146 for (
i = 0;
i < records->
len;
i++) {
179 #define SET_HINT(type, setcode) \
181 RzAnalysisAddrHintRecord *r = ensure_addr_hint_record(a, type, addr); \
205 free(
r->type_offset);
206 r->type_offset =
strdup(typeoff););
294 if (
a->hint_cbs.on_bits) {
392 *hint_addr =
record->base.addr;
407 *hint_addr =
record->base.addr;
417 RzAnalysisAddrHintRecordsCb
cb;
int bits(struct state *s, int need)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len key
RZ_API void rz_analysis_hint_set_val(RzAnalysis *a, ut64 addr, ut64 v)
struct rz_analysis_arch_hint_record_t RzAnalysisArchHintRecord
RZ_API void rz_analysis_hint_set_nword(RzAnalysis *a, ut64 addr, int nword)
static void addr_hint_record_fini(void *element, void *user)
RZ_API void rz_analysis_hint_unset_nword(RzAnalysis *a, ut64 addr)
static RzAnalysisRangedHintRecordBase * ensure_ranged_hint_record(RBTree *tree, ut64 addr, size_t sz)
RZ_API void rz_analysis_hint_set_newbits(RzAnalysis *a, ut64 addr, int bits)
RZ_API RZ_NULLABLE const RzVector * rz_analysis_addr_hints_at(RzAnalysis *analysis, ut64 addr)
RZ_API RzAnalysisHint * rz_analysis_hint_get(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_set_high(RzAnalysis *a, ut64 addr)
static RzAnalysisAddrHintRecord * ensure_addr_hint_record(RzAnalysis *analysis, RzAnalysisAddrHintType type, ut64 addr)
RZ_API void rz_analysis_hint_clear(RzAnalysis *a)
static bool addr_hint_foreach_cb(void *user, const ut64 key, const void *value)
RZ_API void rz_analysis_hint_unset_stackframe(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_newbits(RzAnalysis *a, ut64 addr)
void rz_analysis_hint_storage_fini(RzAnalysis *a)
RZ_API void rz_analysis_hint_unset_type(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_addr_hints_foreach(RzAnalysis *analysis, RzAnalysisAddrHintRecordsCb cb, void *user)
static void hint_merge(RzAnalysisHint *hint, RzAnalysisAddrHintRecord *record)
RZ_API void rz_analysis_hint_set_stackframe(RzAnalysis *a, ut64 addr, ut64 size)
RZ_API void rz_analysis_hint_unset_fail(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_set_ret(RzAnalysis *a, ut64 addr, ut64 val)
RZ_API void rz_analysis_hint_unset_offset(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_size(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_syntax(RzAnalysis *a, ut64 addr)
static void arch_hint_record_free_rb(RBNode *node, void *user)
RZ_API void rz_analysis_hint_unset_jump(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_set_jump(RzAnalysis *a, ut64 addr, ut64 jump)
RZ_API void rz_analysis_hint_unset_arch(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_set_opcode(RzAnalysis *a, ut64 addr, const char *opcode)
RZ_API void rz_analysis_arch_hints_foreach(RzAnalysis *analysis, RzAnalysisArchHintCb cb, void *user)
static void unset_addr_hint_record(RzAnalysis *analysis, RzAnalysisAddrHintType type, ut64 addr)
RZ_API void rz_analysis_hint_set_bits(RzAnalysis *a, ut64 addr, int bits)
RZ_API void rz_analysis_hint_free(RzAnalysisHint *h)
RZ_API void rz_analysis_hint_set_syntax(RzAnalysis *a, ut64 addr, const char *syn)
RZ_API int rz_analysis_hint_bits_at(RzAnalysis *analysis, ut64 addr, RZ_NULLABLE ut64 *hint_addr)
struct rz_analysis_bits_hint_record_t RzAnalysisBitsHintRecord
RZ_API void rz_analysis_hint_del(RzAnalysis *a, ut64 addr, ut64 size)
RZ_API RZ_NULLABLE RZ_BORROW const char * rz_analysis_hint_arch_at(RzAnalysis *analysis, ut64 addr, RZ_NULLABLE ut64 *hint_addr)
RZ_API void rz_analysis_bits_hints_foreach(RzAnalysis *analysis, RzAnalysisBitsHintCb cb, void *user)
static void addr_hint_record_ht_free(HtUPKv *kv)
RZ_API void rz_analysis_hint_set_fail(RzAnalysis *a, ut64 addr, ut64 fail)
RZ_API void rz_analysis_hint_unset_opcode(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_esil(RzAnalysis *a, ut64 addr)
void rz_analysis_hint_storage_init(RzAnalysis *a)
static void bits_hint_record_free_rb(RBNode *node, void *user)
RZ_API void rz_analysis_hint_set_esil(RzAnalysis *a, ut64 addr, const char *esil)
RZ_API void rz_analysis_hint_unset_immbase(RzAnalysis *a, ut64 addr)
static int ranged_hint_record_cmp(const void *incoming, const RBNode *in_tree, void *user)
RZ_API void rz_analysis_hint_unset_bits(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_ret(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_high(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_set_arch(RzAnalysis *a, ut64 addr, RZ_NULLABLE const char *arch)
RZ_API void rz_analysis_hint_set_offset(RzAnalysis *a, ut64 addr, const char *typeoff)
RZ_API void rz_analysis_hint_set_immbase(RzAnalysis *a, ut64 addr, int base)
RZ_API void rz_analysis_hint_set_type(RzAnalysis *a, ut64 addr, int type)
RZ_API void rz_analysis_hint_unset_val(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_pointer(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_set_pointer(RzAnalysis *a, ut64 addr, ut64 ptr)
#define SET_HINT(type, setcode)
static bool addr_hint_range_delete_cb(void *user, const ut64 key, const void *value)
RZ_API void rz_analysis_hint_set_size(RzAnalysis *a, ut64 addr, ut64 size)
struct rz_analysis_ranged_hint_record_base_t RzAnalysisRangedHintRecordBase
RZ_API void Ht_() free(HtName_(Ht) *ht)
return memset(p, 0, total)
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_ANALYSIS_ADDR_HINT_TYPE_SYNTAX
@ RZ_ANALYSIS_ADDR_HINT_TYPE_PTR
@ RZ_ANALYSIS_ADDR_HINT_TYPE_SIZE
@ RZ_ANALYSIS_ADDR_HINT_TYPE_STACKFRAME
@ RZ_ANALYSIS_ADDR_HINT_TYPE_HIGH
@ RZ_ANALYSIS_ADDR_HINT_TYPE_ESIL
@ RZ_ANALYSIS_ADDR_HINT_TYPE_NEW_BITS
@ RZ_ANALYSIS_ADDR_HINT_TYPE_TYPE_OFFSET
@ RZ_ANALYSIS_ADDR_HINT_TYPE_JUMP
@ RZ_ANALYSIS_ADDR_HINT_TYPE_OPTYPE
@ RZ_ANALYSIS_ADDR_HINT_TYPE_RET
@ RZ_ANALYSIS_ADDR_HINT_TYPE_IMMBASE
@ RZ_ANALYSIS_ADDR_HINT_TYPE_NWORD
@ RZ_ANALYSIS_ADDR_HINT_TYPE_FAIL
@ RZ_ANALYSIS_ADDR_HINT_TYPE_OPCODE
@ RZ_ANALYSIS_ADDR_HINT_TYPE_VAL
enum rz_analysis_addr_hint_type_t RzAnalysisAddrHintType
RZ_API RBNode * rz_rbtree_find(RBNode *root, void *data, RBComparator cmp, void *user)
RZ_API void rz_rbtree_free(RZ_NULLABLE RBNode *root, RBNodeFree freefn, void *user)
#define rz_rbtree_foreach(root, it, data, struc, rb)
RZ_API bool rz_rbtree_insert(RBNode **root, void *data, RBNode *node, RBComparator cmp, void *user)
Returns true if the node was inserted successfully.
RZ_API bool rz_rbtree_delete(RBNode **root, void *data, RBComparator cmp, void *cmp_user, RBNodeFree freefn, void *free_user)
Returns true if a node with an equal key is deleted.
RZ_API RBNode * rz_rbtree_lower_bound(RBNode *root, void *data, RBComparator cmp, void *user)
RZ_API RBNode * rz_rbtree_upper_bound(RBNode *root, void *data, RBComparator cmp, void *user)
#define container_of(ptr, type, member)
static void * rz_vector_index_ptr(RzVector *vec, size_t index)
RZ_API void rz_vector_remove_at(RzVector *vec, size_t index, void *into)
RZ_API void * rz_vector_push(RzVector *vec, void *x)
#define rz_vector_foreach(vec, it)
RZ_API void rz_vector_free(RzVector *vec)
RZ_API RzVector * rz_vector_new(size_t elem_size, RzVectorFree free, void *free_user)
static bool rz_vector_empty(const RzVector *vec)
RzAnalysisAddrHintRecordsCb cb
RzAnalysisRangedHintRecordBase base
RzAnalysisRangedHintRecordBase base
ut64(WINAPI *w32_GetEnabledXStateFeatures)()