问题描述
我正在使用 GDB 7.8.0.20140729-cvs
和 GCC 4.8.2
。每当我尝试打印由rvalue引用引用的变量的值时,我收到一个错误,调试器抱怨一个未知的类型,迫使我手动转换 T&&
到 T *
。
这些错误是否有更新版本?理想情况下,如果我不需要,我不想升级 GCC
/ p>
升级GCC不会有帮助,因为它已经在做正确的事情(发出DWARF DW_TAG_rvalue_reference_type
条目) p>
但是,即使在最新的Git源中,GDB对rvalue引用的处理仍然是破坏的。
相关的错误是
I am using GDB 7.8.0.20140729-cvs
and GCC 4.8.2
. Whenever I try to print the value of a variable referenced by an rvalue reference, I get an error from the debugger complaining about an unknown type, forcing me to manually cast the T &&
to a T *
.
Are there newer versions of these where this bug is fixed? Ideally I'd prefer not to upgrade GCC
if I don't have to?
No.
Upgrading GCC won't help because it is already doing the right thing (emitting DWARF DW_TAG_rvalue_reference_type
entries).
But GDB's handling of rvalue references is still broken even in the latest Git sources.
The relevant bug is https://sourceware.org/bugzilla/show_bug.cgi?id=14441
这篇关于哪些版本的gdb和gcc允许观看rvalue引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!