Received: from eggs.gnu.org ([2001:4830:134:3::10]:33179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJLYo-0007Pa-Fj for qemu-devel@nongnu.org; Mon, 18 Aug 2014 07:57:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJLYh-0003wh-Rw for qemu-devel@nongnu.org; Mon, 18 Aug 2014 07:57:14 -0400 Received: from eos.fwall.u-szeged.hu ([160.114.120.248]:33892) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJLYh-0003wZ-HP for qemu-devel@nongnu.org; Mon, 18 Aug 2014 07:57:07 -0400 Message-ID: <53F1EA0C.3070700@inf.u-szeged.hu> Date: Mon, 18 Aug 2014 13:57:00 +0200 From: Akos Kiss MIME-Version: 1.0 References: <53F1BC37.9030206@inf.u-szeged.hu> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] single-stepping issue in aarch64 full-system emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers Hi, Peter Maydell írta: > On 18 August 2014 09:41, Akos Kiss 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. I've tried these patches and they work for me flawlessly with the stock gdb. Thanks! -Akos > > thanks > -- PMM -- Á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 akiss@inf.u-szeged.hu