* symfile.h (struct sym_fns): Adjust comment on sym_read.
* symfile.c (syms_from_objfile): Pass all symfile flags to sym_read.
* dbxread.c (dbx_symfile_read): Rename mainline to symfile_flags,
adjust header comment.
* elfread.c (elf_symfile_read): Ditto.
* somread.c (som_symfile_read): Ditto.
* xcoffread.c (xcoff_initial_scan): Ditto.
* coffread.c (coff_symfile_read): Rename mainline to symfile_flags.
* machoread.c (macho_symfile_read): Ditto.
* mipsread.c (mipscoff_symfile_read): Ditto.
2009-12-07 Tristan Gingold <gingold@adacore.com>
+ * symfile.h (struct sym_fns): Adjust comment on sym_read.
+ * symfile.c (syms_from_objfile): Pass all symfile flags to sym_read.
+ * dbxread.c (dbx_symfile_read): Rename mainline to symfile_flags,
+ adjust header comment.
+ * elfread.c (elf_symfile_read): Ditto.
+ * somread.c (som_symfile_read): Ditto.
+ * xcoffread.c (xcoff_initial_scan): Ditto.
+ * coffread.c (coff_symfile_read): Rename mainline to symfile_flags.
+ * machoread.c (macho_symfile_read): Ditto.
+ * mipsread.c (mipscoff_symfile_read): Ditto.
+
+2009-12-07 Tristan Gingold <gingold@adacore.com>
+
* dbxread.c (dbx_symfile_read): No need to test mainline to call
init_psymbol_list.
* xcoffread.c (xcoff_initial_scan): Ditto;
/* Read a symbol file, after initialization by coff_symfile_init. */
static void
-coff_symfile_read (struct objfile *objfile, int mainline)
+coff_symfile_read (struct objfile *objfile, int symfile_flags)
{
struct coff_symfile_info *info;
struct dbx_symfile_info *dbxinfo;
/* Scan and build partial symbols for a symbol file.
We have been initialized by a call to dbx_symfile_init, which
put all the relevant info into a "struct dbx_symfile_info",
- hung off the objfile structure.
-
- MAINLINE is true if we are reading the main symbol
- table (as opposed to a shared lib or dynamically loaded file). */
+ hung off the objfile structure. */
static void
-dbx_symfile_read (struct objfile *objfile, int mainline)
+dbx_symfile_read (struct objfile *objfile, int symfile_flags)
{
bfd *sym_bfd;
int val;
in each section. We simplify it down to a single offset for all
symbols. FIXME.
- MAINLINE is true if we are reading the main symbol
- table (as opposed to a shared lib or dynamically loaded file).
-
This function only does the minimum work necessary for letting the
user "name" things symbolically; it does not read the entire symtab.
Instead, it reads the external and static symbols and puts them in partial
capability even for files compiled without -g. */
static void
-elf_symfile_read (struct objfile *objfile, int mainline)
+elf_symfile_read (struct objfile *objfile, int symfile_flags)
{
bfd *abfd = objfile->obfd;
struct elfinfo ei;
}
static void
-macho_symfile_read (struct objfile *objfile, int mainline)
+macho_symfile_read (struct objfile *objfile, int symfile_flags)
{
bfd *abfd = objfile->obfd;
struct cleanup *back_to;
/* Read a symbol file from a file. */
static void
-mipscoff_symfile_read (struct objfile *objfile, int mainline)
+mipscoff_symfile_read (struct objfile *objfile, int symfile_flags)
{
bfd *abfd = objfile->obfd;
struct cleanup *back_to;
SECTION_OFFSETS is a set of offsets to apply to relocate the symbols
in each section. This is ignored, as it isn't needed for SOM.
- MAINLINE is true if we are reading the main symbol
- table (as opposed to a shared lib or dynamically loaded file).
-
This function only does the minimum work necessary for letting the
user "name" things symbolically; it does not read the entire symtab.
Instead, it reads the external and static symbols and puts them in partial
capability even for files compiled without -g. */
static void
-som_symfile_read (struct objfile *objfile, int mainline)
+som_symfile_read (struct objfile *objfile, int symfile_flags)
{
bfd *abfd = objfile->obfd;
struct cleanup *back_to;
init_objfile_sect_indices (objfile);
}
- (*objfile->sf->sym_read) (objfile, mainline);
+ (*objfile->sf->sym_read) (objfile, add_flags);
/* Discard cleanups as symbol reading was successful. */
void (*sym_init) (struct objfile *);
- /* sym_read (objfile, mainline) Reads a symbol file into a psymtab
+ /* sym_read (objfile, symfile_flags) Reads a symbol file into a psymtab
(or possibly a symtab). OBJFILE is the objfile struct for the
- file we are reading. MAINLINE is 1 if this is the main symbol
- table being read, and 0 if a secondary symbol file (e.g. shared
- library or dynamically loaded file) is being read. */
+ file we are reading. SYMFILE_FLAGS are the flags passed to
+ symbol_file_add & co. */
void (*sym_read) (struct objfile *, int);
SECTION_OFFSETS contains offsets relative to which the symbols in the
various sections are (depending where the sections were actually loaded).
- MAINLINE is true if we are reading the main symbol
- table (as opposed to a shared lib or dynamically loaded file). */
+*/
static void
-xcoff_initial_scan (struct objfile *objfile, int mainline)
+xcoff_initial_scan (struct objfile *objfile, int symfile_flags)
{
bfd *abfd;
int val;