[Bug debug/58150] debug info about definition of enum class not emitted if the declaration was already used in a class
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58150 Jakub Jelinek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #7 from Jakub Jelinek --- .
[Bug debug/58150] debug info about definition of enum class not emitted if the declaration was already used in a class
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58150 --- Comment #6 from Jakub Jelinek --- Fixed for 8.1+.
[Bug debug/58150] debug info about definition of enum class not emitted if the declaration was already used in a class
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58150 --- Comment #5 from Jakub Jelinek --- Author: jakub Date: Sun Mar 11 16:50:08 2018 New Revision: 258434 URL: https://gcc.gnu.org/viewcvs?rev=258434&root=gcc&view=rev Log: PR debug/58150 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf, but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard addition of most attributes on !orig_type_die or the attribute not being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE. * g++.dg/debug/dwarf2/enum2.C: New test. Added: trunk/gcc/testsuite/g++.dg/debug/dwarf2/enum2.C Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c trunk/gcc/testsuite/ChangeLog
[Bug debug/58150] debug info about definition of enum class not emitted if the declaration was already used in a class
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58150 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek --- Created attachment 43606 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43606&action=edit gcc8-pr58150.patch Untested fix.
[Bug debug/58150] debug info about definition of enum class not emitted if the declaration was already used in a class
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58150 Eric Gallager changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-10-17 CC||egallager at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #3 from Eric Gallager --- (In reply to npl from comment #2) > Created attachment 42381 [details] > another testcase > > I was generating a testcase before discovering this bug. > Problem is the same: > > A class/struct using a prototyped, not yet defined "enum class" will prevent > that debug information for this "enum class" to be emitted. > Only if no class/struct uses a "enum class" before its defined, the debug > info will be available. > > Affected: GCC 5.3.0, GCC 6.4.0, GCC 7.2.0 > > Please fix this, it really makes debugging a pain Taking this as confirmation.
[Bug debug/58150] debug info about definition of enum class not emitted if the declaration was already used in a class
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58150 npl at chello dot at changed: What|Removed |Added CC||npl at chello dot at --- Comment #2 from npl at chello dot at --- Created attachment 42381 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42381&action=edit another testcase I was generating a testcase before discovering this bug. Problem is the same: A class/struct using a prototyped, not yet defined "enum class" will prevent that debug information for this "enum class" to be emitted. Only if no class/struct uses a "enum class" before its defined, the debug info will be available. Affected: GCC 5.3.0, GCC 6.4.0, GCC 7.2.0 Please fix this, it really makes debugging a pain
[Bug debug/58150] debug info about definition of enum class not emitted if the declaration was already used in a class
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58150 --- Comment #1 from Ben Longbons --- Still present in gcc 4.9 as of 2014-03-22 Currently I'm hacking around this by using a gdb pretty printer that hard-codes the enum values and turns them into strings, but that only works for printing, not calls.