GDB 错误消息 (GCC 4.7) (来自 macports) [英] GDB error message (GCC 4.7) (from macports)

查看:21
本文介绍了GDB 错误消息 (GCC 4.7) (来自 macports)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在启动 gdb 时收到这样的消息:

I have this kind of message when I start gdb :

$ gdb a.out 
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Thu Nov  3 21:59:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .
warning: Could not find object file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc47/gcc47/work/build/x86_64-apple-darwin11/libstdc++-v3/src/../libsupc++/.libs/libsupc++convenience.a(array_type_info.o)" - no debug information available for "../../../../gcc-4.7.0/libstdc++-v3/libsupc++/array_type_info.cc".


warning: Could not find object file "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc47/gcc47/work/build/x86_64-apple-darwin11/libstdc++-v3/src/../libsupc++/.libs/libsupc++convenience.a(bad_alloc.o)" - no debug information available for "../../../../gcc-4.7.0/libstdc++-v3/libsupc++/bad_alloc.cc".

看来我需要再次获取 libstdc++ 但如何使用 macports?

It seems that I need to fetch again the libstdc++ but how with macports?

推荐答案

http://gcc.gnu.org/gcc-4.5/changes.html

GCC 现在也为结语生成展开信息.由 GCC 生成的 DWARF 调试信息现在比以前使用了更多 DWARF3 的特性,以及一些 DWARF4 特性.早于 7.0 的 GDB 无法处理其中任何一个,因此要调试 GCC 4.5 生成的二进制文件或库,需要 GDB 7.0 或更高版本.您可以使用 -gdwarf-3 -gstrict-dwarf 选项禁用 DWARF4 功能,或使用 -gdwarf-2 -gstrict-dwarf 将 GCC 限制为仅 DWARF2,但是无论何时发出展开信息,都会无条件地发出结尾展开信息.

GCC now generates unwind info also for epilogues. DWARF debuginfo generated by GCC now uses more features of DWARF3 than before, and also some DWARF4 features. GDB older than 7.0 is not able to handle either of these, so to debug GCC 4.5 generated binaries or libraries GDB 7.0 or later is needed. You can disable use of DWARF4 features with the -gdwarf-3 -gstrict-dwarf options, or use -gdwarf-2 -gstrict-dwarf to restrict GCC to just DWARF2, but epilogue unwind info is emitted unconditionally whenever unwind info is emitted.

所以你应该看看macports中是否有更新的GDB.

So you should see if there is a newer GDB in macports.

这篇关于GDB 错误消息 (GCC 4.7) (来自 macports)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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