8 #define DB analysis->sdb_cc
28 char *
p = strchr(
e,
'(');
45 char *ccname = strchr(
e,
' ');
61 rz_list_foreach (ccArgs,
iter,
arg) {
62 if (!strcmp(
arg,
"stack")) {
85 RZ_LOG_ERROR(
"Cannot find return key in calling convention named '%s'\n",
name);
119 return x && *
x && !strcmp(
x,
"cc");
129 const char *query =
sdb_fmt(
"cc.%s.arg%d", convention,
n);
132 query =
sdb_fmt(
"cc.%s.argn", convention);
140 const char *query =
sdb_fmt(
"cc.%s.self", convention);
157 const char *query =
sdb_fmt(
"cc.%s.error", convention);
174 static void *oldDB =
NULL;
175 static char *oldCC =
NULL;
176 static int oldArg = 0;
177 if (oldDB ==
DB && !strcmp(cc, oldCC)) {
184 const char *query =
sdb_fmt(
"cc.%s.arg%d", cc,
i);
196 char *query =
sdb_fmt(
"cc.%s.ret", convention);
static const char * arg(RzAnalysis *a, csh *handle, cs_insn *insn, char *buf, int n)
static RzNumCalcValue expr(RzNum *, RzNumCalc *, int)
RZ_API const char * rz_analysis_syscc_default(RzAnalysis *analysis)
RZ_API void rz_analysis_set_syscc_default(RzAnalysis *analysis, const char *cc)
RZ_API const char * rz_analysis_cc_func(RzAnalysis *analysis, const char *func_name)
RZ_API void rz_analysis_cc_del(RzAnalysis *analysis, const char *name)
RZ_API char * rz_analysis_cc_get(RzAnalysis *analysis, const char *name)
RZ_API bool rz_analysis_cc_set(RzAnalysis *analysis, const char *expr)
RZ_API void rz_analysis_cc_set_error(RzAnalysis *analysis, const char *convention, const char *error)
RZ_API const char * rz_analysis_cc_arg(RzAnalysis *analysis, const char *convention, int n)
RZ_API bool rz_analysis_cc_exist(RzAnalysis *analysis, const char *convention)
RZ_API void rz_analysis_cc_set_self(RzAnalysis *analysis, const char *convention, const char *self)
RZ_API const char * rz_analysis_cc_self(RzAnalysis *analysis, const char *convention)
RZ_API const char * rz_analysis_cc_default(RzAnalysis *analysis)
RZ_API int rz_analysis_cc_max_arg(RzAnalysis *analysis, const char *cc)
RZ_API const char * rz_analysis_cc_error(RzAnalysis *analysis, const char *convention)
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_analysis_set_cc_default(RzAnalysis *analysis, const char *cc)
RZ_API char * sdb_fmt(const char *fmt,...)
RZ_API void Ht_() free(HtName_(Ht) *ht)
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_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")
RZ_API void ls_free(SdbList *list)
#define ls_foreach(list, it, pos)
#define RZ_ANALYSIS_CC_MAXARG
#define rz_return_if_fail(expr)
#define rz_return_val_if_fail(expr, val)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API void rz_str_trim(RZ_NONNULL RZ_INOUT char *str)
Removes whitespace characters (space, tab, newline etc.) from the beginning and end of a string.
RZ_API int rz_str_cmp(const char *dst, const char *orig, int len)
RZ_API RzList * rz_str_split_list(char *str, const char *c, int n)
Split the string str according to the substring c and returns a RzList with the result.
RZ_API const char * rz_str_constpool_get(RzStrConstPool *pool, 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 const char * rz_strbuf_initf(RzStrBuf *sb, const char *fmt,...)
RZ_API const char * rz_strbuf_setf(RzStrBuf *sb, const char *fmt,...) RZ_PRINTF_CHECK(2
RZ_API void rz_strbuf_fini(RzStrBuf *sb)
RZ_API RzStrBuf * rz_strbuf_new(const char *s)
RZ_API bool rz_strbuf_appendf(RzStrBuf *sb, const char *fmt,...) RZ_PRINTF_CHECK(2
RZ_API int sdb_set(Sdb *s, const char *key, const char *val, ut32 cas)
RZ_API const char * sdb_const_get(Sdb *s, const char *key, ut32 *cas)
RZ_API int sdb_unset(Sdb *s, const char *key, ut32 cas)
RZ_API SdbList * sdb_foreach_list(Sdb *s, bool sorted)
static char * sdbkv_key(const SdbKv *kv)
static char * sdbkv_value(const SdbKv *kv)
RZ_API RZ_BORROW const char * rz_type_func_cc(RzTypeDB *typedb, RZ_NONNULL const char *name)
Searches for the RzCallable type in types database and returns calling convention.
void error(const char *msg)