public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: jkratoch@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  users/jkratoch/indexcxx-nameswrite-namesread: .
Date: Sun, 30 Apr 2017 18:28:00 -0000	[thread overview]
Message-ID: <20170430182849.30443.qmail@sourceware.org> (raw)

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 <jan.kratochvil@redhat.com>
Date:   Sun Apr 30 19:29:34 2017 +0200

    .

commit bb5c93af3d3345ff436f28b649677b30ad9bd703
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
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<expand_symtabs_file_matcher_ftype> file_matcher,
+   gdb::function_view<expand_symtabs_exp_notify_ftype> 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<expand_symtabs_file_matcher_ftype> 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.


             reply	other threads:[~2017-04-30 18:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-30 18:28 jkratoch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-05-24  8:46 jkratoch
2017-05-22 21:41 jkratoch
2017-04-29 22:28 jkratoch
2017-04-23 20:23 jkratoch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170430182849.30443.qmail@sourceware.org \
    --to=jkratoch@sourceware.org \
    --cc=archer-commits@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).