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

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

问题描述

  $ gdb a.out 
GNU gdb 6.3 .50-20050815(Apple版本gdb-1708)(Thu Nov 3 21:59:02 UTC 2011)
版权所有2004 Free Software Foundation,Inc.
GDB是免费软件,由GNU General Public许可证,并且您有
欢迎在特定条件下更改和/或分发它的副本。
输入show copying查看条件。
GDB绝对没有担保。输入显示保修以获取详细信息。
这个GDB被配置为x86_64-apple-darwin...阅读共享库的符号。
警告:无法找到目标文件/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) - 没有调试信息可用于../../../../gcc-4.7.0/libstdc++-v3/libsupc++/array_type_info。 CC。


警告:找不到目标文件/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) - 没有调试信息可用于../../../../gcc-4.7.0/的libstdc ++ - V3 / libsupc ++ / bad_alloc.cc。

似乎我需要再次获取libstdc ++,但是如何使用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 code>将GCC限制为只有DWARF2,但是无论何时展开展开信息,epilogue展开信息都会无条件地发出。

应该看看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".

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

解决方案

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

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.

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

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

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