aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-01-19 18:11:19 +0000
committerTom Tromey <tromey@redhat.com>2010-01-19 18:11:19 +0000
commitceeb3d5ab68a5e0a904ab7a5812781fe2bd082ce (patch)
treee05ef253dd96f02213ec5358eba51946ed12da37 /gdb/dwarf2read.c
parent5696ab0b73cb827e7b3636255694d1fe61c89a32 (diff)
downloadgdb-ceeb3d5ab68a5e0a904ab7a5812781fe2bd082ce.zip
gdb-ceeb3d5ab68a5e0a904ab7a5812781fe2bd082ce.tar.gz
gdb-ceeb3d5ab68a5e0a904ab7a5812781fe2bd082ce.tar.bz2
gdb
PR c++/8000: * dwarf2read.c (partial_die_parent_scope): Put enumeration type into parent scope, and enumerator into grandparent scope. gdb/testsuite PR c++/8000: * gdb.cp/namespace.exp: Use new enum. Fix line numbers in existing tests. * gdb.cp/namespace.cc (AAA::SomeEnum): New enum. (main): Use AAA::SomeEnum.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 4903ac4..db51653 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -2386,7 +2386,8 @@ partial_die_parent_scope (struct partial_die_info *pdi,
|| parent->tag == DW_TAG_structure_type
|| parent->tag == DW_TAG_class_type
|| parent->tag == DW_TAG_interface_type
- || parent->tag == DW_TAG_union_type)
+ || parent->tag == DW_TAG_union_type
+ || parent->tag == DW_TAG_enumeration_type)
{
if (grandparent_scope == NULL)
parent->scope = parent->name;
@@ -2394,7 +2395,7 @@ partial_die_parent_scope (struct partial_die_info *pdi,
parent->scope = typename_concat (&cu->comp_unit_obstack, grandparent_scope,
parent->name, cu);
}
- else if (parent->tag == DW_TAG_enumeration_type)
+ else if (parent->tag == DW_TAG_enumerator)
/* Enumerators should not get the name of the enumeration as a prefix. */
parent->scope = grandparent_scope;
else