[panda-users] pc in PANDA_CB_BEFORE_BLOCK_EXEC

Brendan Dolan-Gavitt brendandg at gatech.edu
Thu May 7 13:52:13 EDT 2015


TranslationBlock::pc is updated at the start of a block, and also if
an exception occurs mid-block (so that exceptions can have the correct
program counter).

CPUState::panda_guest_pc is updated every instruction. So, for
example, you can check its value in the middle of a memory callback
without worrying whether the program counter is updated correctly.

-Brendan

On Thu, May 7, 2015 at 1:31 PM, Igor R <boost.lists at gmail.com> wrote:
> Hi,
>
>
> What's the meaning of TranslationBlock::pc vs CPUState::panda_guest_pc
> within PANDA_CB_BEFORE_BLOCK_EXEC callback? Their value are different,
> and the former seems to be the beginning of the basic block. So, where
> does the latter point?
> (Precise pc is enabled.)
>
> Thanks.
> _______________________________________________
> panda-users mailing list
> panda-users at mit.edu
> http://mailman.mit.edu/mailman/listinfo/panda-users


More information about the panda-users mailing list