Which versions of gdb and gcc allow watching rvalue references?

十年热恋 提交于 2019-12-11 11:05:54

问题


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?


回答1:


Are there newer versions of these where this bug is fixed?

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



来源:https://stackoverflow.com/questions/28965431/which-versions-of-gdb-and-gcc-allow-watching-rvalue-references

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!