qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: PC traces from QEMU


From: andrzej zaborowski
Subject: Re: [Qemu-devel] Re: PC traces from QEMU
Date: Thu, 29 Mar 2007 23:42:35 +0200

On 29/03/07, Stuart Brady <address@hidden> wrote:
On Thu, Mar 29, 2007 at 08:29:03PM +0300, Antti P Miettinen wrote:
> "Shashidhar Mysore" <address@hidden> writes:
> > I intend to extract program counter streams from QEMU as a program executes.
> > Can you please point me to the hooks that I may have to insert into the QEMU
> > source code in order to extract the PC values?
>
> I used to do that with qemu 0.7. I did not dig into this deep enough
> to find the minimal changes but at least the following was enough:
[...]
> - force dc->jmp_opt to zero in target-i386/translate.c

I don't quite see where you would do this.

BTW, the approach I took was to add something like gen_op_dump_pc(s->pc)
near the top of disas_insn (in translate.c), and have op_dump_pc (in
op.c) pass the program counter (held in PARAM1) to a helper (in
helper.c) that then prints it out.  I expect that's not the best
approach, but it worked quite well for my purposes.

The approach I took was call "cpu_single_step(env, 1); vm_start();
return;" in gdb_vm_stopped in gdbstub.c. Then after I connect to qemu
with gdb the first time it single steps in a loop - probably very
inefficient but works.

Just my two cents.
Andrzej




reply via email to

[Prev in Thread] Current Thread [Next in Thread]