mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 01:50:48 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user