diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-03-22 09:50:42 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-03-22 09:50:42 +0000 |
commit | 29e0eb9c87964d7f1f2fa9c0f000b79aefbc7baf (patch) | |
tree | 240c6e6a060cc751b073e0357780863b33e42e47 /gdb | |
parent | 057758407cda4549e446ab0d061482ae6f7cd021 (diff) | |
download | gdb-29e0eb9c87964d7f1f2fa9c0f000b79aefbc7baf.zip gdb-29e0eb9c87964d7f1f2fa9c0f000b79aefbc7baf.tar.gz gdb-29e0eb9c87964d7f1f2fa9c0f000b79aefbc7baf.tar.bz2 |
gdb/
Revert:
2011-03-21 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf2read.c (producer_is_gxx_lt_4_6): New function.
(dwarf2_add_field): Fix new_field->accessibility for
cu->header.version >= 3 while verifying also producer_is_gxx_lt_4_6.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 48 |
2 files changed, 14 insertions, 42 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5388eef..f167e6c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2011-03-22 Jan Kratochvil <jan.kratochvil@redhat.com> + + Revert: + 2011-03-21 Jan Kratochvil <jan.kratochvil@redhat.com> + * dwarf2read.c (producer_is_gxx_lt_4_6): New function. + (dwarf2_add_field): Fix new_field->accessibility for + cu->header.version >= 3 while verifying also producer_is_gxx_lt_4_6. + 2011-03-22 Phil Muldoon <pmuldoon@redhat.com> PR python/12183 diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 8807d27..810f66a 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -6209,27 +6209,6 @@ dwarf2_record_block_ranges (struct die_info *die, struct block *block, } } -/* Check for GCC PR debug/45124 fix which is not present in any G++ version up - to 4.5.any hwile it is present already in G++ 4.6.0 - the PR has been fixed - during 4.6.0 experimental. */ - -static int -producer_is_gxx_lt_4_6 (const char *producer) -{ - int major, minor; - - /* Whitespaces are ignored in both PRODUCER and the format string. */ - if (sscanf (producer, "GNU C++ %d.%d", &major, &minor) != 2) - { - /* For non-GCC compilers expect their behavior is DWARF version - compliant. */ - - return 0; - } - - return major < 4 || (major == 4 && minor < 6); -} - /* Add an aggregate field to the field list. */ static void @@ -6260,28 +6239,13 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die, } fip->nfields++; - if (cu->header.version < 3 || producer_is_gxx_lt_4_6 (cu->producer)) - { - /* 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+ defines the default accessibility a different way - see - below - than DWARF 2 has defined. The same rules apply now for - DW_TAG_inheritance as for the members and it only depends on the - container kind. */ - - 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); |