[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] single-stepping issue in aarch64 full-system emulation
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] single-stepping issue in aarch64 full-system emulation |
Date: |
Mon, 18 Aug 2014 10:50:33 +0100 |
On 18 August 2014 09:41, Akos Kiss <address@hidden> wrote:
> I've "stock" Ubuntu 14.04.1 running under an aarch64-qemu (built from
> mainline git) in full-system emulation [1]. Everything worked fine until
> I tried to find a bug in an application built for aarch64 (that bug most
> likely being not the fault of qemu but the app itself). When I started
> debugging, strange things happened: breakpoints in gdb did not behave as
> they should. First, together with gdb developers, we speculated that
> it's a bug in gdb (which still may hold, at least partially) [2], but
> then I traced back the problem to a point where it has led out of gdb.
> It seems that PTRACE_SINGLESTEP is not working as it should, it does not
> stop the execution of the child after a step but lets it run
> indefinitely.
Yes, this feature wasn't implemented yet in QEMU 2.1.
I posted a set of patches to the list last week for this:
https://lists.nongnu.org/archive/html/qemu-devel/2014-08/msg01291.html
You might like to try testing them.
There's also a bug where we don't report the correct PC
value to the kernel when we hit a BRK instruction. I've
just sent the one-liner fix to the list (cc'ing you). That ought
to make gdb work without having to hack it to call
set_gdbarch_decr_pc_after_break.
thanks
-- PMM