[Top][All Lists]

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

Re: GDB for qemu-system-arm

From: Peter Maydell
Subject: Re: GDB for qemu-system-arm
Date: Thu, 8 Jul 2021 12:51:14 +0100

On Thu, 8 Jul 2021 at 12:17, abhijeet inamdar
<abhijeetinamdar3005@gmail.com> wrote:
> But I'm not getting how do I debug .axf
> After I pass command :
> qemu-system-arm -M mymachine -cpu cortex-m3 -kernel main.axf -monitor none 
> -serial stdio -semihosting -nographic -s -S
> After this the cursor goes to next line and stuck. What should I do?

"QEMU stops until you connect the gdb" is exactly what you should
expect here. Connect the gdb and tell it to continue.

More generally, you debug your guest code the same way you would on
real hardware: by trial and error, with a debugger, or with tracing
in the guest.

QEMU provides some tools to assist: you can use the gdbstub, or
you can use the -d debugging options to see what the guest is doing.
If you have an older version of QEMU where this guest image used to
boot OK, you can also look at the logs produced then versus the ones
on this new QEMU to see where the two diverge.

-- PMM

reply via email to

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