]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb] Fix typos in gdb/dwarf2
authorTom de Vries <tdevries@suse.de>
Tue, 2 Dec 2025 21:30:46 +0000 (22:30 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 2 Dec 2025 21:30:46 +0000 (22:30 +0100)
Fix the following typos:
...
gdb/dwarf2/cooked-index-shard.c:296: re-use ==> reuse
gdb/dwarf2/read-gdb-index.c:629: re-use ==> reuse
gdb/dwarf2/read.c:2399: re-using ==> reusing
gdb/dwarf2/read.c:11692: endianity ==> endianness
gdb/dwarf2/read.c:11694: endianity ==> endianness
gdb/dwarf2/read.c:11696: endianity ==> endianness
gdb/dwarf2/read.c:11709: endianity ==> endianness
...

Add aranges to the ignore list.

Also replace readin by "read_in".

Approved-By: Simon Marchi <simon.marchi@efficios.com>
.pre-commit-config.yaml
gdb/contrib/codespell-ignore-words.txt
gdb/dwarf2/abbrev.c
gdb/dwarf2/aranges.c
gdb/dwarf2/cooked-index-shard.c
gdb/dwarf2/dwz.c
gdb/dwarf2/index-write.c
gdb/dwarf2/read-gdb-index.c
gdb/dwarf2/read.c
gdb/dwarf2/section.c
gdb/dwarf2/section.h

index 0601516d757a446e91bd1b56cc44b4311936de29..180c330a5f8b5a38d5459404d4c12d27704f21e6 100644 (file)
@@ -71,7 +71,7 @@ repos:
     rev: v2.4.1
     hooks:
     - id: codespell
-      files: '^(gdbsupport|gdbserver|gdb/(tui|target|data-directory|po|system-gdbinit|mi|syscalls|arch|regformats|compile|python|guile|config|unittests|cli|testsuite/gdb.(ctf|dap|debuginfod|gdb|go|guile|mi|modula2|objc|opencl|opt|pascal|perf|replay|reverse|rocm|server|stabs|testsuite|tui|xml)))/'
+      files: '^(gdbsupport|gdbserver|gdb/(dwarf2|tui|target|data-directory|po|system-gdbinit|mi|syscalls|arch|regformats|compile|python|guile|config|unittests|cli|testsuite/gdb.(ctf|dap|debuginfod|gdb|go|guile|mi|modula2|objc|opencl|opt|pascal|perf|replay|reverse|rocm|server|stabs|testsuite|tui|xml)))/'
       args: [--config, gdb/contrib/setup.cfg]
   - repo: local
     hooks:
index 881b1d206e5289f4a7783e1b8df8f6f098688f5f..c07df0c001d9a95238cb564c1ea6cb967d75173e 100644 (file)
@@ -1,3 +1,4 @@
 configury
 SME
 Synopsys
+aranges
index e3c268e7c474340af12c9eed63ddd8b91b957441..3aed737838d1b9c6ea250a65a00e01123cec3c5d 100644 (file)
@@ -82,7 +82,7 @@ abbrev_table::read (struct dwarf2_section_info *section,
   struct obstack *obstack = &abbrev_table->m_abbrev_obstack;
 
   /* Caller must ensure this.  */
-  gdb_assert (section->readin);
+  gdb_assert (section->read_in);
   abbrev_ptr = section->buffer + to_underlying (sect_off);
 
   while (true)
index fec15cdd7cce9476b179eb9273f991a82fa11113..59cd9fdec9f4e91a297ddb8e31e3fb25b059470b 100644 (file)
@@ -30,7 +30,7 @@ read_addrmap_from_aranges (dwarf2_per_objfile *per_objfile,
                           deferred_warnings *warn)
 {
   /* Caller must ensure that the section has already been read.  */
-  gdb_assert (section->readin);
+  gdb_assert (section->read_in);
   if (section->empty ())
     return false;
 
index 58a02316e63ba481ea4af736a7fd9bc28b00330d..2a0dbdb99690d5a66c87ea85d890a4846b052d0a 100644 (file)
@@ -293,7 +293,7 @@ cooked_index_shard::finalize (const parent_map_map *parent_maps)
            }
          else
            {
-             /* An entry with that name was present, re-use its canonical
+             /* An entry with that name was present, reuse its canonical
                 name.  */
              entry->canonical = (*it)->canonical;
            }
index 1aa0d035d22cc3fd2662a29f07696a0ff3957075..d6bd6a5ccb63685857d50cdeb4da429f4d8376d1 100644 (file)
@@ -37,7 +37,7 @@ dwz_file::read_string (struct objfile *objfile, LONGEST str_offset)
 {
   /* This must be true because the sections are read in when the
      dwz_file is created.  */
-  gdb_assert (str.readin);
+  gdb_assert (str.read_in);
 
   if (str.buffer == NULL)
     error (_("supplementary DWARF file missing .debug_str "
index dd77be5310ed04fbed02697306b0cc42d4b5bd13..175f1a03a94053837d15a250111810e5ca8b3bb3 100644 (file)
@@ -876,7 +876,7 @@ private:
     explicit debug_str_lookup (dwarf2_per_bfd *per_bfd)
       : m_per_bfd (per_bfd)
     {
-      gdb_assert (per_bfd->str.readin);
+      gdb_assert (per_bfd->str.read_in);
       const gdb_byte *data = per_bfd->str.buffer;
       if (data == nullptr)
        return;
index 69a8a87b257c6b7a6b42bc36eb7269de8a2609ce..df35adec70b58a35a2102885409af20dce8b7d2c 100644 (file)
@@ -626,7 +626,7 @@ create_addrmap_from_gdb_index (dwarf2_per_objfile *per_objfile,
       return false;
     };
 
-  /* Cache the section for possible re-use on the next entry.  */
+  /* Cache the section for possible reuse on the next entry.  */
   struct obj_section *prev_sect = nullptr;
 
   const gdb_byte *iter = index->address_table.data ();
index d9cc5b9f98f2d05befc21535bcbc31e431c9500d..162c0bd57bbd1beadb403c4aef5beba138332ee2 100644 (file)
@@ -2396,7 +2396,7 @@ dwarf2_initialize_objfile (struct objfile *objfile,
   /* Was a GDB index already read when we processed an objfile sharing
      PER_BFD?  */
   else if (per_bfd->index_table != nullptr)
-    dwarf_read_debug_printf ("re-using symbols");
+    dwarf_read_debug_printf ("reusing symbols");
   else if (dwarf2_read_debug_names (per_objfile))
     dwarf_read_debug_printf ("found debug names");
   else if (dwarf2_read_gdb_index (per_objfile,
@@ -2707,7 +2707,7 @@ cutu_reader::init_cu_die_reader (dwarf2_cu *cu, dwarf2_section_info *section,
                                 struct dwo_file *dwo_file,
                                 const struct abbrev_table *abbrev_table)
 {
-  gdb_assert (section->readin && section->buffer != NULL);
+  gdb_assert (section->read_in && section->buffer != NULL);
   m_abfd = section->get_bfd_owner ();
   m_cu = cu;
   m_dwo_file = dwo_file;
@@ -7149,8 +7149,8 @@ create_dwp_v2_or_v5_section (dwarf2_per_bfd *per_bfd,
 
   result.virtual_offset = offset;
   result.size = size;
-  gdb_assert (section->readin);
-  result.readin = true;
+  gdb_assert (section->read_in);
+  result.read_in = true;
   result.buffer = section->buffer + offset;
   return result;
 }
@@ -7733,7 +7733,7 @@ cutu_reader::locate_dwo_sections (objfile *objfile, dwo_file &dwo_file)
        {
          /* Make sure we don't overwrite a section info that has been filled in
         already.  */
-         gdb_assert (!dw_sect->readin);
+         gdb_assert (!dw_sect->read_in);
 
          dw_sect->s.section = sec;
          dw_sect->size = bfd_section_size (sec);
@@ -7810,7 +7810,7 @@ dwarf2_locate_common_dwp_sections (struct objfile *objfile, bfd *abfd,
     {
       /* Make sure we don't overwrite a section info that has been filled in
         already.  */
-      gdb_assert (!dw_sect->readin);
+      gdb_assert (!dw_sect->read_in);
 
       dw_sect->s.section = sectp;
       dw_sect->size = bfd_section_size (sectp);
@@ -7859,7 +7859,7 @@ dwarf2_locate_v2_dwp_sections (struct objfile *objfile, bfd *abfd,
     {
       /* Make sure we don't overwrite a section info that has been filled in
         already.  */
-      gdb_assert (!dw_sect->readin);
+      gdb_assert (!dw_sect->read_in);
 
       dw_sect->s.section = sectp;
       dw_sect->size = bfd_section_size (sectp);
@@ -7906,7 +7906,7 @@ dwarf2_locate_v5_dwp_sections (struct objfile *objfile, bfd *abfd,
     {
       /* Make sure we don't overwrite a section info that has been filled in
         already.  */
-      gdb_assert (!dw_sect->readin);
+      gdb_assert (!dw_sect->read_in);
 
       dw_sect->s.section = sectp;
       dw_sect->size = bfd_section_size (sectp);
@@ -11701,11 +11701,11 @@ die_byte_order (die_info *die, dwarf2_cu *cu, enum bfd_endian *byte_order)
   attribute *attr = dwarf2_attr (die, DW_AT_endianity, cu);
   if (attr != nullptr && attr->form_is_constant ())
     {
-      std::optional<ULONGEST> endianity = attr->unsigned_constant ();
+      std::optional<ULONGEST> endianness = attr->unsigned_constant ();
 
-      if (endianity.has_value ())
+      if (endianness.has_value ())
        {
-         switch (*endianity)
+         switch (*endianness)
            {
            case DW_END_default:
              /* Nothing.  */
@@ -11718,7 +11718,7 @@ die_byte_order (die_info *die, dwarf2_cu *cu, enum bfd_endian *byte_order)
              break;
            default:
              complaint (_("DW_AT_endianity has unrecognized value %s"),
-                        pulongest (*endianity));
+                        pulongest (*endianness));
              break;
            }
        }
index 0a790f43fc321a878688c9d2fa4269a50d401d54..31d0ad7b36a649e66efabb7825c6f7e01474b48c 100644 (file)
@@ -122,10 +122,10 @@ dwarf2_section_info::read (struct objfile *objfile)
   bfd *abfd;
   gdb_byte *buf, *retbuf;
 
-  if (readin)
+  if (read_in)
     return;
   buffer = NULL;
-  readin = true;
+  read_in = true;
 
   if (empty ())
     return;
index fbdb025dda88ae03ee3475d4f6c8d09d9a92dbd1..ca511a4e88e35952f123ef7310f41ee3eceb13d3 100644 (file)
@@ -30,7 +30,7 @@
 /* A descriptor for dwarf sections.
 
    S.ASECTION, SIZE are typically initialized when the objfile is first
-   scanned.  BUFFER, READIN are filled in later when the section is read.
+   scanned.  BUFFER, READ_IN are filled in later when the section is read.
    If the section contained compressed data then SIZE is updated to record
    the uncompressed size of the section.
 
@@ -100,7 +100,7 @@ struct dwarf2_section_info
        section.  */
     struct dwarf2_section_info *containing_section;
   } s;
-  /* Pointer to section data, only valid if readin.  */
+  /* Pointer to section data, only valid if read_in.  */
   const gdb_byte *buffer;
   /* The size of the section, real or virtual.  */
   bfd_size_type size;
@@ -108,7 +108,7 @@ struct dwarf2_section_info
      Only valid if is_virtual.  */
   bfd_size_type virtual_offset;
   /* True if we have tried to read this section.  */
-  bool readin;
+  bool read_in;
   /* True if this is a virtual section, False otherwise.
      This specifies which of s.section and s.containing_section to use.  */
   bool is_virtual;