On 31 March 2013 23:33, Ivan Jovanovic <jovanovic.d.i...@gmail.com> wrote: > I am a Computer science student which is new to QEMU, new to this list. > > For the student project that I am working on, which is system security > related, I am executing a program in QEMU user mode emulation. To simulate a > program control flow change, like it happens in a real attack, I would like > to modify program counter and 'tell' QEMU to jump to a certain instruction > and continue execution from there.
Ignoring the fact that the program counter doesn't just change at random in a real attack, I suggest you use QEMU's gdb stub. You can connect a debugger to the stub, and then either manually or under the control of a script stop execution of the guest binary at any point, change its PC register and resume. -- PMM