我的操作系统是Debian
,当使用gdb
分析一个核心转储文件,会得到以下信息:
......
Program terminated with signal SIGSEGV, Segmentation fault.
warning: Unexpected size of section `.reg-xstate/67327' in core file.
.....
谁能解释为什么警告(“Unexpected size of section '.reg-xstate/67327' in core file.
") 出现提示?
PS,我的gdb
版本是:
$ gdb
GNU gdb (Debian 7.12-6+b1) 7.12.0.20161007-git
Copyright (C) 2016 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".
我知道这篇文章相当旧,但我刚刚点击了这篇文章,这篇文章是谷歌的最佳结果。
虽然核心转储有可能被截断,但这不太可能,因为.reg-xstate
核心转储的部分存储在文件的开头附近。导致该问题的一个更可能的原因是正在使用的 GDB 版本不支持已添加到 XSAVE 区域(又名 xstate)的较新处理器功能。
由于我使用与 OP 相同版本的 GDB (7.12),我猜测它们也在 Skylake 或更新的 CPU 上运行。 Skylake CPU 可以支持内存保护密钥,作为其中的一部分,名为 PKRU 的新寄存器被添加到 XSAVE 区域。 GDB 8 添加了对这个新寄存器的支持。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)