}
}
-static void
-coff_new_init (struct objfile *ignore)
-{
-}
-
/* Perform any local cleanups required when we are done with a
particular objfile. I.E, we are in the process of discarding all
symbol information for an objfile, freeing up all memory held for
static const struct sym_fns coff_sym_fns =
{
- coff_new_init, /* sym_new_init: init anything gbl to
- entire symtab */
coff_symfile_init, /* sym_init: read initial info, setup
for sym_read() */
coff_symfile_read, /* sym_read: read a symbol file into
objfile->object_format_has_copy_relocs = true;
}
-/* Initialize anything that needs initializing when a completely new symbol
- file is specified (not just adding some symbols from another file, e.g. a
- shared library). */
-
-static void
-elf_new_init (struct objfile *ignore)
-{
-}
-
/* Perform any local cleanups required when we are done with a particular
objfile. I.E, we are in the process of discarding all symbol information
for an objfile, freeing up all memory held for it, and unlinking the
static const struct sym_fns elf_sym_fns =
{
- elf_new_init, /* init anything gbl to entire symtab */
elf_symfile_init, /* read initial info, setup for sym_read() */
elf_symfile_read, /* read a symbol file into symtab */
elf_symfile_finish, /* finished with file, cleanup */
unsigned int nbr_syms;
};
-static void
-macho_new_init (struct objfile *objfile)
-{
-}
-
static void
macho_symfile_init (struct objfile *objfile)
{
}
static const struct sym_fns macho_sym_fns = {
- macho_new_init, /* init anything gbl to entire symtab */
macho_symfile_init, /* read initial info, setup for sym_read() */
macho_symfile_read, /* read a symbol file into symtab */
macho_symfile_finish, /* finished with file, cleanup */
\f
/* Debugging version of struct sym_fns. */
-static void
-debug_sym_new_init (struct objfile *objfile)
-{
- const struct debug_sym_fns_data *debug_data
- = symfile_debug_objfile_data_key.get (objfile);
-
- gdb_printf (gdb_stdlog, "sf->sym_new_init (%s)\n",
- objfile_debug_name (objfile));
-
- debug_data->real_sf->sym_new_init (objfile);
-}
-
static void
debug_sym_init (struct objfile *objfile)
{
(to)->debug_sf.name = func; \
} while (0)
- COPY_SF_PTR (real_sf, debug_data, sym_new_init, debug_sym_new_init);
COPY_SF_PTR (real_sf, debug_data, sym_init, debug_sym_init);
COPY_SF_PTR (real_sf, debug_data, sym_read, debug_sym_read);
COPY_SF_PTR (real_sf, debug_data, sym_finish, debug_sym_finish);
If the user wants to get rid of them, they should do "symbol-file"
without arguments first. Not sure this is the best behavior
(PR 2207). */
-
- (*objfile->sf->sym_new_init) (objfile);
}
/* Convert addr into an offset rather than an absolute address.
build_objfile_section_table (&objfile);
- /* What the hell is sym_new_init for, anyway? The concept of
- distinguishing between the main file and additional files
- in this way seems rather dubious. */
- if (&objfile == current_program_space->symfile_object_file)
- {
- (*objfile.sf->sym_new_init) (&objfile);
- }
-
(*objfile.sf->sym_init) (&objfile);
clear_complaints ();
struct sym_fns
{
- /* Initializes anything that is global to the entire symbol table.
- It is called during symbol_file_add, when we begin debugging an
- entirely new program. */
-
- void (*sym_new_init) (struct objfile *);
-
/* Reads any initial information from a symbol file, and initializes
the struct sym_fns SF in preparation for sym_read(). It is
called every time we read a symbol file for any reason. */
static void xcoff_symfile_init (struct objfile *);
-static void xcoff_new_init (struct objfile *);
-
static void xcoff_symfile_finish (struct objfile *);
/* Search all BFD sections for the section whose target_index is
info->max_lineno_offset = maxoff;
}
-static void
-xcoff_new_init (struct objfile *objfile)
-{
-}
-
/* Do initialization in preparation for reading symbols from OBJFILE.
We will only be called if this is an XCOFF or XCOFF-like file.
xcoffread.c reads all the symbols and does in fact randomly access them
(in C_BSTAT and line number processing). */
- xcoff_new_init, /* init anything gbl to entire symtab */
xcoff_symfile_init, /* read initial info, setup for sym_read() */
xcoff_initial_scan, /* read a symbol file into symtab */
xcoff_symfile_finish, /* finished with file, cleanup */