qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] single-stepping issue in aarch64 full-system emulation


From: Akos Kiss
Subject: [Qemu-devel] single-stepping issue in aarch64 full-system emulation
Date: Mon, 18 Aug 2014 10:41:27 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Hi,

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. I validated the problem with a pair of simple programs
(attached: executing ezptrace on x86_64 prints 93010 steps before end,
but inside the aarch64 emulation all I get is "step 0 / 56 / end".)

I'm still not sure that it's a qemu problem but I already figured out
that the aarch64 kernel does support single stepping [3]. I'd thank for
any hints.

Best regards,
Akos

[1]
http://webkit.sed.hu/blog/20140816/quickndirty-set-aarch64-ubuntu-1404-vm-qemu
[2] https://sourceware.org/bugzilla/show_bug.cgi?id=17280
[3]
https://github.com/torvalds/linux/blob/e1a08b855f56d6528e7f85aae9ca8123f4c3ae04/arch/arm64/include/asm/ptrace.h#L114

-- 
Ákos Kiss, PhD
assistant professor

Department of Software Engineering, University of Szeged
Dugonics tér 13., 6720 Szeged, Hungary
Phone: +36-62-544143
Fax: +36-62-546723
address@hidden

Attachment: ezptrace.c
Description: Text document

Attachment: ezptraceme.c
Description: Text document


reply via email to

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