mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-09 07:42:25 +00:00
Honor fcn->bits in disassembly ##disasm
This commit is contained in:
parent
97eb757a17
commit
faa49fae82
@ -1061,6 +1061,16 @@ R_API RAnalHint *r_core_hint_begin(RCore *core, RAnalHint* hint, ut64 at) {
|
||||
/* TODO: do something here */
|
||||
}
|
||||
}
|
||||
RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, at, 0);
|
||||
if (fcn) {
|
||||
if (fcn->bits == 16 || fcn->bits == 32) {
|
||||
if (!hint) {
|
||||
hint = R_NEW0 (RAnalHint);
|
||||
}
|
||||
hint->bits = fcn->bits;
|
||||
hint->new_bits = fcn->bits;
|
||||
}
|
||||
}
|
||||
return hint;
|
||||
}
|
||||
|
||||
@ -2093,7 +2103,9 @@ static int ds_disassemble(RDisasmState *ds, ut8 *buf, int len) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ds->hint && ds->hint->bits) {
|
||||
r_config_set_i (core->config, "asm.bits", ds->hint->bits);
|
||||
}
|
||||
if (ds->hint && ds->hint->size) {
|
||||
ds->oplen = ds->hint->size;
|
||||
}
|
||||
@ -2753,7 +2765,7 @@ static void ds_instruction_mov_lea(RDisasmState *ds, int idx) {
|
||||
RAnalValue *dst = ds->analop.dst;
|
||||
if (dst && dst->reg && src->reg->name && pc && !strcmp (src->reg->name, pc)) {
|
||||
int index = 0;
|
||||
int memref = core->assembler->bits/8;
|
||||
int memref = core->assembler->bits / 8;
|
||||
RFlagItem *item;
|
||||
ut8 b[64];
|
||||
ut64 ptr = index + ds->addr + src->delta + ds->analop.size;
|
||||
|
Loading…
x
Reference in New Issue
Block a user