From: Joel Brobecker Date: Fri, 21 Sep 2007 18:01:26 +0000 (+0000) Subject: * symfile.h (struct sym_fns): Add new field sym_read_linetable. X-Git-Tag: sid-snapshot-20071001~125 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c295b2e5056e475702a492c520c17d47c9955e14;p=external%2Fbinutils.git * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c217f0c..814fc5e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,16 @@ +2007-09-21 Joel Brobecker + + * 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 Maciej W. Rozycki diff --git a/gdb/buildsym.c b/gdb/buildsym.c index 547e7ca..d3af35e 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -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.) */ diff --git a/gdb/coffread.c b/gdb/coffread.c index 0276378..b767eaf 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -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 */ }; diff --git a/gdb/config/powerpc/aix.mt b/gdb/config/powerpc/aix.mt index c18e4ba..06a9984 100644 --- a/gdb/config/powerpc/aix.mt +++ b/gdb/config/powerpc/aix.mt @@ -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 index 511c534..0000000 --- a/gdb/config/rs6000/tm-rs6000.h +++ /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 . */ - -/* 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); - diff --git a/gdb/dbxread.c b/gdb/dbxread.c index f0129f6..95f8cd8 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -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 */ }; diff --git a/gdb/elfread.c b/gdb/elfread.c index d139bde..9e3ed6c 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -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 */ }; diff --git a/gdb/mipsread.c b/gdb/mipsread.c index 280e605..6f7cad8 100644 --- a/gdb/mipsread.c +++ b/gdb/mipsread.c @@ -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 */ }; diff --git a/gdb/somread.c b/gdb/somread.c index 21281ef..b0b1615 100644 --- a/gdb/somread.c +++ b/gdb/somread.c @@ -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 */ }; diff --git a/gdb/symfile.h b/gdb/symfile.h index 49c1233..15f60cc 100644 --- a/gdb/symfile.h +++ b/gdb/symfile.h @@ -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 diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 08e1de3..49bf023 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -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 */ };