22 if (!strcmp(cc,
"stdcall") || !strcmp(cc,
"pascal")) {
71 if (!fcn_name || !
arg || !analysis) {
77 eprintf(
"Missing type for function argument (%s)\n", fcn_name);
80 arg->c_type =
arg->orig_c_type;
87 const char *
str = func_name;
88 const char *
name = func_name;
92 while ((
str = strchr(
str,
'.'))) {
125 eprintf(
"Cannot allocate %d byte(s)\n", bsize);
134 if (onstack || ((opt !=
'd' && opt !=
'x') && !onstack)) {
144 if (opt !=
'd' && opt !=
'x') {
154 if (
buf[
i] ==
'\0') {
164 rz_cons_print(
"...");
221 bool onstack =
false;
222 const char *fcn_name =
NULL;
229 fcn_name = fcn->
name;
234 fcn_name = item->
name;
239 if (!rz_list_empty(
list)) {
242 if (
arg->cc_source && !strncmp(
arg->cc_source,
"stack", 5)) {
302 if (
src && !strcmp(
src,
"stack_rev")) {
307 spv +=
arg->size ?
arg->size : s_width;
319 if (
src && !strncmp(
src,
"stack", 5)) {
326 const char *
cs =
arg->cc_source;
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 RzAnalysisFunction * rz_analysis_get_function_at(RzAnalysis *analysis, ut64 addr)
static const char * arg(RzAnalysis *a, csh *handle, cs_insn *insn, char *buf, int n)
int bits(struct state *s, int need)
RZ_API RzAnalysisOp * rz_core_analysis_op(RzCore *core, ut64 addr, int mask)
static void print_arg_str(int argcnt, const char *name, bool color)
RZ_API void rz_core_print_func_args(RzCore *core)
static void print_format_values(RzCore *core, const char *fmt, bool onstack, ut64 src, bool color)
RZ_DEPRECATE RZ_API bool rz_core_arg_set(RzCore *core, const char *cc, int num, ut64 val)
Set the value of the num-th argument in the current debug or emulation state.
RZ_API RZ_OWN RzList * rz_core_get_func_args(RzCore *core, const char *fcn_name)
static void set_fcn_args_info(RzAnalysisFuncArg *arg, RzAnalysis *analysis, const char *fcn_name, const char *cc, int arg_num)
static ut64 get_buf_val(ut8 *buf, int endian, int width)
static void rz_analysis_fcn_arg_free(RzAnalysisFuncArg *arg)
RZ_DEPRECATE RZ_API ut64 rz_core_arg_get(RzCore *core, const char *cc, int num)
Get the value of the num-th argument from the current debug or emulation state.
RZ_API char * resolve_fcn_name(RzAnalysis *analysis, const char *func_name)
RZ_API const char * rz_analysis_syscc_default(RzAnalysis *analysis)
RZ_API const char * rz_analysis_cc_func(RzAnalysis *analysis, const char *func_name)
RZ_API const char * rz_analysis_cc_arg(RzAnalysis *analysis, const char *convention, int n)
RZ_API const char * rz_analysis_cc_default(RzAnalysis *analysis)
RZ_API bool rz_core_is_debug(RzCore *core)
Check whether the core is in debug mode (equivalent to cfg.debug)
RZ_API ut64 rz_config_get_i(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API void rz_cons_newline(void)
RZ_API int rz_cons_printf(const char *format,...)
RZ_API void rz_cons_println(const char *str)
RZ_API RzReg * rz_core_reg_default(RzCore *core)
Get the currently relevant RzReg.
RZ_API ut64 rz_core_reg_getv_by_role_or_name(RzCore *core, const char *name)
rz_reg_getv_by_role_or_name() on rz_core_reg_default()
RZ_API bool rz_core_reg_set_by_role_or_name(RzCore *core, const char *name, ut64 num)
set on rz_core_reg_default()
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 int rz_debug_reg_sync(RzDebug *dbg, int type, int write)
RZ_API RzFlagItem * rz_flag_get_i(RzFlag *f, ut64 off)
RZ_API void Ht_() free(HtName_(Ht) *ht)
static void list(RzEgg *egg)
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
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.
void * malloc(size_t size)
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode static oldfd struct tms static buf static getgid static geteuid const char static filename static arg static mask struct ustat static ubuf static getppid static setsid static egid sigset_t static set struct timeval struct timezone static tz fd_set fd_set fd_set struct timeval static timeout const char char static bufsiz const char static swapflags void static offset const char static length static mode static who const char struct statfs static buf unsigned unsigned num
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 ut64 rz_reg_getv(RzReg *reg, const char *name)
RZ_API const char * rz_reg_get_name(RzReg *reg, int role)
RZ_API ut64 rz_reg_get_value_by_role(RzReg *reg, RzRegisterId role)
@ RZ_ANALYSIS_OP_MASK_BASIC
@ RZ_ANALYSIS_OP_TYPE_CALL
#define rz_return_val_if_fail(expr, val)
static ut64 rz_read_ble64(const void *src, bool big_endian)
static ut32 rz_read_ble32(const void *src, bool big_endian)
RZ_API bool rz_io_read_at(RzIO *io, ut64 addr, ut8 *buf, int len)
void(* RzListFree)(void *ptr)
#define RZ_STR_ISEMPTY(x)
#define rz_strf(buf,...)
Convenience macro for local temporary strings.
RZ_API int rz_type_func_args_count(RzTypeDB *typedb, RZ_NONNULL const char *name)
Searches for the RzCallable type in types database and returns arguments' count.
RZ_API RZ_BORROW const char * rz_type_func_args_name(RzTypeDB *typedb, RZ_NONNULL const char *name, int i)
Searches for the RzCallable type in types database and returns argument name.
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 RZ_BORROW RzType * rz_type_func_args_type(RzTypeDB *typedb, RZ_NONNULL const char *name, int i)
Searches for the RzCallable type in types database and returns argument type.
RZ_API ut64 rz_type_db_get_bitsize(const RzTypeDB *typedb, RZ_NONNULL RzType *type)
Returns the type size in bits (target dependent)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()