public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 04/38] Create dwarf2/abbrev.[ch]
Date: Thu, 23 Jan 2020 00:57:00 -0000	[thread overview]
Message-ID: <20200123005710.7978-5-tom@tromey.com> (raw)
In-Reply-To: <20200123005710.7978-1-tom@tromey.com>

This moves the abbrev table code out of dwarf2read.c and into new
files dwarf2/abbrev.[ch].

gdb/ChangeLog
2020-01-22  Tom Tromey  <tom@tromey.com>

	* dwarf2read.c (abbrev_table_up, struct abbrev_info)
	(struct attr_abbrev, ABBREV_HASH_SIZE, struct abbrev_table):
	Move.
	(read_cutu_die_from_dwo, build_type_psymtabs_1): Update.
	(abbrev_table::alloc_abbrev, abbrev_table::add_abbrev)
	(abbrev_table::lookup_abbrev, abbrev_table_read_table): Move to
	abbrev.c.
	* dwarf2/abbrev.h: New file.
	* dwarf2/abbrev.c: New file, from dwarf2read.c.
	* Makefile.in (COMMON_SFILES): Add dwarf2/abbrev.c.

Change-Id: I87911bc5297de4407587ca849fef8e8d19136c30
---
 gdb/ChangeLog       |  13 +++
 gdb/Makefile.in     |   1 +
 gdb/dwarf2/abbrev.c | 178 ++++++++++++++++++++++++++++++++++
 gdb/dwarf2/abbrev.h | 103 ++++++++++++++++++++
 gdb/dwarf2read.c    | 229 +-------------------------------------------
 5 files changed, 300 insertions(+), 224 deletions(-)
 create mode 100644 gdb/dwarf2/abbrev.c
 create mode 100644 gdb/dwarf2/abbrev.h

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index c10ce71a50e..2188d32c4e6 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1002,6 +1002,7 @@ COMMON_SFILES = \
 	dwarf2expr.c \
 	dwarf2loc.c \
 	dwarf2read.c \
+	dwarf2/abbrev.c \
 	dwarf2/leb.c \
 	dwarf2/section.c \
 	eval.c \
