One question about debugging linux kernel with gdb + qemu

136 views
Skip to first unread message

Chen Wang

unread,
Apr 20, 2022, 10:40:40 PM4/20/22
to RISC-V SW Dev
Hello, I'm using qemu + gdb debugging linux kernel. I meet a strange problem.

When I am debugging with linux version before 5.14 (including 5.14), everything works. But when I upgrade linux kernel to 5.15 (and newer version, such as 5.17), it failed and reports:
```
(gdb) b start_kernel
Cannot access memory at address 0xffffffff80800694
```

I tried qemu 6.2 and 7.0, both the same. The gdb I'm using is 10.1.

Who knows what extra operations I should have to do, I wonder if I need to configure more on Linux kernel, now I just enable debug info with defconfig.
```
make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu-  defconfig
make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu-  menuconfig
```
Reply all
Reply to author
Forward
0 new messages