我用的是苹果的gdb,版本如下
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 功能(在 macports 的 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有关。我的问题是,您是否遇到过此消息,以及如何摆脱它?
提前致谢
朱利亚诺