mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-28 07:30:33 +00:00
Fix #19610 - Honor minopsz in pia ##disasm
This commit is contained in:
parent
61c2a5b9ba
commit
7cb30eaf0d
@ -4993,8 +4993,7 @@ static bool cmd_pi(RCore *core, const char *input, int len, int l, ut8 *block) {
|
||||
break;
|
||||
case 'a': // "pia" is like "pda", but with "pi" output
|
||||
if (l != 0) {
|
||||
r_core_print_disasm_all (core, core->offset,
|
||||
l, len, 'i');
|
||||
r_core_print_disasm_all (core, core->offset, l, len, 'i');
|
||||
}
|
||||
break;
|
||||
case 'j': // pij is the same as pdj
|
||||
|
@ -6605,8 +6605,9 @@ R_API int r_core_print_disasm_all(RCore *core, ut64 addr, int l, int len, int mo
|
||||
}
|
||||
pj_a (pj);
|
||||
}
|
||||
int minopsz = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_MIN_OP_SIZE);
|
||||
r_cons_break_push (NULL, NULL);
|
||||
for (i = 0; i < l; i++) {
|
||||
for (i = 0; i < l; i+= minopsz) {
|
||||
ds->at = addr + i;
|
||||
ds->vat = r_core_pava (core, ds->at);
|
||||
r_asm_set_pc (core->rasm, ds->vat);
|
||||
|
@ -1,3 +1,34 @@
|
||||
NAME=pia20
|
||||
FILE=bins/mach0/BatteryLife
|
||||
ARGS=-a arm -b 64
|
||||
CMDS=pia 20
|
||||
EXPECT=<<EOF
|
||||
stp x22, x21, [sp, -0x30]!
|
||||
stp x20, x19, [sp, 0x10]
|
||||
stp x29, x30, [sp, 0x20]
|
||||
add x29, sp, 0x20
|
||||
mov x19, x1
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=pia20
|
||||
FILE=bins/mach0/BatteryLife
|
||||
ARGS=-a arm -b 16
|
||||
CMDS=pia 20
|
||||
EXPECT=<<EOF
|
||||
push {r4, r5, r6, r7, lr}
|
||||
add r7, sp, 0xc
|
||||
str r8, [sp, -0x4]!
|
||||
ldrh r4, [r0, 0x28]
|
||||
mov r5, r1
|
||||
mov r6, r0
|
||||
blx
|
||||
vsubhn.i32 d4, q13, q0
|
||||
mov r8, r0
|
||||
invalid
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=pix medium size instructions
|
||||
FILE=-
|
||||
ARGS=-a x86 -b 32
|
||||
|
Loading…
Reference in New Issue
Block a user