问题
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