diff --git a/gdb/dwarf2/abbrev.c b/gdb/dwarf2/abbrev.c
new file mode 100644
index 00000000000..6bd455f012b
--- /dev/null
+++ b/gdb/dwarf2/abbrev.c
@@ -0,0 +1,178 @@
+/* DWARF 2 abbreviations
+
+   Copyright (C) 1994-2020 Free Software Foundation, Inc.
+
+   Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology,
+   Inc.  with support from Florida State University (under contract
+   with the Ada Joint Program Office), and Silicon Graphics, Inc.
+   Initial contribution by Brent Benson, Harris Computer Systems, Inc.,
+   based on Fred Fish's (Cygnus Support) implementation of DWARF 1
+   support.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "defs.h"
+#include "dwarf2read.h"
+#include "dwarf2/abbrev.h"
+#include "dwarf2/leb.h"
+#include "bfd.h"
+
+/* Abbreviation tables.
+
+   In DWARF version 2, the description of the debugging information is
+   stored in a separate .debug_abbrev section.  Before we read any
+   dies from a section we read in all abbreviations and install them
+   in a hash table.  */
+
+/* Allocate space for a struct abbrev_info object in ABBREV_TABLE.  */
+
+struct abbrev_info *
+abbrev_table::alloc_abbrev ()
+{
+  struct abbrev_info *abbrev;
+
+  abbrev = XOBNEW (&abbrev_obstack, struct abbrev_info);
+  memset (abbrev, 0, sizeof (struct abbrev_info));
+
+  return abbrev;
+}
+
+/* Add an abbreviation to the table.  */
+
+void
+abbrev_table::add_abbrev (unsigned int abbrev_number,
+			  struct abbrev_info *abbrev)
+{
+  unsigned int hash_number;
+
+  hash_number = abbrev_number % ABBREV_HASH_SIZE;
+  abbrev->next = m_abbrevs[hash_number];
+  m_abbrevs[hash_number] = abbrev;
+}
+
+/* Look up an abbrev in the table.
+   Returns NULL if the abbrev is not found.  */
+
+struct abbrev_info *
+abbrev_table::lookup_abbrev (unsigned int abbrev_number)
+{
+  unsigned int hash_number;
+  struct abbrev_info *abbrev;
+
+  hash_number = abbrev_number % ABBREV_HASH_SIZE;
+  abbrev = m_abbrevs[hash_number];
+
+  while (abbrev)
+    {
+      if (abbrev->number == abbrev_number)
+	return abbrev;
+      abbrev = abbrev->next;
+    }
+  return NULL;
+}
+
+/* Read in an abbrev table.  */
+
+abbrev_table_up
+abbrev_table_read_table (struct objfile *objfile,
+			 struct dwarf2_section_info *section,
+			 sect_offset sect_off)
+{
+  bfd *abfd = section->get_bfd_owner ();
+  const gdb_byte *abbrev_ptr;
+  struct abbrev_info *cur_abbrev;
+  unsigned int abbrev_number, bytes_read, abbrev_name;
+  unsigned int abbrev_form;
+  std::vector<struct attr_abbrev> cur_attrs;
+
+  abbrev_table_up abbrev_table (new struct abbrev_table (sect_off));
+
+  section->read (objfile);
+  abbrev_ptr = section->buffer + to_underlying (sect_off);
+  abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+  abbrev_ptr += bytes_read;
+
+  /* Loop until we reach an abbrev number of 0.  */
+  while (abbrev_number)
+    {
+      cur_attrs.clear ();
+      cur_abbrev = abbrev_table->alloc_abbrev ();
+
+      /* read in abbrev header */
+      cur_abbrev->number = abbrev_number;
+      cur_abbrev->tag
+	= (enum dwarf_tag) read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+      abbrev_ptr += bytes_read;
+      cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr);
+      abbrev_ptr += 1;
+
+      /* now read in declarations */
+      for (;;)
+	{
+	  LONGEST implicit_const;
+
+	  abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+	  abbrev_ptr += bytes_read;
+	  abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+	  abbrev_ptr += bytes_read;
+	  if (abbrev_form == DW_FORM_implicit_const)
+	    {
+	      implicit_const = read_signed_leb128 (abfd, abbrev_ptr,
+						   &bytes_read);
+	      abbrev_ptr += bytes_read;
+	    }
+	  else
+	    {
+	      /* Initialize it due to a false compiler warning.  */
+	      implicit_const = -1;
+	    }
+
+	  if (abbrev_name == 0)
+	    break;
+
+	  cur_attrs.emplace_back ();
+	  struct attr_abbrev &cur_attr = cur_attrs.back ();
+	  cur_attr.name = (enum dwarf_attribute) abbrev_name;
+	  cur_attr.form = (enum dwarf_form) abbrev_form;
+	  cur_attr.implicit_const = implicit_const;
+	  ++cur_abbrev->num_attrs;
+	}
+
+      cur_abbrev->attrs =
+	XOBNEWVEC (&abbrev_table->abbrev_obstack, struct attr_abbrev,
+		   cur_abbrev->num_attrs);
+      memcpy (cur_abbrev->attrs, cur_attrs.data (),
+	      cur_abbrev->num_attrs * sizeof (struct attr_abbrev));
+
+      abbrev_table->add_abbrev (abbrev_number, cur_abbrev);
+
+      /* Get next abbreviation.
+         Under Irix6 the abbreviations for a compilation unit are not
+         always properly terminated with an abbrev number of 0.
+         Exit loop if we encounter an abbreviation which we have
+         already read (which means we are about to read the abbreviations
+         for the next compile unit) or if the end of the abbreviation
+         table is reached.  */
+      if ((unsigned int) (abbrev_ptr - section->buffer) >= section->size)
+	break;
+      abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
+      abbrev_ptr += bytes_read;
+      if (abbrev_table->lookup_abbrev (abbrev_number) != NULL)
+	break;
+    }
+
+  return abbrev_table;
+}
diff --git a/gdb/dwarf2/abbrev.h b/gdb/dwarf2/abbrev.h
new file mode 100644
index 00000000000..df83c093be2
--- /dev/null
+++ b/gdb/dwarf2/abbrev.h
@@ -0,0 +1,103 @@
+/* DWARF abbrev table
+
+   Copyright (C) 1994-2020 Free Software Foundation, Inc.
+
+   Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology,
+   Inc.  with support from Florida State University (under contract
+   with the Ada Joint Program Office), and Silicon Graphics, Inc.
+   Initial contribution by Brent Benson, Harris Computer Systems, Inc.,
+   based on Fred Fish's (Cygnus Support) implementation of DWARF 1
+   support.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef GDB_DWARF2_ABBREV_H
+#define GDB_DWARF2_ABBREV_H
+
+/* This data structure holds the information of an abbrev.  */
+struct abbrev_info
+  {
+    unsigned int number;	/* number identifying abbrev */
+    enum dwarf_tag tag;		/* dwarf tag */
+    unsigned short has_children;		/* boolean */
+    unsigned short num_attrs;	/* number of attributes */
+    struct attr_abbrev *attrs;	/* an array of attribute descriptions */
+    struct abbrev_info *next;	/* next in chain */
+  };
+
+struct attr_abbrev
+  {
+    ENUM_BITFIELD(dwarf_attribute) name : 16;
+    ENUM_BITFIELD(dwarf_form) form : 16;
+
+    /* It is valid only if FORM is DW_FORM_implicit_const.  */
+    LONGEST implicit_const;
+  };
+
+/* Size of abbrev_table.abbrev_hash_table.  */
+#define ABBREV_HASH_SIZE 121
+
+/* Top level data structure to contain an abbreviation table.  */
+
+struct abbrev_table
+{
+  explicit abbrev_table (sect_offset off)
+    : sect_off (off)
+  {
+    m_abbrevs =
+      XOBNEWVEC (&abbrev_obstack, struct abbrev_info *, ABBREV_HASH_SIZE);
+    memset (m_abbrevs, 0, ABBREV_HASH_SIZE * sizeof (struct abbrev_info *));
+  }
+
+  DISABLE_COPY_AND_ASSIGN (abbrev_table);
+
+  /* Allocate space for a struct abbrev_info object in
+     ABBREV_TABLE.  */
+  struct abbrev_info *alloc_abbrev ();
+
+  /* Add an abbreviation to the table.  */
+  void add_abbrev (unsigned int abbrev_number, struct abbrev_info *abbrev);
+
+  /* Look up an abbrev in the table.
+     Returns NULL if the abbrev is not found.  */
+
+  struct abbrev_info *lookup_abbrev (unsigned int abbrev_number);
+
+
+  /* Where the abbrev table came from.
+     This is used as a sanity check when the table is used.  */
+  const sect_offset sect_off;
+
+  /* Storage for the abbrev table.  */
+  auto_obstack abbrev_obstack;
+
+private:
+
+  /* Hash table of abbrevs.
+     This is an array of size ABBREV_HASH_SIZE allocated in abbrev_obstack.
+     It could be statically allocated, but the previous code didn't so we
+     don't either.  */
+  struct abbrev_info **m_abbrevs;
+};
+
+typedef std::unique_ptr<struct abbrev_table> abbrev_table_up;
+
+extern abbrev_table_up abbrev_table_read_table
+  (struct objfile *objfile,
+   struct dwarf2_section_info *section,
+   sect_offset sect_off);
+
+#endif /* GDB_DWARF2_ABBREV_H */
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index c1fdbccd8d3..886bec1d7aa 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -30,6 +30,7 @@
 
 #include "defs.h"
 #include "dwarf2read.h"
