mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
gdb/
Fix DWARF-3+ DW_AT_accessibility default assumption. * dwarf2read.c (dwarf2_add_field): Fix new_field->accessibility for cu->header.version >= 3.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2011-03-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
Fix DWARF-3+ DW_AT_accessibility default assumption.
|
||||||
|
* dwarf2read.c (dwarf2_add_field): Fix new_field->accessibility for
|
||||||
|
cu->header.version >= 3.
|
||||||
|
|
||||||
2011-03-08 Pedro Alves <pedro@codesourcery.com>
|
2011-03-08 Pedro Alves <pedro@codesourcery.com>
|
||||||
|
|
||||||
* remote.c (remote_check_symbols): Skip if the target has no
|
* remote.c (remote_check_symbols): Skip if the target has no
|
||||||
|
@ -6238,13 +6238,25 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
|
|||||||
}
|
}
|
||||||
fip->nfields++;
|
fip->nfields++;
|
||||||
|
|
||||||
/* Handle accessibility and virtuality of field.
|
if (cu->header.version < 3)
|
||||||
The default accessibility for members is public, the default
|
{
|
||||||
accessibility for inheritance is private. */
|
/* The default DWARF 2 accessibility for members is public, the default
|
||||||
if (die->tag != DW_TAG_inheritance)
|
accessibility for inheritance is private. */
|
||||||
new_field->accessibility = DW_ACCESS_public;
|
|
||||||
|
if (die->tag != DW_TAG_inheritance)
|
||||||
|
new_field->accessibility = DW_ACCESS_public;
|
||||||
|
else
|
||||||
|
new_field->accessibility = DW_ACCESS_private;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
new_field->accessibility = DW_ACCESS_private;
|
{
|
||||||
|
/* DWARF 3 specifies the default accessibility explicitly. */
|
||||||
|
|
||||||
|
if (die->parent->tag == DW_TAG_class_type)
|
||||||
|
new_field->accessibility = DW_ACCESS_private;
|
||||||
|
else
|
||||||
|
new_field->accessibility = DW_ACCESS_public;
|
||||||
|
}
|
||||||
new_field->virtuality = DW_VIRTUALITY_none;
|
new_field->virtuality = DW_VIRTUALITY_none;
|
||||||
|
|
||||||
attr = dwarf2_attr (die, DW_AT_accessibility, cu);
|
attr = dwarf2_attr (die, DW_AT_accessibility, cu);
|
||||||
|
Reference in New Issue
Block a user