c++ - gdb 7.0 警告 : Wrong size fpregset in core file

标签 c++ c gdb coredump postmortem-debugging

re 当分析一个核心文件时,我的 gdb 7.0 输出了几个警告:

warning: Wrong size gregset in core file.
warning: Wrong size fpregset in core file.
warning: Wrong size gregset in core file.
warning: Wrong size fpregset in core file.
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.

我不确定它是否相关,但我无法获得回溯:

(gdb) bt
#0  0x00000000 in ?? ()

操作系统架构为 SUN Solaris 10 SPARC。

问题:

  1. 出现这些警告的原因是什么?
  2. 为什么我无法检索回溯?
  3. 如何解决这些问题?

最佳答案

问题可能出现在 gdb 中,也出现在您的程序中。 我建议将 gdb 更新到最新版本 (7.3.1)。此外,创建简单的测试程序并使用 gdb 分析其核心以确保您的实用程序正常工作可能会有所帮助。

“gregset”等错误表明gdb无法从核心文件中读取数据。如果您的程序失控并损坏堆栈,就会发生这种情况。 gregset 错误意味着 gdb 无法从核心文件中读取通用寄存器集。 fpregset 用于浮点寄存器集。预期的寄存器大小取决于平台。

如果你不能正确读取核心文件,bt 将无法工作。

关于c++ - gdb 7.0 警告 : Wrong size fpregset in core file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8849347/

相关文章:

c - 错误: function declared 'ms_abi' here was previously declared without calling convention (clang)

c++ - -!(condition) 是从 bool 值(掩码 bool 值)获取全位 vector 的正确方法吗?

gdb - 如何将 gdb 附加到在 docker 容器中运行的进程?

c++ - 线程 0x7fffc57fa700 (LWP 31671) exited] 在 gdb 中是什么意思?

c++ - Matlab矩阵逆函数在C++中的Eigen实现

c# - C、C++、Java、C# 中的 main()

c - C中的系统调用功能

c++ - 调试核心转储时的源代码行

c++ - 为什么我得到 : "cannot seek vector iterator after end"

C++如何使用less条件语句?