Closed wooshifu closed 2 years ago
The problem here is the cpu hasn't turned on the MMU at this point, and the address you're trying to set the breakpoint on is the virtual address once the mmu is enabled. The first bit of start.S is running with mmu disabled, so the address the cpu is running at is a physical address.
If you set the breakpoint a bit farther on, once the mmu is enabled it probably will have a better chance of working.
got it. thanks a lot😁
project: rpi3-test note: build with macro
WITH_KERNEL_VM=1
issue: could not set breakpoint on _start or arm_reset steps:qemu-system-aarch64 -s -S -M raspi3 -kernel lk.elf -semihosting -serial null -serial mon:stdio -nographic
to start the debug sessionaarch64-elf-gdb lk.elf
to start debuggingtarget remote :1234
b _start
b arm_reset
si
shows0x0000000000080004 in ?? ()
disassemble arm_reset
showsCannot access memory at address 0xffff000000080000
b lk_main
c
then gdb can break atlk_main
as extecptedquestiones:
Cannot access memory at address 0xffff000000080000
?b _start
orb arm_reset
not working?b lk_main
works?config.h