Hi, Peter Maydell írta: > On 18 August 2014 09:41, Akos Kiss <ak...@inf.u-szeged.hu> 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 ak...@inf.u-szeged.hu