On Thu, 26 Aug 2021 at 15:12, Florian Hauschild
<florian.hausch...@fs.ei.tum.de> wrote:
> Form my observation all three insn_cb would see x0 == 2. They are
> executed at the end of a tb execution.

The documentation for the insn_exec_cb says the cb is called
every time an instruction is executed. That won't always be at
the end of a TB, will it ?

> Please correct me if i am wrong:
> When the TB is executed, first the TB cb is executed, then the various
> instruction cb. If you would like to see x0 in between instructions (e.g
> mov and first add), QEMU need to be in single step mode.
> The plugin infrastructure does have some sort of infrastructure to tell
> the tcg if the registers are read or written to, but does apparently not
> use it. The register values seem to be written back before the various
> cbs are called.

Any new plugin API for "read/write registers" needs to work correctly
at any point where it is valid for it to be called, whether QEMU
is in single-step mode or not.

I guess we'll wait for Alex to get back from holiday and have a look at this...

thanks
-- PMM

Reply via email to