为什么gdb提示“核心文件中'.reg-xstate/xxxxx'部分的大小意外."? [英] Why does gdb prompt "Unexpected size of section `.reg-xstate/xxxxx' in core file."?

查看:62
本文介绍了为什么gdb提示“核心文件中'.reg-xstate/xxxxx'部分的大小意外."?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的操作系统是Debian,当使用gdb分析一个核心转储文件时,得到如下信息:

My OS is Debian, when using gdb to analyze one core dump file, the following info is got:

......
Program terminated with signal SIGSEGV, Segmentation fault.

warning: Unexpected size of section `.reg-xstate/67327' in core file.
.....

谁能解释为什么提示警告(核心文件中'.reg-xstate/67327'部分的意外大小.")?

Could anyone explain why the warning ("Unexpected size of section '.reg-xstate/67327' in core file.") is prompted?

P.S.,我的 gdb 版本是:

P.S., my gdb version is:

$ 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".

推荐答案

我知道这篇文章有点老了,但我刚刚点击了这篇文章,这篇文章是谷歌搜索结果.

I know this post is rather old but I just hit this and this post is the top google result.

虽然核心转储可能会被截断,但这不太可能,因为核心转储的 .reg-xstate 部分存储在文件开头附近.问题的一个更可能的原因是正在使用的 GDB 版本不理解已添加到 XSAVE 区域(又名 xstate)的较新处理器功能.

While it is possible the core dump is truncated, this is rather unlikely because the .reg-xstate section of the core dump is stored near the very begining of the file. A much more likely cause of the issue is that the version of GDB in use does not understand a newer processor feature that has been added to the XSAVE area (aka the xstate).

由于我使用与 OP 相同版本的 GDB (7.12),我猜它们也在 Skylake 或更新的 CPU 上运行.Skylake CPU 可以支持称为内存保护密钥的东西,作为其中的一部分,一个名为 PKRU 的新寄存器被添加到 XSAVE 区域.GDB 8 中添加了对这个新寄存器的支持.

Since I'm using the same version of GDB (7.12) as the OP is, I'm gonna guess that they were also running on a Skylake or newer CPU. Skylake CPUs can support something called Memory Protection Keys and as part of this a new register named PKRU was added to the XSAVE area. Support for this new register was added in GDB 8.

这篇关于为什么gdb提示“核心文件中'.reg-xstate/xxxxx'部分的大小意外."?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