forked from Imagelibrary/binutils-gdb
move the "main" data into the per-BFD object
This adds the "main"-related data into the per-BFD. This is needed because once symbol sharing across objfiles is complete, computing the main name as a side effect of symbol reading will no longer work -- the symbols simply won't be re-read. After this change, set_main_name is only used by the main_name machinery itself, so this patch makes it static. 2014-01-15 Tom Tromey <tromey@redhat.com> * dbxread.c (process_one_symbol): Use set_objfile_main_name. * dwarf2read.c (read_partial_die): Use set_objfile_main_name. * objfiles.c (get_objfile_bfd_data): Initialize language_of_main. (set_objfile_main_name): New function. * objfiles.h (struct objfile_per_bfd_storage) <name_of_main, language_of_main>: New fields. (set_objfile_main_name): Declare. * symtab.c (find_main_name): Loop over objfiles to find the main name and language. (set_main_name): Now static. (get_main_info): Add comment. * symtab.h (set_main_name): Don't declare.
This commit is contained in:
@@ -1324,7 +1324,6 @@ extern struct cleanup *make_cleanup_free_search_symbols (struct symbol_search
|
||||
FIXME: cagney/2001-03-20: Can't make main_name() const since some
|
||||
of the calling code currently assumes that the string isn't
|
||||
const. */
|
||||
extern void set_main_name (const char *name, enum language lang);
|
||||
extern /*const */ char *main_name (void);
|
||||
extern enum language main_language (void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user