Change arch plugin definition ##arch

This commit is contained in:
condret 2022-09-29 13:10:02 +02:00
parent a2298af23b
commit db1a5d132b
3 changed files with 3 additions and 3 deletions

View File

@ -135,5 +135,5 @@ R_API int r_arch_decode(RArch *arch, const char *dname, RArchOp *op, ut64 addr,
if (!decoder || !decoder->p->decode) {
return -1;
}
return decoder->p->decode (decoder->user, arch->cfg, op, addr, data, len, mask);
return decoder->p->decode (arch->cfg, op, addr, data, len, mask, decoder->user);
}

View File

@ -97,7 +97,7 @@ static int i4004_get_ins_len(ut8 hex) {
return ret;
}
static int i4004_decode(void *user, RArchConfig *cfg, RArchOp *op, ut64 addr, const ut8 *buf, int len, ut32 mask) {
static int i4004_decode(RArchConfig *cfg, RArchOp *op, ut64 addr, const ut8 *buf, int len, ut32 mask, void *user) {
char basm[64];
const size_t basz = sizeof (basm);
int rlen = i4004_get_ins_len (*buf);

View File

@ -354,7 +354,7 @@ typedef struct r_arch_plugin_t {
bool (*init)(void **user);
void (*fini)(void *user);
int (*info)(RArchConfig *cfg, ut32 query);
int (*decode)(void *user, RArchConfig *cfg, RArchOp *op, ut64 addr, const ut8 *data, int len, ut32 mask);
int (*decode)(RArchConfig *cfg, RArchOp *op, ut64 addr, const ut8 *data, int len, ut32 mask, void *user);
bool (*set_reg_profile)(RArchConfig *cfg, struct r_reg_t *reg);
//TODO: reenable this later
// bool (*esil_init)(RAnalEsil *esil);