Skip to content

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

@antcpl

Description

@antcpl

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions