aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-03-09 07:07:55 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-03-09 07:07:55 +0000
commitf8de3c55e995e88e61316d7025e4d83927497e18 (patch)
tree2051ac58191a151329756e0f678002328f896f1c
parentd9837b00fd380865ca37b65be90de8826f745648 (diff)
downloadgdb-f8de3c55e995e88e61316d7025e4d83927497e18.zip
gdb-f8de3c55e995e88e61316d7025e4d83927497e18.tar.gz
gdb-f8de3c55e995e88e61316d7025e4d83927497e18.tar.bz2
gdb/
Revert: 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.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/dwarf2read.c24
2 files changed, 14 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0a7dc61..4154649 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2011-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Revert:
+ 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-09 Yao Qi <yao@codesourcery.com>
* common/Makefile.in: Remove.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index ba5680f..2a47c7d 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -6238,25 +6238,13 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
}
fip->nfields++;
- if (cu->header.version < 3)
- {
- /* The default DWARF 2 accessibility for members is public, the default
- accessibility for inheritance is private. */
-
- if (die->tag != DW_TAG_inheritance)
- new_field->accessibility = DW_ACCESS_public;
- else
- new_field->accessibility = DW_ACCESS_private;
- }
+ /* Handle accessibility and virtuality of field.
+ The default accessibility for members is public, the default
+ accessibility for inheritance is private. */
+ if (die->tag != DW_TAG_inheritance)
+ new_field->accessibility = DW_ACCESS_public;
else
- {
- /* 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->accessibility = DW_ACCESS_private;
new_field->virtuality = DW_VIRTUALITY_none;
attr = dwarf2_attr (die, DW_AT_accessibility, cu);