* 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.
This commit is contained in:
Joel Brobecker 2007-09-21 18:01:26 +00:00
parent 4ab2002928
commit c295b2e505
11 changed files with 28 additions and 36 deletions

View 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>

View 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.) */

View 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 */
};

View 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

View File

@ -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);

View 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 */
};

View 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 */
};

View 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 */
};

View 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 */
};

View 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

View 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 */
};