]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove sym_fns::sym_read_linetable
authorTom Tromey <tom@tromey.com>
Wed, 7 Jan 2026 16:49:13 +0000 (09:49 -0700)
committerTom Tromey <tom@tromey.com>
Thu, 8 Jan 2026 13:40:45 +0000 (06:40 -0700)
The last user of sym_fns::sym_read_linetable was xcoffread.c.  Now
that the code there has been removed, this callback can be removed as
well.  This slightly simplifies buildsym.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/buildsym.c
gdb/coffread.c
gdb/elfread.c
gdb/machoread.c
gdb/symfile-debug.c
gdb/symfile.h
gdb/xcoffread.c

index 0e1b6292bf92bb6d7a24921033c8addc8c1d4d88..739343f46c797eca22f219ec8ca4634efd1c0382 100644 (file)
@@ -799,11 +799,6 @@ buildsym_compunit::end_compunit_symtab_from_static_block
                         true, expandable);
   blockvector_up blockvector = make_blockvector ();
 
-  /* Read the line table if it has to be read separately.
-     This is only used by xcoffread.c.  */
-  if (m_objfile->sf->sym_read_linetable != NULL)
-    m_objfile->sf->sym_read_linetable (m_objfile);
-
   /* Handle the case where the debug info specifies a different path
      for the main source file.  It can cause us to lose track of its
      line number information.  */
index a94da096e1568a730e0346923caa0484c5ef91b8..54dcc7c765fc69505b46a26a41acbb0b71aec04e 100644 (file)
@@ -2099,7 +2099,6 @@ static const struct sym_fns coff_sym_fns =
                                   internal form */
   default_symfile_segments,    /* sym_segments: Get segment
                                   information from a file */
-  NULL,                         /* sym_read_linetable  */
 
   default_symfile_relocate,    /* sym_relocate: Relocate a debug
                                   section.  */
index 062a4845bb41f269c0627eb82b76de9596347622..60785ace56d1d54c47b53a5f190d04adff94d4b3 100644 (file)
@@ -1323,7 +1323,6 @@ static const struct sym_fns elf_sym_fns =
   elf_symfile_read,            /* read a symbol file into symtab */
   default_symfile_offsets,     /* Translate ext. to int. relocation */
   elf_symfile_segments,                /* Get segment information from a file.  */
-  NULL,
   default_symfile_relocate,    /* Relocate a debug section.  */
   &elf_probe_fns,              /* sym_probe_fns */
 };
index aa76ee779c578f5e394a81a8afe7d41b35869c71..334e3b41b6a53a3472f313bf2b7a482f5a9771c4 100644 (file)
@@ -923,7 +923,6 @@ static const struct sym_fns macho_sym_fns = {
   macho_symfile_read,           /* read a symbol file into symtab */
   macho_symfile_offsets,        /* xlate external to internal form */
   default_symfile_segments,    /* Get segment information from a file.  */
-  NULL,
   macho_symfile_relocate,      /* Relocate a debug section.  */
   NULL,                                /* sym_get_probes */
 };
index 5e4e6224ddbab7c612dd411a186a71f5cda4895f..6562dcad4333a618d2c15138ec69dfe3b43287ed 100644 (file)
@@ -755,18 +755,6 @@ debug_sym_segments (bfd *abfd)
   gdb_assert_not_reached ("debug_sym_segments called");
 }
 
-static void
-debug_sym_read_linetable (struct objfile *objfile)
-{
-  const struct debug_sym_fns_data *debug_data
-    = symfile_debug_objfile_data_key.get (objfile);
-
-  gdb_printf (gdb_stdlog, "sf->sym_read_linetable (%s)\n",
-             objfile_debug_name (objfile));
-
-  debug_data->real_sf->sym_read_linetable (objfile);
-}
-
 static bfd_byte *
 debug_sym_relocate (struct objfile *objfile, asection *sectp, bfd_byte *buf)
 {
@@ -813,8 +801,6 @@ install_symfile_debug_logging (struct objfile *objfile)
   COPY_SF_PTR (real_sf, debug_data, sym_read, debug_sym_read);
   COPY_SF_PTR (real_sf, debug_data, sym_offsets, debug_sym_offsets);
   COPY_SF_PTR (real_sf, debug_data, sym_segments, debug_sym_segments);
-  COPY_SF_PTR (real_sf, debug_data, sym_read_linetable,
-              debug_sym_read_linetable);
   COPY_SF_PTR (real_sf, debug_data, sym_relocate, debug_sym_relocate);
   if (real_sf->sym_probe_fns)
     debug_data->debug_sf.sym_probe_fns = &debug_sym_probe_fns;
index 336fe93d582dd08947408a459378a248409bf6f8..f191db0c2393b58f0660de2627554e4b5f2c799a 100644 (file)
@@ -144,12 +144,6 @@ struct sym_fns
 
   symfile_segment_data_up (*sym_segments) (bfd *abfd);
 
-  /* This function should read the linetable from the objfile when
-     the line table cannot be read while processing the debugging
-     information.  */
-
-  void (*sym_read_linetable) (struct objfile *);
-
   /* Relocate the contents of a debug section SECTP.  The
      contents are stored in BUF if it is non-NULL, or returned in a
      malloc'd buffer otherwise.  */
index 5a9a39042b8400799d68c88fc7a24ffb863c4633..5dc2da5395066d3f354bb3c82592000a6b8f62ba 100644 (file)
@@ -131,12 +131,6 @@ xcoff_secnum_to_sections (int n_scnum, struct objfile *objfile,
     }
 }
 
-static void
-aix_process_linenos (struct objfile *objfile)
-{
-}
-
-
 /* Support for line number handling.  */
 
 /* This function is called for every section; it finds the outer limits
@@ -484,7 +478,6 @@ static const struct sym_fns xcoff_sym_fns =
   xcoff_initial_scan,          /* read a symbol file into symtab */
   xcoff_symfile_offsets,       /* xlate offsets ext->int form */
   default_symfile_segments,    /* Get segment information from a file.  */
-  aix_process_linenos,
   default_symfile_relocate,    /* Relocate a debug section.  */
   NULL,                                /* sym_probe_fns */
 };