+#include "dwarf2/abbrev.h"
 #include "dwarf-index-cache.h"
 #include "dwarf-index-common.h"
 #include "dwarf2/leb.h"
@@ -875,9 +876,6 @@ struct dwp_file
   asection **elf_sections = nullptr;
 };
 
-struct abbrev_table;
-typedef std::unique_ptr<struct abbrev_table> abbrev_table_up;
-
 /* Struct used to pass misc. parameters to read_die_and_children, et
    al.  which are used for both .debug_info and .debug_types dies.
    All parameters here are unchanging for the life of the call.  This
@@ -1235,72 +1233,6 @@ struct partial_die_info : public allocate_on_obstack
     }
   };
 
-/* This data structure holds the information of an abbrev.  */
-struct abbrev_info
-  {
-    unsigned int number;	/* number identifying abbrev */
-    enum dwarf_tag tag;		/* dwarf tag */
-    unsigned short has_children;		/* boolean */
-    unsigned short num_attrs;	/* number of attributes */
-    struct attr_abbrev *attrs;	/* an array of attribute descriptions */
-    struct abbrev_info *next;	/* next in chain */
-  };
-
-struct attr_abbrev
-  {
-    ENUM_BITFIELD(dwarf_attribute) name : 16;
-    ENUM_BITFIELD(dwarf_form) form : 16;
-
-    /* It is valid only if FORM is DW_FORM_implicit_const.  */
-    LONGEST implicit_const;
-  };
-
-/* Size of abbrev_table.abbrev_hash_table.  */
-#define ABBREV_HASH_SIZE 121
-
-/* Top level data structure to contain an abbreviation table.  */
-
-struct abbrev_table
-{
-  explicit abbrev_table (sect_offset off)
-    : sect_off (off)
-  {
-    m_abbrevs =
-      XOBNEWVEC (&abbrev_obstack, struct abbrev_info *, ABBREV_HASH_SIZE);
-    memset (m_abbrevs, 0, ABBREV_HASH_SIZE * sizeof (struct abbrev_info *));
-  }
-
-  DISABLE_COPY_AND_ASSIGN (abbrev_table);
-
-  /* Allocate space for a struct abbrev_info object in
-     ABBREV_TABLE.  */
-  struct abbrev_info *alloc_abbrev ();
-
-  /* Add an abbreviation to the table.  */
-  void add_abbrev (unsigned int abbrev_number, struct abbrev_info *abbrev);
-
-  /* Look up an abbrev in the table.
-     Returns NULL if the abbrev is not found.  */
-
-  struct abbrev_info *lookup_abbrev (unsigned int abbrev_number);
-
-
-  /* Where the abbrev table came from.
-     This is used as a sanity check when the table is used.  */
-  const sect_offset sect_off;
-
-  /* Storage for the abbrev table.  */
-  auto_obstack abbrev_obstack;
-
-private:
-
-  /* Hash table of abbrevs.
-     This is an array of size ABBREV_HASH_SIZE allocated in abbrev_obstack.
-     It could be statically allocated, but the previous code didn't so we
-     don't either.  */
-  struct abbrev_info **m_abbrevs;
-};
-
 /* Attributes have a name and a value.  */
 struct attribute
   {
@@ -1515,10 +1447,6 @@ static void dwarf2_read_symtab (struct partial_symtab *,
 
 static void psymtab_to_symtab_1 (struct partial_symtab *);
 
-static abbrev_table_up abbrev_table_read_table
-  (struct dwarf2_per_objfile *dwarf2_per_objfile, struct dwarf2_section_info *,
-   sect_offset);
-
 static unsigned int peek_abbrev_code (bfd *, const gdb_byte *);
 
 static struct partial_die_info *load_partial_dies
@@ -7213,7 +7141,7 @@ read_cutu_die_from_dwo (struct dwarf2_per_cu_data *this_cu,
     }
 
   *result_dwo_abbrev_table
-    = abbrev_table_read_table (dwarf2_per_objfile, dwo_abbrev_section,
+    = abbrev_table_read_table (objfile, dwo_abbrev_section,
 			       cu->header.abbrev_sect_off);
   init_cu_die_reader (result_reader, cu, section, dwo_unit->dwo_file,
 		      result_dwo_abbrev_table->get ());
@@ -7518,7 +7446,7 @@ cutu_reader::cutu_reader (struct dwarf2_per_cu_data *this_cu,
   else
     {
       m_abbrev_table_holder
-	= abbrev_table_read_table (dwarf2_per_objfile, abbrev_section,
+	= abbrev_table_read_table (objfile, abbrev_section,
 				   cu->header.abbrev_sect_off);
       abbrev_table = m_abbrev_table_holder.get ();
     }
@@ -7665,7 +7593,7 @@ cutu_reader::cutu_reader (struct dwarf2_per_cu_data *this_cu,
     }
 
   m_abbrev_table_holder
-    = abbrev_table_read_table (dwarf2_per_objfile, abbrev_section,
+    = abbrev_table_read_table (objfile, abbrev_section,
 			       m_new_cu->header.abbrev_sect_off);
 
   init_cu_die_reader (this, m_new_cu.get (), section, dwo_file,
@@ -8161,7 +8089,7 @@ build_type_psymtabs_1 (struct dwarf2_per_objfile *dwarf2_per_objfile)
 	{
 	  abbrev_offset = tu.abbrev_offset;
 	  abbrev_table =
-	    abbrev_table_read_table (dwarf2_per_objfile,
+	    abbrev_table_read_table (dwarf2_per_objfile->objfile,
 				     &dwarf2_per_objfile->abbrev,
 				     abbrev_offset);
 	  ++tu_stats->nr_uniq_abbrev_tables;
@@ -18302,153 +18230,6 @@ read_full_die (const struct die_reader_specs *reader,
   return result;
 }
 \f
-/* Abbreviation tables.
-
-   In DWARF version 2, the description of the debugging information is
-   stored in a separate .debug_abbrev section.  Before we read any
-   dies from a section we read in all abbreviations and install them
-   in a hash table.  */
-
-/* Allocate space for a struct abbrev_info object in ABBREV_TABLE.  */
-
-struct abbrev_info *
-abbrev_table::alloc_abbrev ()
-{
-  struct abbrev_info *abbrev;
-
-  abbrev = XOBNEW (&abbrev_obstack, struct abbrev_info);
-  memset (abbrev, 0, sizeof (struct abbrev_info));
-
-  return abbrev;
-}
-
-/* Add an abbreviation to the table.  */
-
-void
-abbrev_table::add_abbrev (unsigned int abbrev_number,
-			  struct abbrev_info *abbrev)
-{
-  unsigned int hash_number;
-
-  hash_number = abbrev_number % ABBREV_HASH_SIZE;
-  abbrev->next = m_abbrevs[hash_number];
-  m_abbrevs[hash_number] = abbrev;
-}
-
-/* Look up an abbrev in the table.
-   Returns NULL if the abbrev is not found.  */
-
-struct abbrev_info *
-abbrev_table::lookup_abbrev (unsigned int abbrev_number)
-{
-  unsigned int hash_number;
-  struct abbrev_info *abbrev;
-
-  hash_number = abbrev_number % ABBREV_HASH_SIZE;
-  abbrev = m_abbrevs[hash_number];
-
-  while (abbrev)
-    {
-      if (abbrev->number == abbrev_number)
-	return abbrev;
-      abbrev = abbrev->next;
-    }
-  return NULL;
-}
-
-/* Read in an abbrev table.  */
-
-static abbrev_table_up
-abbrev_table_read_table (struct dwarf2_per_objfile *dwarf2_per_objfile,
-			 struct dwarf2_section_info *section,
-			 sect_offset sect_off)
-{
-  struct objfile *objfile = dwarf2_per_objfile->objfile;
-  bfd *abfd = section->get_bfd_owner ();
-  const gdb_byte *abbrev_ptr;
-  struct abbrev_info *cur_abbrev;
-  unsigned int abbrev_number, bytes_read, abbrev_name;
-  unsigned int abbrev_form;
-  std::vector<struct attr_abbrev> cur_attrs;
-
-  abbrev_table_up abbrev_table (new struct abbrev_table (sect_off));
-
-  section->read (objfile);
-  abbrev_ptr = section->buffer + to_underlying (sect_off);
-  abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
-  abbrev_ptr += bytes_read;
-
-  /* Loop until we reach an abbrev number of 0.  */
-  while (abbrev_number)
-    {
-      cur_attrs.clear ();
-      cur_abbrev = abbrev_table->alloc_abbrev ();
-
-      /* read in abbrev header */
-      cur_abbrev->number = abbrev_number;
-      cur_abbrev->tag
-	= (enum dwarf_tag) read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
-      abbrev_ptr += bytes_read;
-      cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr);
-      abbrev_ptr += 1;
-
-      /* now read in declarations */
-      for (;;)
-	{
-	  LONGEST implicit_const;
-
-	  abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
-	  abbrev_ptr += bytes_read;
-	  abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
-	  abbrev_ptr += bytes_read;
-	  if (abbrev_form == DW_FORM_implicit_const)
-	    {
-	      implicit_const = read_signed_leb128 (abfd, abbrev_ptr,
-						   &bytes_read);
-	      abbrev_ptr += bytes_read;
-	    }
-	  else
-	    {
-	      /* Initialize it due to a false compiler warning.  */
-	      implicit_const = -1;
-	    }
-
-	  if (abbrev_name == 0)
-	    break;
-
-	  cur_attrs.emplace_back ();
-	  struct attr_abbrev &cur_attr = cur_attrs.back ();
-	  cur_attr.name = (enum dwarf_attribute) abbrev_name;
-	  cur_attr.form = (enum dwarf_form) abbrev_form;
-	  cur_attr.implicit_const = implicit_const;
-	  ++cur_abbrev->num_attrs;
-	}
-
-      cur_abbrev->attrs =
-	XOBNEWVEC (&abbrev_table->abbrev_obstack, struct attr_abbrev,
-		   cur_abbrev->num_attrs);
-      memcpy (cur_abbrev->attrs, cur_attrs.data (),
-	      cur_abbrev->num_attrs * sizeof (struct attr_abbrev));
-
-      abbrev_table->add_abbrev (abbrev_number, cur_abbrev);
-
-      /* Get next abbreviation.
-         Under Irix6 the abbreviations for a compilation unit are not
-         always properly terminated with an abbrev number of 0.
-         Exit loop if we encounter an abbreviation which we have
-         already read (which means we are about to read the abbreviations
-         for the next compile unit) or if the end of the abbreviation
-         table is reached.  */
-      if ((unsigned int) (abbrev_ptr - section->buffer) >= section->size)
-	break;
-      abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
-      abbrev_ptr += bytes_read;
-      if (abbrev_table->lookup_abbrev (abbrev_number) != NULL)
-	break;
-    }
-
-  return abbrev_table;
-}
 
 /* Returns nonzero if TAG represents a type that we might generate a partial
    symbol for.  */
-- 
2.17.2

  parent reply	other threads:[~2020-01-23  0:57 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23  0:57 [PATCH 00/38] Start reorganization of DWARF code Tom Tromey
2020-01-23  0:57 ` [PATCH 20/38] Minor cleanups in abbrev_table Tom Tromey
2020-01-23  0:57 ` [PATCH 30/38] Unify read_initial_length implementations Tom Tromey
2020-01-27 13:31   ` Christian Biesinger via gdb-patches
2020-01-28  0:54     ` Tom Tromey
2020-01-23  0:57 ` [PATCH 09/38] Don't declare die_info in dwarf2read.h Tom Tromey
2020-01-23  0:57 ` [PATCH 17/38] Don't allocate DWO file hash on obstack Tom Tromey
2020-01-23  0:57 ` [PATCH 24/38] Move dwarf_always_disassemble to dwarf2/loc.c Tom Tromey
2020-01-23  0:57 ` [PATCH 25/38] Change file_full_name and file_file_name methods Tom Tromey
2020-01-27 13:31   ` Christian Biesinger via gdb-patches
2020-01-23  0:57 ` [PATCH 14/38] Change dwarf2_per_objfile::signatured_types to be htab_up Tom Tromey
2020-02-08 16:55   ` Simon Marchi
2020-01-23  0:57 ` [PATCH 18/38] Change dwp_file to use htab_up Tom Tromey
2020-01-23  0:57 ` Tom Tromey [this message]
2020-01-23  0:57 ` [PATCH 12/38] Introduce die_info::has_children Tom Tromey
2020-01-23  0:57 ` [PATCH 10/38] Remove die_reader_specs::comp_dir Tom Tromey
2020-01-23  0:57 ` [PATCH 28/38] Move dwarf2_per_cu_data::imported_symtabs earlier Tom Tromey
2020-01-23  0:57 ` [PATCH 02/38] Create dwarf2/section.[ch] Tom Tromey
2020-01-23  0:57 ` [PATCH 21/38] Use htab_up in abbrev_table Tom Tromey
2020-01-23  0:57 ` [PATCH 34/38] Convert read_offset to method on comp_unit_head Tom Tromey
2020-01-23  0:57 ` [PATCH 36/38] Move two more functions to dwarf2/leb.h Tom Tromey
2020-01-23  0:57 ` [PATCH 15/38] Change dwarf2_per_objfile::type_unit_groups to htab_up Tom Tromey
2020-01-23  0:57 ` [PATCH 23/38] Change dwarf2_per_objfile::quick_file_names_table " Tom Tromey
2020-01-23  0:57 ` [PATCH 33/38] Create dwarf2/comp-unit.[ch] Tom Tromey
2020-01-23  0:57 ` [PATCH 08/38] Remove die_info_ptr typedef Tom Tromey
2020-01-23  0:57 ` [PATCH 01/38] Create dwarf2/leb.[ch] Tom Tromey
2020-01-23  0:57 ` [PATCH 26/38] Change line_table methods to return unique_xmalloc_ptr Tom Tromey
2020-01-23  0:57 ` [PATCH 06/38] Change some attribute functions to be methods Tom Tromey
2020-01-23  0:57 ` [PATCH 11/38] Move DWARF code to dwarf2/ subdirectory Tom Tromey
2020-01-27 13:41   ` Christian Biesinger via gdb-patches
2020-01-28  3:12     ` Tom Tromey
2020-01-23  0:57 ` [PATCH 35/38] Convert read_address to a method on comp_unit_head Tom Tromey
2020-01-23  0:57 ` [PATCH 07/38] Change attr_form_is_block to be a method Tom Tromey
2020-01-23  0:57 ` [PATCH 16/38] Change dwarf2_per_objfile::line_header_hash to htab_up Tom Tromey
2020-01-23  0:57 ` [PATCH 31/38] Convert dwarf2_section_size to a method Tom Tromey
2020-01-23  0:57 ` [PATCH 19/38] Change dwarf2_per_objfile::die_type_hash to htab_up Tom Tromey
2020-01-23  0:57 ` [PATCH 27/38] Move DWARF line_header to new file Tom Tromey
2020-01-23  0:57 ` [PATCH 05/38] Create dwarf2/attribute.[ch] Tom Tromey
2020-01-23  0:57 ` [PATCH 38/38] Remove "keep" parameter from cutu_reader constructor Tom Tromey
2020-02-08 17:36   ` Simon Marchi
2020-01-23  0:57 ` [PATCH 32/38] Move read_offset_1 to leb.c Tom Tromey
2020-01-23  0:57 ` [PATCH 22/38] Minor simplification in abbrev_table::read Tom Tromey
2020-01-23  0:57 ` [PATCH 13/38] Remove DWARF queue-related globals Tom Tromey
2020-01-23  1:12 ` [PATCH 03/38] Change section functions to be methods of dwarf2_section_info Tom Tromey
2020-01-23  1:21 ` [PATCH 29/38] Add some methods to dwarf2_per_cu_data Tom Tromey
2020-01-23  2:34 ` [PATCH 37/38] Simplify "want_partial_unit" handling Tom Tromey
2020-02-08 17:38 ` [PATCH 00/38] Start reorganization of DWARF code Simon Marchi
2020-02-08 20:45   ` Tom Tromey

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=20200123005710.7978-5-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@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).