From: Richard Guenther Date: Tue, 24 Feb 2009 14:47:30 +0000 (+0000) Subject: re PR debug/39285 (Missing debug info for enum members in C++) X-Git-Tag: releases/gcc-4.4.0~447 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=844216f3811e342886523f1ee4a3068afb4dc726;p=thirdparty%2Fgcc.git re PR debug/39285 (Missing debug info for enum members in C++) 2009-02-24 Richard Guenther PR debug/39285 * dwarf2out.c (gen_enumeration_type_die): Handle CONST_DECLs. From-SVN: r144407 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c89a3f473377..3083daedb97a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-02-24 Richard Guenther + + PR debug/39285 + * dwarf2out.c (gen_enumeration_type_die): Handle CONST_DECLs. + 2009-02-24 Richard Guenther Zdenek Dvorak diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 2e5f032c2a26..ed165c8386b7 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -13234,6 +13234,9 @@ gen_enumeration_type_die (tree type, dw_die_ref context_die) add_name_attribute (enum_die, IDENTIFIER_POINTER (TREE_PURPOSE (link))); + if (TREE_CODE (value) == CONST_DECL) + value = DECL_INITIAL (value); + if (host_integerp (value, TYPE_UNSIGNED (TREE_TYPE (value)))) /* DWARF2 does not provide a way of indicating whether or not enumeration constants are signed or unsigned. GDB