[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] gdb and qemu-system-aarch64 setup - breakpoint not re
Re: [Qemu-discuss] gdb and qemu-system-aarch64 setup - breakpoint not reached
Thu, 7 Aug 2014 22:04:35 +0100
On 7 August 2014 21:45, Raghunath Lolur
> I am using qemu-system emulator (qemu-system-aarch64) and gdb
> (aarch64-linux-gnu-gdb) to debug a c program, both running on the same
> system, i686-pc-linux-gnu on Ubuntu 12.04 LTS. However, with the gdb,
> if I set a breakpoint and issue 'continue' command, it shows
> continuing....and never reaches the breakpoint set.
> I am requesting help towards understanding the problem and resolving
> it. Thanks in advance.
> Qemu version: 2.0.50 and gdb version : 7.8
> The steps I followed to set up debugging aarch64 program in qemu-system are:
> Terminal 1
> $ cd /home/user1/qemu-aarch64/qemu.
> ./aarch64-softmmu/qemu-system-aarch64 -machine virt -cpu cortex-a57
> -machine type=virt -nographic -smp 1 -m 2047 -kernel
> ../linux.git/arch/arm64/boot/Image -s -S
> Now, the execution freezes and I presume qemu along with gdbserver is
> listening on port 1234
This looks a bit odd. You haven't provided a guest filesystem, so how
are you putting your adds2-output test program inside the guest OS?
If you don't use "-s -S" does QEMU successfully boot your guest OS
image and let you run the test program somehow?
Do you really want to run an entire AArch64 guest OS kernel and
your test program inside it, then attempt to debug the test program
using the QEMU debug stub? There's no awareness in this
configuration of individual guest OS processes, so if you put a
breakpoint on a particular address then it will fire when execution
hits that address for *any* process, not just the test binary.
Maybe you wanted to use linux-user mode instead?
If you really do want to debug one process inside a complete
guest OS, then you would be better off with running a gdb
or gdbserver inside the guest and attaching to that, but unfortunately
we haven't implemented that support quite yet. It ought to be in
QEMU 2.2 though since I'm working on it at the moment.