[Top][All Lists]

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

Re: [Qemu-discuss] inspect an instruction inside the translation block

From: Peter Maydell
Subject: Re: [Qemu-discuss] inspect an instruction inside the translation block
Date: Sun, 9 Nov 2014 16:40:53 +0000

On 9 November 2014 15:37, Ronen Meir <address@hidden> wrote:
> I'm using Qemu with ARM as target OS.
> As far as I understand QEMU executes full  translation blocks (TB).  I would
> like to isolate and debug a specific instruction within a translation block.

That depends on what you mean by "debug". The simplest way
to debug guest code inside QEMU is to attach a gdb to qemu's
builtin gdbstub (you'll need one which understands the ARM
architecture; a "multiarch" gdb such as the one shipped
in ubuntu's gdb-multiarch package will do). That will let
you set breakpoints, single step, and so on, as an assembly
level debugger.

You can also use QEMU's -singlestep option to force us to
put exactly one instruction in each TB. Whether this is actually
any use to you depends rather on what you're trying to do;
it's probably only really helpful if you're trying to debug
QEMU itself, in which case you'll probably also want to use
our -d option to enable various kinds of debug logging
(including disassembly of guest instructions in and TCG ops
and host instructions out).

-- PMM

reply via email to

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