qiling icon indicating copy to clipboard operation
qiling copied to clipboard

Question about ql.emu_start using the count parameter (stepi debug command)

Open antcpl opened this issue 8 months ago • 0 comments

Describe the bug I've tried to debug programs in different setups and spotted sometimes a behavior that I think to be unicorn related but not sure so here's my question. I've debugged using the qiling gdbserver, tried also qdb and in both cases the thing is the same. Sometimes, when executing the stepi command more than one assembly instruction is actually executed (two, three, four... depends on the case). I've digged a bit the thing and what I found is that in all cases, call to ql.emu_start is done with the count=1 parameter and at unicorn level, the call uc.emu_start is also done with count=1. I assume this could be related to QEMU TCG cache under unicorn but not so sure. (Here the links to the unicorn github https://github.com/unicorn-engine/unicorn/wiki/FAQ#editing-an-instruction-doesnt-take-effecthooks-added-during-emulation-are-not-called) Is this a thing that you aware of ? If yes do you know how to deal with this at qiling level ?

Thanks in advance. (I've always work with ARM targets)

antcpl avatar May 27 '25 13:05 antcpl