armv8 qemu_cortex_a53 bug(gdb) on official sample #42760
-
Describe the bug When I input 'continue' command in gdb, the gdb always loss response. So I have to type ' ctrl + c ' to create a signal and I find it trap to an loop in ../zephyr/kernel/fatal.c file, the loop code is below: FUNC_NORETURN __weak void arch_system_halt(unsigned int reason)
{
ARG_UNUSED(reason);
/* TODO: What's the best way to totally halt the system if SMP
* is enabled?
*/
(void)arch_irq_lock();
for (;;) { //trap to this loop
/* Spin endlessly */
}
} So I try to degub it to find what cause the trap and i find it is because the below asm code:
And I find the value of 'x2' is 0x80a0014 ,the address is the gic device memory, it is allocated to gic device when system init mmu. Then I check the Arm architucture Reference Manual and find the reason why the code will trap to the loop is descripte below:
It all seem that it is a memoy access error. It is inportent that what bothers me is that when I run the zephyr.elf without debug , it work well. But when I try to debug it and type 'continue' in gdb, it always trap to this loop!! Environment (please complete the following information): |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Unable to reproduce -- when I tested this locally using the Zephyr SDK 0.13.2, without any breakpoints set, the GDB breaks somewhere in It seems you are using a third-party QEMU and GDB that may not be of a compatible version and/or do not have the required Zephyr-specific patches applied. Please use the QEMU and GDB from the Zephyr SDK. |
Beta Was this translation helpful? Give feedback.
Unable to reproduce -- when I tested this locally using the Zephyr SDK 0.13.2, without any breakpoints set, the GDB breaks somewhere in
cpu_idle.S
as expected when CTRL+C is pressed.It seems you are using a third-party QEMU and GDB that may not be of a compatible version and/or do not have the required Zephyr-specific patches applied.
Please use the QEMU and GDB from the Zephyr SDK.