gdb 7.0 警告:核心文件中的 fpregset 大小错误
在分析核心文件时,我的 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。
问题
- 这些警告的原因是什么?
- 为什么我无法检索回溯?
- 如何解决这些问题?
reWhen analyzing a core file, my gdb 7.0 outputs several warnings:
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.
I am not sure if its related, but I am unable to get a backtrace:
(gdb) bt
#0 0x00000000 in ?? ()
OS architecture is SUN Solaris 10 SPARC.
Questions:
- What is the reason/cause of these warnings?
- Why can't I retrieve a backtrace?
- How to fix these problems?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该问题也可能出现在 gdb 中以及您的程序中。
我建议将 gdb 更新到最新版本 (7.3.1)。此外,创建简单的测试程序并使用 gdb 分析其核心以确保您的实用程序正常工作也可能会有所帮助。
“gregset”和其他错误表明gdb无法从核心文件中读取数据。如果您的程序变得疯狂并且堆栈损坏,则可能会发生这种情况。 gregset 错误意味着 gdb 无法从核心文件读取通用寄存器集。 fpregset 用于浮点寄存器集。预期的寄存器大小取决于平台。
如果您无法正确读取核心文件,bt 将无法工作。
The problem can in gdb as well in your program.
I would recommend to update gdb to the most recent version (7.3.1). Also it could be helpful to create simple test program and analyze its core with gdb to be sure that your utility works fine.
"gregset" and other error indicate that gdb unable read the data from the core file. It can happen if your program gone wild and corrupt stack. gregset error means that gdb was unable to read general-purpose register set from a core file. fpregset is for floating-point register set. The expected register size is platform dependent.
bt would not work if you cant read core file properly.
当我尝试在 Solaris 10 上使用 gdb 7.6.2 处理 64 位核心转储时,我还遇到了 fpregset 警告(并且没有堆栈跟踪)。原因似乎是 Solaris 10 的用户空间应用程序默认使用 32 位进行编译- 并且不支持 64 位核心 cum。
GDB 的 IRC 频道中的人给了我以下参数:
我还编译了 64 位版本的 gdb (-m64),但这不是必需的。现在,gdb 可以处理 64 位核心转储并创建堆栈跟踪,而不会发出任何警告。
I also had the fpregset warnings (and no stack trace) when I tried to work on a 64bit core dump with gdb 7.6.2 on Solaris 10. The cause seems to be, that the userspace applications of Solaris 10 are compiled with 32bits by default - and without support for 64bit core cumps.
The guys in GDB's IRC channel gave me the following parameter:
I also compiled a 64bit version of gdb (-m64), but that shouldn't be necessary. Now gdb could work on the 64bit core dump and create the stack trace without any warnings.