lx-symbols:Python 异常<类 'gdb.MemoryError'> 无法访问地址 0xff 处的内存



我正在尝试从内核加载lx符号。 但它一直向我显示以下错误:

(gdb) lx-symbols
loading vmlinux
Python Exception <class 'gdb.MemoryError'> Cannot access memory at address 0xffffffff824fb470: 
Error occurred in Python command: Cannot access memory at address 0xffffffff824fb470

现在我成功地从同一个构建中加载了之前的 lx 符号(不确定这是否是正确的术语(,但不知道为什么我可以再加载它了。

现在,当我第一次通过 gdb 连接到远程计算机时,它曾经显示如下所示的构建跟踪:

GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./vmlinux...done.
(gdb) target remote: 1235
Remote debugging using : 1235
native_safe_halt ()
at /build/linux-hwe-22QmxS/linux-hwe-5.3.0/arch/x86/include/asm/irqflags.h:61
61    /build/linux-hwe-22QmxS/linux-hwe-5.3.0/arch/x86/include/asm/irqflags.h: No such file or directory.

现在,当我连接到远程内核时,它只向我显示以下内容:

(gdb) target remote :1235
Remote debugging using :1235
0xffffffff81a98522 in __irqentry_text_end ()

我注意到构建跟踪/构建/linux-hwe-22QmxS/linux-hwe-5.3.0/arch/x86/include/asm/irqflags.h:61 61消失(我没有对配置或设置进行任何更改(。

这是我第二次遇到同样的问题。第一次,我想也许我不小心做了一些更改,但随着问题再次出现,这次我很确定我没有进行任何更改。

我有我的.gdbinit文件,其中包含正确的路径。

add-auto-load-safe-path /../../ubuntu-bionic/debian/build/build-generic/vmlinux-gdb.py

我使用以下以下命令检查了源是否正确加载:

(gdb) source /home/../../ubuntu-bionic/debian/build/build-generic/vmlinux-gdb.py

它没有给我带来任何错误。所以,我想源正在正确加载。我只是不知道还能做什么。请帮忙。

尝试将"nokaslr"添加到内核引导参数和/或使用 CONFIG_RANDOMIZE_BASE=n 构建