All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Singlestepping & Target assembly instructions
       [not found] <CAKJJEPzDN6gmLzta6j9z23bWVKcnpO4YJVyj_E-jsPZ9CKbXiw@mail.gmail.com>
@ 2012-10-16 10:49 ` Emmanuel Blot
  2012-10-16 19:07   ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Emmanuel Blot @ 2012-10-16 10:49 UTC (permalink / raw)
  To: qemu-devel

Hi,

I'm using QEmu to debug an ARM target (OS-less code).
I searched/googled for help on how to trace all instructions executed
on the target CPU.

Using -singlestep and -d in_asm option switches generate the data I'm
looking for, however as the translation blocks are cached, the
instructions are only printed once (the first time the instruction is
translated from target code to host code).

Is there any way to force QEmu to disable the TB cache so that the
translation occurs each time a target instruction is loaded, or a
clever way to print out the address of each executed target instruction ?

I do not care about performances (disabling the TB is likely to cause
a massive performance drawback I suppose).

Thanks,
Manu

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Singlestepping & Target assembly instructions
  2012-10-16 10:49 ` [Qemu-devel] Singlestepping & Target assembly instructions Emmanuel Blot
@ 2012-10-16 19:07   ` Richard Henderson
  2012-10-16 20:17     ` Laurent Desnogues
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2012-10-16 19:07 UTC (permalink / raw)
  To: Emmanuel Blot; +Cc: qemu-devel

On 2012-10-16 20:49, Emmanuel Blot wrote:
> Is there any way to force QEmu to disable the TB cache so that the
> translation occurs each time a target instruction is loaded, or a
> clever way to print out the address of each executed target instruction ?

"-d exec" prints the entry point of each TB as it is executed.  You can
refer to the previously disassembled insns by reference.


r~

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Singlestepping & Target assembly instructions
  2012-10-16 19:07   ` Richard Henderson
@ 2012-10-16 20:17     ` Laurent Desnogues
  2012-10-16 20:31       ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Laurent Desnogues @ 2012-10-16 20:17 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Emmanuel Blot, qemu-devel

On Tue, Oct 16, 2012 at 9:07 PM, Richard Henderson <rth@twiddle.net> wrote:
> On 2012-10-16 20:49, Emmanuel Blot wrote:
>> Is there any way to force QEmu to disable the TB cache so that the
>> translation occurs each time a target instruction is loaded, or a
>> clever way to print out the address of each executed target instruction ?
>
> "-d exec" prints the entry point of each TB as it is executed.  You can
> refer to the previously disassembled insns by reference.

If I remember correctly, that only works if block chaining is disabled.


Laurent

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Singlestepping & Target assembly instructions
  2012-10-16 20:17     ` Laurent Desnogues
@ 2012-10-16 20:31       ` Richard Henderson
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2012-10-16 20:31 UTC (permalink / raw)
  To: Laurent Desnogues; +Cc: Emmanuel Blot, qemu-devel

On 2012-10-17 06:17, Laurent Desnogues wrote:
> If I remember correctly, that only works if block chaining is disabled.

Which it will be with -singlestep.


r~

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-16 20:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAKJJEPzDN6gmLzta6j9z23bWVKcnpO4YJVyj_E-jsPZ9CKbXiw@mail.gmail.com>
2012-10-16 10:49 ` [Qemu-devel] Singlestepping & Target assembly instructions Emmanuel Blot
2012-10-16 19:07   ` Richard Henderson
2012-10-16 20:17     ` Laurent Desnogues
2012-10-16 20:31       ` Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.