[Top][All Lists]

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

Re: [Qemu-discuss] QEMU singlestep

From: Peter Maydell
Subject: Re: [Qemu-discuss] QEMU singlestep
Date: Fri, 6 Jun 2014 11:05:18 +0100

On 28 May 2014 09:58, Radu Velea <address@hidden> wrote:
> I've been using QEMU in user mode to run an executable with debug mode and
> I've noticed that the number of assembly instructions differs from one
> runtime to another, even for a trivial "hello world". Is there an
> explanation for this?
> qemu-aarch64 -singlestep -d in_asm hello_world.exe
> has fewer instructions than
> qemu-aarch64 -d in_asm hello_world.exe

Singlestep mode means (among other things) that we only
ever translate one instruction at a time. So the trace of
instructions translated with it enabled won't show the tail
ends of blocks which we didn't execute completely
(eg when we took a conditional branch).

Note also that -d in_asm shows you instructions *translated*,
not instructions *executed*. Translated instructions may never
be executed (as you've seen), and translated instructions may
be executed more than once (in which case there's no in_asm
tracing for the second time they're executed).

-- PMM

reply via email to

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