+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>
&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.) */
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 */
};
# 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
+++ /dev/null
-/* 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);
-
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 */
};
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 */
};
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 */
};
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 */
};
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
memset (&main_subfile, '\0', sizeof (struct subfile));
}
-void
+static void
aix_process_linenos (void)
{
/* process line numbers and enter them into line vector */
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 */
};