* symfile.h (struct sym_fns): Add new field sym_read_linetable.
authorJoel Brobecker <brobecker@gnat.com>
Fri, 21 Sep 2007 18:01:26 +0000 (18:01 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Fri, 21 Sep 2007 18:01:26 +0000 (18:01 +0000)
        * coffread.c, dbxread.c, elfread.c, mipsread.c somread.c:
        Adjust the struct sym_fns object accordingly by setting
        the new field to NULL.
        * xcoffread.c (aix_process_linenos): Make static.
        (xcoff_sym_fns): Set new field to aix_process_linenos.
        * buildsym.c (end_symtab): Replace call to PROCESS_LINENUMBER_HOOK
        by call to new the new sym_fns sym_read_linetable function.
        * config/powerpc/aix.mt (DEPRECATED_TM_FILE): Delete.
        * config/rs6000/tm-rs6000.h: Delete.

gdb/ChangeLog
gdb/buildsym.c
gdb/coffread.c
gdb/config/powerpc/aix.mt
gdb/config/rs6000/tm-rs6000.h [deleted file]
gdb/dbxread.c
gdb/elfread.c
gdb/mipsread.c
gdb/somread.c
gdb/symfile.h
gdb/xcoffread.c

index c217f0c..814fc5e 100644 (file)
@@ -1,3 +1,16 @@
+2007-09-21  Joel Brobecker  <brobecker@adacore.com>
+
+       * symfile.h (struct sym_fns): Add new field sym_read_linetable.
+       * coffread.c, dbxread.c, elfread.c, mipsread.c somread.c:
+       Adjust the struct sym_fns object accordingly by setting
+       the new field to NULL.
+       * xcoffread.c (aix_process_linenos): Make static.
+       (xcoff_sym_fns): Set new field to aix_process_linenos.
+       * buildsym.c (end_symtab): Replace call to PROCESS_LINENUMBER_HOOK
+       by call to new the new sym_fns sym_read_linetable function.
+       * config/powerpc/aix.mt (DEPRECATED_TM_FILE): Delete.
+       * config/rs6000/tm-rs6000.h: Delete.
+
 2007-09-21  David Ung  <davidu@mips.com>
             Maciej W. Rozycki  <macro@mips.com>
 
index 547e7ca..d3af35e 100644 (file)
@@ -933,10 +933,9 @@ end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
                             &objfile->objfile_obstack);
     }
 
-#ifndef PROCESS_LINENUMBER_HOOK
-#define PROCESS_LINENUMBER_HOOK()
-#endif
-  PROCESS_LINENUMBER_HOOK ();  /* Needed for xcoff. */
+  /* Read the line table if it has to be read separately.  */
+  if (objfile->sf->sym_read_linetable != NULL)
+    objfile->sf->sym_read_linetable ();
 
   /* Now create the symtab objects proper, one for each subfile.  */
   /* (The main file is the last one on the chain.)  */
index 0276378..b767eaf 100644 (file)
@@ -2100,6 +2100,7 @@ static struct sym_fns coff_sym_fns =
   default_symfile_offsets,     /* sym_offsets:  xlate external to internal form */
   default_symfile_segments,    /* sym_segments: Get segment information from
                                   a file.  */
+  NULL,                         /* sym_read_linetable  */
   NULL                         /* next: pointer to next struct sym_fns */
 };
 
index c18e4ba..06a9984 100644 (file)
@@ -1,4 +1,3 @@
 # Target: PowerPC running AIX
 TDEPFILES= rs6000-tdep.o rs6000-aix-tdep.o \
            xcoffread.o ppc-sysv-tdep.o solib.o solib-svr4.o
-DEPRECATED_TM_FILE= config/rs6000/tm-rs6000.h
diff --git a/gdb/config/rs6000/tm-rs6000.h b/gdb/config/rs6000/tm-rs6000.h
deleted file mode 100644 (file)
index 511c534..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Parameters for target execution on an RS6000, for GDB, the GNU debugger.
-
-   Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2004, 2007 Free Software Foundation, Inc.
-
-   Contributed by IBM Corporation.
-
-   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/>.  */
-
-/* In xcoff, we cannot process line numbers when we see them. This is
-   mainly because we don't know the boundaries of the include files. So,
-   we postpone that, and then enter and sort(?) the whole line table at
-   once, when we are closing the current symbol table in end_symtab(). */
-
-#define        PROCESS_LINENUMBER_HOOK()       aix_process_linenos ()
-extern void aix_process_linenos (void);
-
index f0129f6..95f8cd8 100644 (file)
@@ -3513,6 +3513,7 @@ static struct sym_fns aout_sym_fns =
   default_symfile_offsets,     /* sym_offsets: parse user's offsets to internal form */
   default_symfile_segments,    /* sym_segments: Get segment information from
                                   a file.  */
+  NULL,                         /* sym_read_linetable */
   NULL                         /* next: pointer to next struct sym_fns */
 };
 
index d139bde..9e3ed6c 100644 (file)
@@ -813,6 +813,7 @@ static struct sym_fns elf_sym_fns =
   default_symfile_offsets,     /* sym_offsets:  Translate ext. to int. relocation */
   elf_symfile_segments,                /* sym_segments: Get segment information from
                                   a file.  */
+  NULL,                         /* sym_read_linetable */
   NULL                         /* next: pointer to next struct sym_fns */
 };
 
index 280e605..6f7cad8 100644 (file)
@@ -394,6 +394,7 @@ static struct sym_fns ecoff_sym_fns =
   default_symfile_offsets,     /* sym_offsets: dummy FIXME til implem sym reloc */
   default_symfile_segments,    /* sym_segments: Get segment information from
                                   a file.  */
+  NULL,                         /* sym_read_linetable */
   NULL                         /* next: pointer to next struct sym_fns */
 };
 
index 21281ef..b0b1615 100644 (file)
@@ -438,6 +438,7 @@ static struct sym_fns som_sym_fns =
   som_symfile_offsets,         /* sym_offsets:  Translate ext. to int. relocation */
   default_symfile_segments,    /* sym_segments: Get segment information from
                                   a file.  */
+  NULL,                         /* sym_read_linetable */
   NULL                         /* next: pointer to next struct sym_fns */
 };
 
index 49c1233..15f60cc 100644 (file)
@@ -157,6 +157,11 @@ struct sym_fns
 
   struct symfile_segment_data *(*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) (void);
+
   /* Finds the next struct sym_fns.  They are allocated and
      initialized in whatever module implements the functions pointed
      to; an initializer calls add_symtab_fns to add them to the global
index 08e1de3..49bf023 100644 (file)
@@ -727,7 +727,7 @@ return_after_cleanup:
   memset (&main_subfile, '\0', sizeof (struct subfile));
 }
 
-void
+static void
 aix_process_linenos (void)
 {
   /* process line numbers and enter them into line vector */
@@ -3012,6 +3012,7 @@ static struct sym_fns xcoff_sym_fns =
   xcoff_symfile_offsets,       /* sym_offsets: xlate offsets ext->int form */
   default_symfile_segments,    /* sym_segments: Get segment information from
                                   a file.  */
+  aix_process_linenos,          /* sym_read_linetable */
   NULL                         /* next: pointer to next struct sym_fns */
 };