From 844216f3811e342886523f1ee4a3068afb4dc726 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Tue, 24 Feb 2009 14:47:30 +0000 Subject: 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 --- gcc/dwarf2out.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 2e5f032..ed165c8 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 -- cgit v1.1