qemu-discuss
[Top][All Lists]
Advanced

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

Unable to access init.text section of the Linux Kernel when debugging wi


From: Dmitrii Bundin
Subject: Unable to access init.text section of the Linux Kernel when debugging with GDB using kvm
Date: Thu, 23 Jun 2022 22:36:15 +0300

When debugging Linux Kernel running in QEMU with GDB it's not possible to access the Kernel function located in .text.init. Example:

(gdb) disas start_kernel
Dump of assembler code for function start_kernel:
   0xffffffff83160ff3 <+0>:     Cannot access memory at address 0xffffffff83160ff3

Removing --enable-kvm -cpu host from the QEMU command line makes it works as expected:

(gdb) disas start_kernel
Dump of assembler code for function start_kernel:
=> 0xffffffff83160ff3 <+0>:     call   0xffffffff810788c0 <__fentry__>
     0xffffffff83160ff8 <+5>:     push   rbp
     0xffffffff83160ff9 <+6>:     mov    rdi,0xffffffff82e1a9c0
     0xffffffff83161000 <+13>:    mov    rbp,rsp

Is it possible to make --enable-kvm -cpu host to be able to access memory located in the .init.text section? If some fixes are needed I'll be more than happy to help.

reply via email to

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