From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30500 invoked by alias); 30 Apr 2017 18:28:50 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 30475 invoked by uid 9674); 30 Apr 2017 18:28:50 -0000 Date: Sun, 30 Apr 2017 18:28:00 -0000 Message-ID: <20170430182849.30443.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] users/jkratoch/indexcxx-nameswrite-namesread: . X-Git-Refname: refs/heads/users/jkratoch/indexcxx-nameswrite-namesread X-Git-Reftype: branch X-Git-Oldrev: 0b6916bdf557d987df0636f024bc264a308045d7 X-Git-Newrev: 8fd75b5f6edf3f1ad68acb903efa092869f7b096 X-SW-Source: 2017-q2/txt/msg00016.txt.bz2 List-Id: The branch, users/jkratoch/indexcxx-nameswrite-namesread has been updated via 8fd75b5f6edf3f1ad68acb903efa092869f7b096 (commit) via bb5c93af3d3345ff436f28b649677b30ad9bd703 (commit) from 0b6916bdf557d987df0636f024bc264a308045d7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 8fd75b5f6edf3f1ad68acb903efa092869f7b096 Author: Jan Kratochvil Date: Sun Apr 30 19:29:34 2017 +0200 . commit bb5c93af3d3345ff436f28b649677b30ad9bd703 Author: Jan Kratochvil Date: Sun Apr 30 19:23:59 2017 +0200 . ----------------------------------------------------------------------- Summary of changes: gdb/dwarf2read.c | 64 +++++++++++++++++++++++++++--------------------------- 1 files changed, 32 insertions(+), 32 deletions(-) First 500 lines of diff: diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index d339e84..2534d19 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -208,14 +208,16 @@ struct mapped_index const char *constant_pool; }; -/* A description of the mapped .debug_names. */ +// A description of the mapped .debug_names. +// Uninitialized map has CU_COUNT 0. class Mapped_debug_names { public: bfd_endian dwarf5_byte_order; bool dwarf5_is_dwarf64; uint8_t offset_size; - uint32_t cu_count, tu_count, bucket_count, name_count; + uint32_t cu_count = 0; + uint32_t tu_count, bucket_count, name_count; const gdb_byte *cu_table_reordered, *tu_table_reordered; const uint32_t *bucket_table_reordered, *hash_table_reordered; const gdb_byte *name_table_string_offs_reordered; @@ -3691,7 +3693,6 @@ read_debug_names_from_section (struct objfile *objfile, const gdb_byte *addr, *abbrev_table_start; offset_type *metadata; int i; - bfd *abfd = get_section_bfd_owner (section); unsigned int bytes_read; LONGEST length; uint16_t version, padding; @@ -3712,6 +3713,7 @@ read_debug_names_from_section (struct objfile *objfile, addr = section->buffer; + bfd *const abfd (get_section_bfd_owner (section)); length = read_initial_length (abfd, addr, &bytes_read); addr += bytes_read; map.dwarf5_is_dwarf64 = bytes_read != 4; @@ -3761,7 +3763,7 @@ read_debug_names_from_section (struct objfile *objfile, in the foreign TU list. */ foreign_tu_count = read_4_bytes (abfd, addr); addr += 4; - if (foreign_tu_count != 5) + if (foreign_tu_count != 0) { warning (_("Section .debug_names in %s has unsupported %lu foreign TUs, " "ignoring .debug_names."), @@ -4668,6 +4670,28 @@ dw_expand_symtabs_matching_file_matcher } static void +dw2_expand_symtabs_matching_one + (struct dwarf2_per_cu_data *per_cu, + gdb::function_view file_matcher, + gdb::function_view expansion_notify) +{ + if (file_matcher == NULL || per_cu->v.quick->mark) + { + int symtab_was_null = + (per_cu->v.quick->compunit_symtab == NULL); + + dw2_instantiate_symtab (per_cu); + + if (expansion_notify != NULL + && symtab_was_null + && per_cu->v.quick->compunit_symtab != NULL) + { + expansion_notify (per_cu->v.quick->compunit_symtab); + } + } +} + +static void dw2_expand_symtabs_matching (struct objfile *objfile, gdb::function_view file_matcher, @@ -4769,20 +4793,8 @@ dw2_expand_symtabs_matching } per_cu = dw2_get_cutu (cu_index); - if (file_matcher == NULL || per_cu->v.quick->mark) - { - int symtab_was_null = - (per_cu->v.quick->compunit_symtab == NULL); - - dw2_instantiate_symtab (per_cu); - - if (expansion_notify != NULL - && symtab_was_null - && per_cu->v.quick->compunit_symtab != NULL) - { - expansion_notify (per_cu->v.quick->compunit_symtab); - } - } + dw2_expand_symtabs_matching_one (per_cu, file_matcher, + expansion_notify); } } } @@ -5394,20 +5406,8 @@ dw2_debug_names_expand_symtabs_matching struct dwarf2_per_cu_data *per_cu; while ((per_cu = iter.next ()) != NULL) - if (file_matcher == NULL || per_cu->v.quick->mark) - { - int symtab_was_null = - (per_cu->v.quick->compunit_symtab == NULL); - - dw2_instantiate_symtab (per_cu); - - if (expansion_notify != NULL - && symtab_was_null - && per_cu->v.quick->compunit_symtab != NULL) - { - expansion_notify (per_cu->v.quick->compunit_symtab); - } - } + dw2_expand_symtabs_matching_one (per_cu, file_matcher, + expansion_notify); } } hooks/post-receive -- Repository for Project Archer.