]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/xcoffread: remove read of .debug section
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 8 Jan 2026 19:33:20 +0000 (14:33 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 9 Jan 2026 02:04:55 +0000 (21:04 -0500)
This is not used by anything.

Change-Id: Icc5e72b2f30521b8856db46f4d6cabf26f615b0b
Approved-By: Tom Tromey <tom@tromey.com>
gdb/xcoffread.c

index d46b4eb23f3d9bfa546be7c896c7c964879357e0..43d3cec2e49bd14ba4faea16cf3ff6d3b387daf9 100644 (file)
@@ -38,9 +38,6 @@
 \f
 struct xcoff_symfile_info
   {
-    /* Pointer to debug section.  */
-    char *debugsec = nullptr;
-
     /* Pointer to the a.out symbol table.  */
     char *symtbl = nullptr;
 
@@ -300,37 +297,6 @@ xcoff_initial_scan (struct objfile *objfile, symfile_add_flags symfile_flags)
   num_symbols = bfd_get_symcount (abfd);       /* # of symbols */
   symtab_offset = obj_sym_filepos (abfd);      /* symbol table file offset */
 
-  if (num_symbols > 0)
-    {
-      /* Read the .debug section, if present and if we're not ignoring
-        it.  */
-      if (!(objfile->flags & OBJF_READNEVER))
-       {
-         struct bfd_section *secp;
-         bfd_size_type length;
-         bfd_byte *debugsec = NULL;
-
-         secp = bfd_get_section_by_name (abfd, ".debug");
-         if (secp)
-           {
-             length = bfd_get_section_alloc_size (abfd, secp);
-             if (length)
-               {
-                 debugsec
-                   = (bfd_byte *) obstack_alloc (&objfile->objfile_obstack,
-                                                 length);
-
-                 if (!bfd_get_full_section_contents (abfd, secp, &debugsec))
-                   {
-                     error (_("Error reading .debug section of `%s': %s"),
-                            name, bfd_errmsg (bfd_get_error ()));
-                   }
-               }
-           }
-         info->debugsec = (char *) debugsec;
-       }
-    }
-
   /* Read the symbols.  We keep them in core because we will want to
      access them randomly in read_symbol*.  */
   val = bfd_seek (abfd, symtab_offset, SEEK_SET);