當我使用蘋果的GDB,版本遵循怪異GDB消息調試C++程序
GNU gdb 6.3.50-20050815 (Apple version gdb-1344) (Fri Jul 3 01:19:56 UTC 2009)
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".
我不使用的Xcode IDE,因爲我需要的makefile管理項目都比較方便,尤其是因爲我經常需要在遠程機器上編譯和運行程序。我最近開始使用下面的C++ 11特性(在maC++的g ++ - 4.6和4.7中):移動構造函數,nullptr,auto和decltype。我隨着研究的深入需要d3bug我的代碼,並以下怪異的消息出現,而不是步入一個功能:
Die: DW_TAG_unspecified_type (abbrev = 36, offset = 4315)
has children: FALSE
attributes:
DW_AT_name (DW_FORM_string) string: "decltype(nullptr)"
從自出現此消息,以下所有gdb命令是由同一個奇怪的消息回答,所以它不是可以再調試一次。這似乎與c + + 11有關。我的問題是,你有沒有遇到這個消息,以及如何擺脫它 呢?
在此先感謝
朱利亞諾
我的猜測是你的gdb版本滯後 - 它看起來像是[DWARF](http://wiki.dwarfstd.org/index.php?title=Dwarf_FAQ#What_is_DWARF.3F)信息它沒有'不瞭解。解決方案:構建/安裝更新的gdb。 – Flexo