PR c++/11702
* NEWS: Add entry. * dwarf2read.c (dwarf2_add_field): If DW_AT_const_value is present, create a symbol for the field and record the value. (new_symbol): Handle DW_TAG_member. * gdbtypes.c (field_is_static): Remove FIXME. * symtab.c (search_symbols): When searching for VARIABLES_DOMAIN, only ignore LOC_CONST symbols that are enums. testsuite/ Test PR c++/11702. * gdb.cp/m-static.exp: Add testcase. * gdb.cp/m-static.h (gnu_obj_4): Add initialized static const member.
This commit is contained in:
parent
6e70227d64
commit
254e6b9ed4
8 changed files with 68 additions and 8 deletions
|
@ -2512,9 +2512,7 @@ field_is_static (struct field *f)
|
|||
to the address of the enclosing struct. It would be nice to
|
||||
have a dedicated flag that would be set for static fields when
|
||||
the type is being created. But in practice, checking the field
|
||||
loc_kind should give us an accurate answer (at least as long as
|
||||
we assume that DWARF block locations are not going to be used
|
||||
for static fields). FIXME? */
|
||||
loc_kind should give us an accurate answer. */
|
||||
return (FIELD_LOC_KIND (*f) == FIELD_LOC_KIND_PHYSNAME
|
||||
|| FIELD_LOC_KIND (*f) == FIELD_LOC_KIND_PHYSADDR);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue