mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 21:29:49 +00:00
Rename many deprecated R_ANAL_ARCHINFO into R_ARCH_INFO
This commit is contained in:
parent
d87153ffee
commit
c7dbf4f4f0
@ -708,7 +708,7 @@ R_API bool r_anal_is_prelude(RAnal *anal, ut64 addr, const ut8 *data, int len) {
|
||||
}
|
||||
}
|
||||
if (!data) {
|
||||
const int maxis = r_anal_archinfo (anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
const int maxis = r_anal_archinfo (anal, R_ARCH_INFO_MAXOP_SIZE);
|
||||
owned = malloc (maxis);
|
||||
if (!owned) {
|
||||
return false;
|
||||
|
@ -88,7 +88,7 @@ R_API int r_anal_opasm(RAnal *anal, ut64 addr, const char *s, ut8 *outbuf, int o
|
||||
}
|
||||
r_anal_op_set_mnemonic (op, addr, s);
|
||||
if (!r_arch_encode (anal->arch, op, 0)) {
|
||||
int ret = r_arch_info (anal->arch, R_ANAL_ARCHINFO_INV_OP_SIZE);
|
||||
int ret = r_arch_info (anal->arch, R_ARCH_INFO_INVOP_SIZE);
|
||||
if (ret < 1) {
|
||||
ret = r_arch_info (anal->arch, R_ARCH_INFO_CODE_ALIGN);
|
||||
if (ret < 1) {
|
||||
@ -183,7 +183,7 @@ R_API int r_anal_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, int le
|
||||
r_anal_op_set_bytes (op, addr, data, len);
|
||||
if (!r_arch_decode (anal->arch, op, mask) || op->size <= 0) {
|
||||
op->type = R_ANAL_OP_TYPE_ILL;
|
||||
op->size = r_anal_archinfo (anal, R_ANAL_ARCHINFO_INV_OP_SIZE);
|
||||
op->size = r_anal_archinfo (anal, R_ARCH_INFO_INVOP_SIZE);
|
||||
if (op->size < 0) {
|
||||
op->size = 1;
|
||||
}
|
||||
@ -196,7 +196,7 @@ R_API int r_anal_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, int le
|
||||
// ret = anal->arch->op (anal, op, addr, data, len, mask);
|
||||
if (ret < 1) {
|
||||
op->type = R_ANAL_OP_TYPE_ILL;
|
||||
op->size = r_anal_archinfo (anal, R_ANAL_ARCHINFO_INV_OP_SIZE);
|
||||
op->size = r_anal_archinfo (anal, R_ARCH_INFO_INVOP_SIZE);
|
||||
if (op->size < 0) {
|
||||
op->size = 1;
|
||||
}
|
||||
@ -211,7 +211,7 @@ R_API int r_anal_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, int le
|
||||
ret = anal->cur->op (anal, op, addr, data, len, mask);
|
||||
if (ret < 1) {
|
||||
op->type = R_ANAL_OP_TYPE_ILL;
|
||||
op->size = r_anal_archinfo (anal, R_ANAL_ARCHINFO_INV_OP_SIZE);
|
||||
op->size = r_anal_archinfo (anal, R_ARCH_INFO_INVOP_SIZE);
|
||||
if (op->size < 0) {
|
||||
op->size = 1;
|
||||
ret = -1;
|
||||
@ -246,7 +246,7 @@ R_API int r_anal_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, int le
|
||||
if (ret == -1) {
|
||||
free (op->mnemonic);
|
||||
op->mnemonic = strdup ("invalid");
|
||||
int minop = r_arch_info (anal->arch, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
int minop = r_arch_info (anal->arch, R_ARCH_INFO_MINOP_SIZE);
|
||||
op->size = minop;
|
||||
ut64 nextpc = op->addr + op->size;
|
||||
if (codealign > 1) {
|
||||
|
@ -966,15 +966,15 @@ static int esil_6502_fini(REsil *esil) {
|
||||
|
||||
static int archinfo(RArchSession *a, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 3;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 1;
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -1116,15 +1116,15 @@ static bool esil_cb(RArchSession *as, RArchEsilAction action) {
|
||||
|
||||
static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 3;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 1;
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -1160,10 +1160,10 @@ static int archinfo(RArchSession *as, ut32 query) {
|
||||
switch (query) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
/* all ops are at least 1 word long */
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 8;
|
||||
default:
|
||||
return -1;
|
||||
|
@ -126,11 +126,11 @@ static int assemble(RAsm *a, RAsmOp *op, const char *buf) {
|
||||
|
||||
static int archinfo(RArchSession *a, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
break;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
if (a->config && a->config->bits == 16) {
|
||||
return 2;
|
||||
|
@ -4643,11 +4643,11 @@ static bool decode(RArchSession *as, RAnalOp *op, RAnalOpMask mask) {
|
||||
|
||||
static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
break;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
if (as->config && as->config->bits == 16) {
|
||||
return 2;
|
||||
|
@ -613,10 +613,10 @@ static int archinfo(RArchSession *as, ut32 q) {
|
||||
if (q == R_ARCH_INFO_CODE_ALIGN) {
|
||||
return (as && as->config->bits == 16)? 2: 4;
|
||||
}
|
||||
if (q == R_ANAL_ARCHINFO_MAX_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_MAXOP_SIZE) {
|
||||
return 4;
|
||||
}
|
||||
if (q == R_ANAL_ARCHINFO_MIN_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_MINOP_SIZE) {
|
||||
return (as && as->config->bits == 16)? 2: 4;
|
||||
}
|
||||
return 4; // XXX
|
||||
|
@ -2579,7 +2579,7 @@ static bool decode(RArchSession *as, RAnalOp *op, RArchDecodeMask mask) {
|
||||
}
|
||||
|
||||
static int archinfo(RArchSession *anal, ut32 q) {
|
||||
if (q == R_ANAL_ARCHINFO_DATA_ALIGN) {
|
||||
if (q == R_ARCH_INFO_DATA_ALIGN) {
|
||||
return 4;
|
||||
}
|
||||
if (q == R_ARCH_INFO_CODE_ALIGN) {
|
||||
@ -2588,10 +2588,10 @@ static int archinfo(RArchSession *anal, ut32 q) {
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
if (q == R_ANAL_ARCHINFO_MAX_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_MAXOP_SIZE) {
|
||||
return 4;
|
||||
}
|
||||
if (q == R_ANAL_ARCHINFO_MIN_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_MINOP_SIZE) {
|
||||
if (anal && anal->config->bits == 16) {
|
||||
return 2;
|
||||
}
|
||||
|
@ -2305,10 +2305,10 @@ static int info(RArchSession *as, ut32 q) {
|
||||
if (q == R_ARCH_INFO_CODE_ALIGN) {
|
||||
return 2;
|
||||
}
|
||||
if (q == R_ANAL_ARCHINFO_MAX_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_MAXOP_SIZE) {
|
||||
return 4;
|
||||
}
|
||||
if (q == R_ANAL_ARCHINFO_MIN_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_MINOP_SIZE) {
|
||||
return 2;
|
||||
}
|
||||
return 2; // XXX
|
||||
|
@ -306,7 +306,7 @@ static bool encode(RArchSession *as, RAnalOp *op, RArchEncodeMask mask) {
|
||||
|
||||
static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 0xff;
|
||||
// return 32;
|
||||
}
|
||||
|
@ -1173,15 +1173,15 @@ static char *regs(RArchSession *as) {
|
||||
|
||||
static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 8;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 8;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 8;
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 8;
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -620,15 +620,15 @@ static int archinfo(RArchSession *as, ut32 q) {
|
||||
const int bits = as->config->bits;
|
||||
switch (q) {
|
||||
// R_ARCH_INFO_MINOPSZ
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 8;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return (bits == 64)? 16: 8;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 8;
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 8;
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -115,11 +115,11 @@ static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 4;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
|
@ -329,13 +329,13 @@ static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 8;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 4;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 2;
|
||||
}
|
||||
return 4;
|
||||
|
@ -1695,11 +1695,11 @@ static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 6;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 2;
|
||||
}
|
||||
return -1;
|
||||
|
@ -155,7 +155,7 @@ static bool decode(RArchSession *as, RAnalOp *op, RAnalOpMask mask) {
|
||||
}
|
||||
|
||||
static int archinfo(RArchSession *as, ut32 q) {
|
||||
if (q == R_ANAL_ARCHINFO_MAX_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_MAXOP_SIZE) {
|
||||
return 18;
|
||||
}
|
||||
return 1;
|
||||
|
@ -1529,11 +1529,11 @@ static int info(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 0;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 3;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 1;
|
||||
}
|
||||
return -1;
|
||||
|
@ -731,11 +731,11 @@ static int archinfo(RArchSession *as, ut32 q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 4;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
|
@ -55,7 +55,7 @@ static char *get_reg_profile (RArchSession *as) {
|
||||
|
||||
static int archinfo (RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 3;
|
||||
}
|
||||
return 1;
|
||||
|
@ -857,13 +857,13 @@ static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 6;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
{
|
||||
const char *cpu = as->config->cpu;
|
||||
if (strstr (cpu, "68030") || strstr (cpu, "68040") || strstr (cpu, "68060")) {
|
||||
|
@ -105,9 +105,9 @@ static bool decode(RArchSession *as, RAnalOp *op, RAnalOpMask mask) {
|
||||
|
||||
static int info(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 6;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
|
@ -122,7 +122,7 @@ static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
return 2; // data alignment depends on word size used
|
||||
#if 0
|
||||
case R_ARCH_INFO_DATA4_ALIGN:
|
||||
@ -130,9 +130,9 @@ static int archinfo(RArchSession *as, ut32 q) {
|
||||
case R_ARCH_INFO_DATA8_ALIGN:
|
||||
return 8;
|
||||
#endif
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 5;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -1341,7 +1341,7 @@ static char *get_reg_profile(RArchSession * as) {
|
||||
|
||||
static int archinfo(RArchSession *as, ut32 q) {
|
||||
// R2_590 - R_ARCH_INFO_CODE_ALIGN instead of R_ANAL_ARCHINF..
|
||||
if (q == R_ARCH_INFO_CODE_ALIGN || q == R_ANAL_ARCHINFO_MIN_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_CODE_ALIGN || q == R_ARCH_INFO_MINOP_SIZE) {
|
||||
const char *cpu = as->config->cpu;
|
||||
if (cpu && !strcmp (cpu, "micro")) {
|
||||
return 2; // (anal->bits == 16) ? 2: 4;
|
||||
|
@ -1906,7 +1906,7 @@ static char *regs(RArchSession *as) {
|
||||
static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
{
|
||||
const char *cpu = as->config->cpu;
|
||||
if (cpu && !strcmp (cpu, "micro")) {
|
||||
|
@ -43,9 +43,9 @@ static bool _is_any(const char *str, ...) {
|
||||
|
||||
static int info(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 6;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
|
@ -77,15 +77,15 @@ static bool pdp11_op(RArchSession *a, RAnalOp *op, RArchDecodeMask mask) {
|
||||
|
||||
static int info(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 4;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 2;
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -920,15 +920,15 @@ static int pickle_info(RArchSession *s, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 0;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
// some ops accept newline terminated strings of arbitrary len...
|
||||
if (s->data) {
|
||||
return *(int *)s->data;
|
||||
}
|
||||
return MAXSTRLEN;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -54,13 +54,13 @@ static bool disassemble(RArchSession *s, RAnalOp *op, RArchDecodeMask mask, int
|
||||
|
||||
static int archinfo(RArchSession *as, ut32 query) {
|
||||
switch (query) {
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
{
|
||||
int pyversion = pyversion_toi (as->config->cpu);
|
||||
return (pyversion < 370)? 1: 2;
|
||||
}
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
{
|
||||
int pyversion = pyversion_toi (as->config->cpu);
|
||||
return (pyversion < 370)? 3: 2;
|
||||
|
@ -980,11 +980,11 @@ static int info(RArchSession *s, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 4;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
|
@ -601,11 +601,11 @@ static int archinfo(RArchSession *s, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 0;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 4;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
|
@ -330,12 +330,12 @@ static char *regs(RArchSession *as) {
|
||||
|
||||
static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 6;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
|
@ -119,12 +119,12 @@ static char* regs(RArchSession *as) {
|
||||
|
||||
static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 6;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
|
@ -78,12 +78,12 @@ static int snes_info(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
// some ops accept newline terminated strings of arbitrary len...
|
||||
return 3;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 1;
|
||||
}
|
||||
return -1;
|
||||
|
@ -459,11 +459,11 @@ static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 0;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 8;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 1;
|
||||
}
|
||||
return -1;
|
||||
|
@ -163,19 +163,19 @@ static char *get_reg_profile(RArchSession *as) {
|
||||
}
|
||||
|
||||
static int archinfo(RArchSession *as, ut32 q) {
|
||||
if (q == R_ANAL_ARCHINFO_DATA_ALIGN) {
|
||||
if (q == R_ARCH_INFO_DATA_ALIGN) {
|
||||
return 2;
|
||||
}
|
||||
if (q == R_ARCH_INFO_CODE_ALIGN) {
|
||||
return 2;
|
||||
}
|
||||
if (q == R_ANAL_ARCHINFO_INV_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_INVOP_SIZE) {
|
||||
return 2;
|
||||
}
|
||||
if (q == R_ANAL_ARCHINFO_MAX_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_MAXOP_SIZE) {
|
||||
return 4;
|
||||
}
|
||||
if (q == R_ANAL_ARCHINFO_MIN_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_MINOP_SIZE) {
|
||||
return 2;
|
||||
}
|
||||
return 4; // XXX
|
||||
|
@ -224,19 +224,19 @@ static bool decode(RArchSession *as, RAnalOp *op, RAnalOpMask mask) {
|
||||
}
|
||||
|
||||
static int archinfo(RArchSession *as, ut32 q) {
|
||||
if (q == R_ANAL_ARCHINFO_DATA_ALIGN) {
|
||||
if (q == R_ARCH_INFO_DATA_ALIGN) {
|
||||
return 2;
|
||||
}
|
||||
if (q == R_ARCH_INFO_CODE_ALIGN) {
|
||||
return 2;
|
||||
}
|
||||
if (q == R_ANAL_ARCHINFO_INV_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_INVOP_SIZE) {
|
||||
return 2;
|
||||
}
|
||||
if (q == R_ANAL_ARCHINFO_MAX_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_MAXOP_SIZE) {
|
||||
return 4;
|
||||
}
|
||||
if (q == R_ANAL_ARCHINFO_MIN_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_MINOP_SIZE) {
|
||||
return 2;
|
||||
}
|
||||
return 4; // XXX
|
||||
|
@ -451,11 +451,11 @@ static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 4;
|
||||
}
|
||||
return 0;
|
||||
|
@ -876,11 +876,11 @@ static RList *preludes(RArchSession *as) {
|
||||
static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 8;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
|
@ -239,16 +239,16 @@ static char *get_reg_profile(RArchSession *as) {
|
||||
}
|
||||
|
||||
static int archinfo(RArchSession *as, ut32 q) {
|
||||
if (q == R_ANAL_ARCHINFO_DATA_ALIGN) {
|
||||
if (q == R_ARCH_INFO_DATA_ALIGN) {
|
||||
return 1;
|
||||
}
|
||||
if (q == R_ARCH_INFO_CODE_ALIGN) {
|
||||
return 1;
|
||||
}
|
||||
if (q == R_ANAL_ARCHINFO_MAX_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_MAXOP_SIZE) {
|
||||
return 56;
|
||||
}
|
||||
if (q == R_ANAL_ARCHINFO_MIN_OP_SIZE) {
|
||||
if (q == R_ARCH_INFO_MINOP_SIZE) {
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
|
@ -4392,11 +4392,11 @@ static int archinfo(RArchSession *as, ut32 q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
return 0;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 16;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -2089,12 +2089,12 @@ static char *regs(RArchSession *as) {
|
||||
|
||||
static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 8;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 2;
|
||||
case R_ANAL_ARCHINFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_DATA_ALIGN:
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 1;
|
||||
}
|
||||
|
@ -2797,11 +2797,11 @@ static int archinfo(RArchSession *as, ut32 q) {
|
||||
switch (q) {
|
||||
case R_ARCH_INFO_CODE_ALIGN:
|
||||
return 0;
|
||||
case R_ANAL_ARCHINFO_MAX_OP_SIZE:
|
||||
case R_ARCH_INFO_MAXOP_SIZE:
|
||||
return 3;
|
||||
case R_ANAL_ARCHINFO_INV_OP_SIZE:
|
||||
case R_ARCH_INFO_INVOP_SIZE:
|
||||
return 1;
|
||||
case R_ANAL_ARCHINFO_MIN_OP_SIZE:
|
||||
case R_ARCH_INFO_MINOP_SIZE:
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
|
@ -611,7 +611,7 @@ R_API void r_core_anal_type_match(RCore *core, RAnalFunction *fcn) {
|
||||
Sdb *TDB = anal->sdb_types;
|
||||
int ret;
|
||||
const bool chk_constraint = r_config_get_b (core->config, "anal.types.constraint");
|
||||
const int mininstrsz = r_anal_archinfo (anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
const int mininstrsz = r_anal_archinfo (anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
const int minopcode = R_MAX (1, mininstrsz);
|
||||
int cur_idx, prev_idx = 0;
|
||||
RConfigHold *hc = r_config_hold_new (core->config);
|
||||
|
@ -1139,7 +1139,7 @@ R_API RAnalOp* r_core_anal_op(RCore *core, ut64 addr, int mask) {
|
||||
if (!op) {
|
||||
return NULL;
|
||||
}
|
||||
int maxopsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
int maxopsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MAXOP_SIZE);
|
||||
if (sizeof (buf) < maxopsz) {
|
||||
maxopsz = sizeof (buf);
|
||||
}
|
||||
@ -4542,8 +4542,8 @@ R_API int r_core_anal_search_xrefs(RCore *core, ut64 from, ut64 to, PJ *pj, int
|
||||
r_cons_break_push (NULL, NULL);
|
||||
at = from;
|
||||
st64 asm_sub_varmin = r_config_get_i (core->config, "asm.sub.varmin");
|
||||
int maxopsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
int minopsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
int maxopsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MAXOP_SIZE);
|
||||
int minopsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
int codealign = r_anal_archinfo (core->anal, R_ARCH_INFO_CODE_ALIGN);
|
||||
if (maxopsz < 1) {
|
||||
maxopsz = 4;
|
||||
|
@ -6662,7 +6662,7 @@ R_API int r_core_esil_step(RCore *core, ut64 until_addr, const char *until_expr,
|
||||
int tail_return_value = 0;
|
||||
int ret;
|
||||
ut8 code[32];
|
||||
int maxopsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
int maxopsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MAXOP_SIZE);
|
||||
RAnalOp op = {0};
|
||||
REsil *esil = core->anal->esil;
|
||||
// esil->trap = 0;
|
||||
@ -6685,7 +6685,7 @@ R_API int r_core_esil_step(RCore *core, ut64 until_addr, const char *until_expr,
|
||||
ut64 addr = -1;
|
||||
ut64 oaddr = -1;
|
||||
int minopsz = r_arch_info (core->anal->arch, R_ARCH_INFO_MIN_OP_SIZE);
|
||||
int dataAlign = r_anal_archinfo (esil->anal, R_ANAL_ARCHINFO_DATA_ALIGN);
|
||||
int dataAlign = r_anal_archinfo (esil->anal, R_ARCH_INFO_DATA_ALIGN);
|
||||
ut64 naddr = addr + minopsz;
|
||||
bool notfirst = false;
|
||||
if (maxopsz > sizeof (code)) {
|
||||
@ -7060,13 +7060,13 @@ static void cmd_anal_info(RCore *core, const char *input) {
|
||||
if (input[1] == 'j') { // "aiaj"
|
||||
PJ *pj = pj_new ();
|
||||
pj_o (pj);
|
||||
int v = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
int v = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
pj_ki (pj, "minopsz", v);
|
||||
v = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
v = r_anal_archinfo (core->anal, R_ARCH_INFO_MAXOP_SIZE);
|
||||
pj_ki (pj, "maxopsz", v);
|
||||
v = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_INV_OP_SIZE);
|
||||
v = r_anal_archinfo (core->anal, R_ARCH_INFO_INVOP_SIZE);
|
||||
pj_ki (pj, "invopsz", v);
|
||||
v = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_DATA_ALIGN);
|
||||
v = r_anal_archinfo (core->anal, R_ARCH_INFO_DATA_ALIGN);
|
||||
pj_ki (pj, "dtalign", v);
|
||||
v = r_anal_archinfo (core->anal, R_ARCH_INFO_CODE_ALIGN);
|
||||
pj_ki (pj, "codealign", v);
|
||||
@ -7075,13 +7075,13 @@ static void cmd_anal_info(RCore *core, const char *input) {
|
||||
r_cons_printf ("%s\n", s);
|
||||
free (s);
|
||||
} else {
|
||||
int v = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
int v = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
r_cons_printf ("minopsz %d\n", v);
|
||||
v = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
v = r_anal_archinfo (core->anal, R_ARCH_INFO_MAXOP_SIZE);
|
||||
r_cons_printf ("maxopsz %d\n", v);
|
||||
v = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_INV_OP_SIZE);
|
||||
v = r_anal_archinfo (core->anal, R_ARCH_INFO_INVOP_SIZE);
|
||||
r_cons_printf ("invopsz %d\n", v);
|
||||
v = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_DATA_ALIGN);
|
||||
v = r_anal_archinfo (core->anal, R_ARCH_INFO_DATA_ALIGN);
|
||||
r_cons_printf ("dtalign %d\n", v);
|
||||
v = r_anal_archinfo (core->anal, R_ARCH_INFO_CODE_ALIGN);
|
||||
r_cons_printf ("codealign %d\n", v);
|
||||
@ -7466,7 +7466,7 @@ static bool cmd_aea(RCore* core, int mode, ut64 addr, int length, const char *es
|
||||
if (!core) {
|
||||
return false;
|
||||
}
|
||||
int maxopsize = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
int maxopsize = r_anal_archinfo (core->anal, R_ARCH_INFO_MAXOP_SIZE);
|
||||
if (maxopsize < 1) {
|
||||
maxopsize = 16;
|
||||
}
|
||||
@ -7489,7 +7489,7 @@ static bool cmd_aea(RCore* core, int mode, ut64 addr, int length, const char *es
|
||||
if (!buf) {
|
||||
return false;
|
||||
}
|
||||
int minopsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
int minopsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
(void)r_io_read_at (core->io, addr, (ut8 *)buf, buf_sz);
|
||||
aea_stats_init (&stats);
|
||||
r_reg_arena_push (core->anal->reg);
|
||||
@ -7675,7 +7675,7 @@ static void cmd_aespc(RCore *core, ut64 addr, ut64 until_addr, int ninstr) {
|
||||
int i, j = 0;
|
||||
RAnalOp aop = {0};
|
||||
int ret , bsize = R_MAX (4096, core->blocksize);
|
||||
const int mininstrsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
const int mininstrsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
const int minopcode = R_MAX (1, mininstrsz);
|
||||
const char *pc = r_reg_get_name (core->dbg->reg, R_REG_NAME_PC);
|
||||
|
||||
@ -9592,7 +9592,7 @@ static void _anal_calls(RCore *core, ut64 addr, ut64 addr_end, bool printCommand
|
||||
return;
|
||||
}
|
||||
memset (block1, -1, bsz);
|
||||
int minop = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
int minop = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
if (minop < 1) {
|
||||
minop = 1;
|
||||
}
|
||||
|
@ -5801,7 +5801,7 @@ static void core_print_decompile(RCore *core, const char *input) {
|
||||
count = 1;
|
||||
}
|
||||
ut64 addr = core->offset;
|
||||
int minopsize = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
int minopsize = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
const int bits = r_config_get_i (core->config, "asm.bits");
|
||||
REsilC *ec = r_esil_toc_new (core->anal, bits);
|
||||
for (i = 0; i < count; i++) {
|
||||
|
@ -1975,7 +1975,7 @@ static const char *get_syscall_register(RCore *core) {
|
||||
static int emulateSyscallPrelude(RCore *core, ut64 at, ut64 curpc) {
|
||||
int i, bsize = R_MIN (64, core->blocksize);
|
||||
RAnalOp aop;
|
||||
const int mininstrsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
const int mininstrsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
const int minopcode = R_MAX (1, mininstrsz);
|
||||
const char *a0 = get_syscall_register (core);
|
||||
const char *pc = r_reg_get_name (core->dbg->reg, R_REG_NAME_PC);
|
||||
@ -2043,7 +2043,7 @@ static void do_syscall_search(RCore *core, struct search_parameters *param) {
|
||||
int kwidx = core->search->n_kws;
|
||||
RIOMap* map;
|
||||
RListIter *iter;
|
||||
const int mininstrsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
const int mininstrsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
const int minopcode = R_MAX (1, mininstrsz);
|
||||
REsil *esil;
|
||||
int align = core->search->align;
|
||||
@ -3797,8 +3797,8 @@ static void __core_cmd_search_backward(RCore *core, int delta) {
|
||||
RAnalOp analop;
|
||||
ut64 at;
|
||||
r_cons_break_push (NULL, NULL);
|
||||
int minopsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
int maxopsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
int minopsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
int maxopsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MAXOP_SIZE);
|
||||
if (minopsz < 1 || maxopsz < 1) {
|
||||
R_LOG_ERROR ("Invalid MAX_OPSIZE. assuming 4");
|
||||
minopsz = 4;
|
||||
|
@ -284,7 +284,7 @@ static int cmd_seek_opcode_backward(RCore *core, int numinstr) {
|
||||
ret = r_core_asm_bwdis_len (core, &instr_len, &addr, numinstr);
|
||||
#endif
|
||||
addr = core->offset;
|
||||
const int mininstrsize = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
const int mininstrsize = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
for (i = 0; i < numinstr; i++) {
|
||||
ut64 prev_addr = r_core_prevop_addr_force (core, addr, 1);
|
||||
if (prev_addr == UT64_MAX) {
|
||||
|
@ -884,7 +884,7 @@ R_API int r_core_get_stacksz(RCore *core, ut64 from, ut64 to) {
|
||||
if (from >= to) {
|
||||
return 0;
|
||||
}
|
||||
const int mininstrsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
const int mininstrsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
const int minopcode = R_MAX (1, mininstrsz);
|
||||
while (at < to) {
|
||||
RAnalOp *op = r_core_anal_op (core, at, R_ARCH_OP_MASK_BASIC);
|
||||
@ -955,8 +955,8 @@ R_API void r_core_link_stroff(RCore *core, RAnalFunction *fcn) {
|
||||
}
|
||||
r_esil_setup (esil, core->anal, 0, 0, 0);
|
||||
int i, ret, bsize = R_MAX (64, core->blocksize);
|
||||
const int mininstrsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
const int maxinstrsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
const int mininstrsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
const int maxinstrsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MAXOP_SIZE);
|
||||
const int minopcode = R_MAX (1, mininstrsz);
|
||||
ut8 *buf = malloc (bsize);
|
||||
if (!buf) {
|
||||
|
@ -486,7 +486,7 @@ static ut64 numvar_instruction_backward(RCore *core, const char *input) {
|
||||
} else {
|
||||
ut8 data[32];
|
||||
addr = core->offset;
|
||||
const int mininstrsize = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
const int mininstrsize = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
for (i = 0; i < numinstr; i++) {
|
||||
ut64 prev_addr = r_core_prevop_addr_force (core, addr, 1);
|
||||
if (prev_addr == UT64_MAX) {
|
||||
|
@ -3791,7 +3791,7 @@ static void ds_print_bytes(RDisasmState *ds) {
|
||||
str = r_asm_op_get_hex (&ds->asmop);
|
||||
#else
|
||||
if (ds->oplen < 1) {
|
||||
int minopsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
int minopsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
ds->oplen = minopsz;
|
||||
}
|
||||
if (ds->analop.bytes && ds->analop.size > ds->oplen) {
|
||||
@ -6031,7 +6031,7 @@ R_API int r_core_print_disasm(RCore *core, ut64 addr, ut8 *buf, int len, int cou
|
||||
bool calc_row_offsets = p->calc_row_offsets;
|
||||
int skip_bytes_flag = 0, skip_bytes_bb = 0;
|
||||
ut8 *nbuf = NULL;
|
||||
const int max_op_size = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
const int max_op_size = r_anal_archinfo (core->anal, R_ARCH_INFO_MAXOP_SIZE);
|
||||
|
||||
/* pdu vars */
|
||||
bool pdu_condition_met = false;
|
||||
@ -7322,7 +7322,7 @@ R_API int r_core_print_disasm_all(RCore *core, ut64 addr, int l, int len, int mo
|
||||
pj_a (pj);
|
||||
}
|
||||
const bool be = R_ARCH_CONFIG_IS_BIG_ENDIAN (core->rasm->config);
|
||||
int minopsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
int minopsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
int opalign = r_anal_archinfo (core->anal, R_ARCH_INFO_CODE_ALIGN);
|
||||
r_cons_break_push (NULL, NULL);
|
||||
for (i = 0; i < l; i += minopsz) {
|
||||
@ -7478,7 +7478,7 @@ R_API int r_core_disasm_pdi_with_buf(RCore *core, ut64 address, ut8 *buf, ut32 n
|
||||
r_cons_break_push (NULL, NULL);
|
||||
int midflags = r_config_get_i (core->config, "asm.flags.middle");
|
||||
int midbb = r_config_get_i (core->config, "asm.bbmiddle");
|
||||
int minopsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
int minopsz = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
int opalign = r_anal_archinfo (core->anal, R_ARCH_INFO_CODE_ALIGN);
|
||||
int opinc = (minopsz < opalign)? opalign: minopsz;
|
||||
bool asmmarks = r_config_get_i (core->config, "asm.marks");
|
||||
@ -7743,8 +7743,8 @@ R_API int r_core_disasm_pde(RCore *core, int nb_opcodes, int mode) {
|
||||
r_config_set_b (core->config, "asm.lines", false);
|
||||
r_io_cache_push (core->io);
|
||||
const char *strip = r_config_get (core->config, "asm.strip");
|
||||
const int max_op_size = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
int min_op_size = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
const int max_op_size = r_anal_archinfo (core->anal, R_ARCH_INFO_MAXOP_SIZE);
|
||||
int min_op_size = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
min_op_size = min_op_size > 0 ? min_op_size : 1;
|
||||
const ut64 read_len = max_op_size > 0 ? max_op_size : 32;
|
||||
size_t buf_sz = 0x100, block_sz = 0, block_instr = 0;
|
||||
|
@ -1652,8 +1652,8 @@ static void __cursor_right(RCore *core) {
|
||||
|
||||
// copypasta from visual
|
||||
static ut64 insoff(RCore *core, int delta) {
|
||||
int minop = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
int maxop = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
int minop = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
int maxop = r_anal_archinfo (core->anal, R_ARCH_INFO_MAXOP_SIZE);
|
||||
ut64 addr = core->offset + delta; // should be core->print->cur
|
||||
RAnalBlock *bb = r_anal_bb_from_offset (core->anal, addr - minop);
|
||||
if (bb) {
|
||||
|
@ -1174,8 +1174,8 @@ static ut64 prevop_addr(RCore *core, ut64 addr) {
|
||||
ut64 target, base;
|
||||
RAnalOp op;
|
||||
int len, ret, i;
|
||||
const int minop = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
const int maxop = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
const int minop = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
const int maxop = r_anal_archinfo (core->anal, R_ARCH_INFO_MAXOP_SIZE);
|
||||
|
||||
if (minop == maxop) {
|
||||
if (minop == -1) {
|
||||
@ -1987,8 +1987,8 @@ static void cursor_ocur(RCore *core, bool use_ocur) {
|
||||
}
|
||||
|
||||
static ut64 insoff(RCore *core, int delta) {
|
||||
int minop = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
int maxop = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
int minop = r_anal_archinfo (core->anal, R_ARCH_INFO_MINOP_SIZE);
|
||||
int maxop = r_anal_archinfo (core->anal, R_ARCH_INFO_MAXOP_SIZE);
|
||||
ut64 addr = core->offset + delta; // should be core->print->cur
|
||||
RAnalBlock *bb = r_anal_bb_from_offset (core->anal, addr - minop);
|
||||
if (bb) {
|
||||
@ -4594,7 +4594,7 @@ R_API void r_core_visual_disasm_down(RCore *core, RAnalOp *op, int *cols) {
|
||||
r_asm_set_pc (core->rasm, core->offset);
|
||||
|
||||
int maxopsize = r_anal_archinfo (core->anal,
|
||||
R_ANAL_ARCHINFO_MAX_OP_SIZE);
|
||||
R_ARCH_INFO_MAXOP_SIZE);
|
||||
size_t bufsize = maxopsize > -1? R_MAX (maxopsize, 32): 32;
|
||||
ut8 *buf = calloc (bufsize, sizeof (ut8));
|
||||
if (!buf) {
|
||||
|
@ -217,7 +217,7 @@ static ut8 esil_internal_sizeof_reg(REsil *esil, const char *r) {
|
||||
}
|
||||
|
||||
static bool alignCheck(REsil *esil, ut64 addr) {
|
||||
// r_anal_archinfo (esil->anal, R_ANAL_ARCHINFO_DATA_ALIGN);
|
||||
// r_anal_archinfo (esil->anal, R_ARCH_INFO_DATA_ALIGN);
|
||||
const unsigned int da = esil->data_align;
|
||||
return !(da > 0 && addr % da);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user